Project

General

Profile

Download (8.53 KB) Statistics
| Branch: | Tag: | Revision:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>cdm-webapp</artifactId>
5
  <groupId>eu.etaxonomy</groupId>
6
  <version>5.42.0</version>
7
  <packaging>war</packaging>
8
  <name>CDM Webapp</name>
9
  <properties>
10
    <cdmlib.version>5.42.0</cdmlib.version>
11
    <cdm.vaadin.version>5.42.0</cdm.vaadin.version>
12
  </properties>
13
  <repositories>
14
    <!-- the cdm internal repository -->
15
    <repository>
16
      <id>EditRepository</id>
17
      <url>https://cybertaxonomy.org/mavenrepo</url>
18
      <releases>
19
        <enabled>true</enabled>
20
        <updatePolicy>always</updatePolicy>
21
      </releases>
22
      <snapshots>
23
        <enabled>true</enabled>
24
        <updatePolicy>always</updatePolicy>
25
      </snapshots>
26
    </repository>
27
  </repositories>
28
  <distributionManagement>
29
    <repository>
30
      <uniqueVersion>false</uniqueVersion>
31
      <id>cybertaxonomy.eu</id>
32
      <name>Edit Maven Repository</name>
33
      <url>scpexe://cybertaxonomy.org/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
34
      <layout>default</layout>
35
    </repository>
36
  </distributionManagement>
37
  <profiles>
38
    <profile>
39
      <id>local-repository</id>
40
      <activation>
41
        <property>
42
          <name>localrepo</name>
43
        </property>
44
      </activation>
45
      <repositories>
46
        <repository>
47
          <id>EditLocalRepository</id>
48
          <url>file://${localrepo}/eu/etaxonomy/</url>
49
          <releases>
50
            <enabled>false</enabled>
51
            <updatePolicy>always</updatePolicy>
52
          </releases>
53
          <snapshots>
54
            <enabled>true</enabled>
55
            <updatePolicy>always</updatePolicy>
56
          </snapshots>
57
        </repository>
58
      </repositories>
59
    </profile>
60
  </profiles>
61
  <dependencies>
62
    <dependency>
63
      <groupId>eu.etaxonomy</groupId>
64
      <artifactId>cdmlib-remote-webapp</artifactId>
65
      <version>${cdmlib.version}</version>
66
      <type>war</type>
67
    </dependency>
68
    <dependency>
69
      <groupId>eu.etaxonomy</groupId>
70
      <artifactId>cdm-vaadin</artifactId>
71
      <version>${cdm.vaadin.version}</version>
72
      <type>war</type>
73
    </dependency>
74
    <dependency>
75
      <groupId>eu.etaxonomy</groupId>
76
      <artifactId>cdmlib-db</artifactId>
77
      <version>${cdmlib.version}</version>
78
      <scope>test</scope>
79
    </dependency>
80
  </dependencies>
81
  <build>
82
    <plugins>
83
      <plugin>
84
        <groupId>org.apache.maven.plugins</groupId>
85
        <artifactId>maven-war-plugin</artifactId>
86
        <version>3.3.2</version>
87
        <configuration>
88
          <failOnMissingWebXml>flase</failOnMissingWebXml>
89
          <overlays>
90
            <!-- 
91
                Overlays are applied with a first-win strategy. 
92
                Overlays are applied in the order in which they are defined in the <overlays> configuration. 
93
                Therefore cdmlib-remote-webapp should come first.
94
                
95
                Once a change is made to any cdmlib-* project cdmlib should be build and the  
96
                cdmlib-remote-webapp.war will contain all these fresh artifacts. cdm-vaadin 
97
                in contrast is expected to be build only due to changes in the vaadin specific 
98
                code. The cdmlib-* artifact are excluded from the cdm-vaadin overlay to assure 
99
                that only the cdmlib-jars from cdm-remote-webapp can make their way into the final
100
                war.    
101
            -->
102
            <overlay>
103
              <!-- MUST BE THE FIRST war, see above -->
104
              <groupId>eu.etaxonomy</groupId>
105
              <artifactId>cdmlib-remote-webapp</artifactId>
106
            </overlay>
107
            <overlay>
108
              <groupId>eu.etaxonomy</groupId>
109
              <artifactId>cdm-vaadin</artifactId>
110
              <excludes>
111
                <exclude>WEB-INF/lib/cdmlib-*.jar</exclude>
112
              </excludes>
113
            </overlay>
114
            <overlay>
115
              <!-- overlay a second time to only add cdmlib-cache.jar -->
116
              <groupId>eu.etaxonomy</groupId>
117
              <artifactId>cdm-vaadin</artifactId>
118
              <includes>
119
                <include>WEB-INF/lib/cdmlib-cache*.jar</include>
120
              </includes>
121
            </overlay>
122
          </overlays>
123
        </configuration>
124
      </plugin>
125
      <!-- 
126
        
127
        when executing the mvn deploy directly (not via jgit-flow *-finish) unpacked war
128
        resources are accumulating and must be deleted before entering the prepare-package
129
        life cycle phase, therefore configuring this auto-clean makes a lot of sense.
130
        
131
        BUT the auto-clean is causing problems with the jgit-flow plugin,
132
        it is called twice and thus removes the cdm-webapp-x.x.x.war after it has been build,
133
        maven then fails with : "The packaging for this project did not assign a file to the build artifact"
134
        Therefore this is disabled! 
135
        
136
        A possible solution to this is to bind define a special auto-clean execution to the prepare-package phase,
137
        as long as this plugin is defined before the maven-dependency-plugin the clean should only
138
        happen before the unpack, see http://www.mkyong.com/maven/maven-plugin-execution-order-in-same-phase/
139
        Maybe it makes sense to define a fileset that only includes the unpacked war files  
140
        
141
      <plugin>
142
        <groupId>org.apache.maven.plugins</groupId>
143
        <artifactId>maven-clean-plugin</artifactId>
144
        <version>2.5</version>
145
        <executions>
146
          <execution>
147
            <id>auto-clean</id>
148
            <phase>initialize</phase>
149
            <goals>
150
              <goal>clean</goal>
151
            </goals>
152
          </execution>
153
        </executions>
154
      </plugin>
155
        -->
156
      <plugin>
157
        <!-- groupId>ch.dvbern.oss.maven.jgitflow</groupId>
158
        <artifactId>jgitflow-maven-plugin</artifactId>
159
        <version>1.0-m8</version>  -->
160
        <groupId>external.atlassian.jgitflow</groupId>
161
        <artifactId>jgitflow-maven-plugin</artifactId>
162
        <version>1.0-m6</version>
163
        <configuration>
164
          <pushHotfixes>true</pushHotfixes>
165
          <pushReleases>true</pushReleases>
166
          <enableSshAgent>true</enableSshAgent>
167
          <allowSnapshots>true</allowSnapshots>
168
          <allowUntracked>true</allowUntracked>
169
        </configuration>
170
        <dependencies>
171
          <!-- 
172
                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
173
                in order have ssl key exchange algorithms compatible with openssh 6.7 
174
          -->
175
          <dependency>
176
            <groupId>com.jcraft</groupId>
177
            <artifactId>jsch</artifactId>
178
            <version>0.1.55</version>
179
          </dependency>
180
        </dependencies>
181
      </plugin>
182
      <plugin>
183
        <groupId>org.apache.maven.plugins</groupId>
184
        <artifactId>maven-enforcer-plugin</artifactId>
185
        <version>3.1.0</version>
186
        <executions>
187
          <execution>
188
            <id>enforce</id>
189
            <configuration>
190
              <fail>true</fail>
191
              <skip>false</skip>
192
              <rules>
193
                <dependencyConvergence />
194
                <requireMavenVersion>
195
                  <version>[3.6.0,)</version>
196
                </requireMavenVersion>
197
              </rules>
198
            </configuration>
199
            <goals>
200
              <goal>enforce</goal>
201
            
202
            
203
            
204
            
205
            
206
            
207
            
208
            
209
            
210
            
211
            
212
            
213
            
214
            
215
            
216
            
217
            
218
            
219
            
220
            
221
            
222
            
223
            
224
            
225
            
226
            
227
            
228
            
229
            
230
            
231
            
232
            
233
            
234
            
235
          
236
              <!-- Binds by default to the lifecycle phase: validate -->
237
            </goals>
238
          </execution>
239
        </executions>
240
      </plugin>
241
    </plugins>
242
    <extensions>
243
      <extension>
244
        <groupId>org.apache.maven.wagon</groupId>
245
        <artifactId>wagon-scm</artifactId>
246
        <version>3.5.1</version>
247
      </extension>
248
      <extension>
249
        <groupId>org.apache.maven.wagon</groupId>
250
        <artifactId>wagon-ssh</artifactId>
251
        <version>3.5.1</version>
252
      </extension>
253
      <extension>
254
        <groupId>org.apache.maven.wagon</groupId>
255
        <artifactId>wagon-ssh-external</artifactId>
256
        <version>3.5.1</version>
257
      </extension>
258
    </extensions>
259
  </build>
260
</project>
(3-3/3)