Project

General

Profile

Download (8.03 KB) Statistics
| Branch: | Tag: | Revision:
1 a21bc8ed Cherian Mathew
<?xml version="1.0" encoding="UTF-8"?>
2 196c706d Andreas Kohlbecker
<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 a21bc8ed Cherian Mathew
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>cdm-webapp</artifactId>
5
  <groupId>eu.etaxonomy</groupId>
6 9c3bb185 jenkins
  <version>5.17.0-SNAPSHOT</version>
7 a21bc8ed Cherian Mathew
  <packaging>war</packaging>
8
  <name>CDM Webapp</name>
9
  <properties>
10 75f03e56 jenkins
    <cdmlib.version>5.18.0-SNAPSHOT</cdmlib.version>
11
    <cdm.vaadin.version>5.18.0-SNAPSHOT</cdm.vaadin.version>
12 a21bc8ed Cherian Mathew
  </properties>
13
  <repositories>
14
    <!-- the cdm internal repository -->
15
    <repository>
16
      <id>EditRepository</id>
17 600fbce8 Andreas Kohlbecker
      <url>http://cybertaxonomy.eu/mavenrepo</url>
18 b7f5730a Andreas Kohlbecker
      <releases>
19
        <enabled>true</enabled>
20
        <updatePolicy>always</updatePolicy>
21
      </releases>
22
      <snapshots>
23
        <enabled>true</enabled>
24
        <updatePolicy>always</updatePolicy>
25
      </snapshots>
26 a21bc8ed Cherian Mathew
    </repository>
27
  </repositories>
28
  <distributionManagement>
29
    <repository>
30
      <uniqueVersion>false</uniqueVersion>
31 600fbce8 Andreas Kohlbecker
      <id>cybertaxonomy.eu</id>
32 a21bc8ed Cherian Mathew
      <name>Edit Maven Repository</name>
33 600fbce8 Andreas Kohlbecker
      <url>scpexe://cybertaxonomy.eu/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
34 a21bc8ed Cherian Mathew
      <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 0d55ceae jenkins
  <dependencies>
62 d0ded6af Andreas Kohlbecker
    <dependency>
63
      <groupId>eu.etaxonomy</groupId>
64 f55d4981 Andreas Kohlbecker
      <artifactId>cdmlib-remote-webapp</artifactId>
65
      <version>${cdmlib.version}</version>
66 d0ded6af Andreas Kohlbecker
      <type>war</type>
67
    </dependency>
68 0d55ceae jenkins
    <dependency>
69
      <groupId>eu.etaxonomy</groupId>
70 f55d4981 Andreas Kohlbecker
      <artifactId>cdm-vaadin</artifactId>
71
      <version>${cdm.vaadin.version}</version>
72 f56be808 Cherian Mathew
      <type>war</type>
73
    </dependency>
74 0d55ceae jenkins
    <dependency>
75
      <groupId>eu.etaxonomy</groupId>
76 d0ded6af Andreas Kohlbecker
      <artifactId>cdmlib-db</artifactId>
77
      <version>${cdmlib.version}</version>
78
      <scope>test</scope>
79 0d55ceae jenkins
    </dependency>
80
  </dependencies>
81 a21bc8ed Cherian Mathew
  <build>
82
    <plugins>
83
      <plugin>
84
        <groupId>org.apache.maven.plugins</groupId>
85
        <artifactId>maven-war-plugin</artifactId>
86 18679cd8 Andreas Kohlbecker
        <version>2.6</version>
87 a21bc8ed Cherian Mathew
        <configuration>
88 d0ded6af Andreas Kohlbecker
          <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 0cdfbe50 Andreas Kohlbecker
                Therefore cdmlib-remote-webapp should come first.
94 f55d4981 Andreas Kohlbecker
                
95 0cdfbe50 Andreas Kohlbecker
                Once a change is made to any cdmlib-* project cdmlib should be build and the  
96 f55d4981 Andreas Kohlbecker
                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 0cdfbe50 Andreas Kohlbecker
                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 d0ded6af Andreas Kohlbecker
            -->
102
            <overlay>
103 bce9439d jenkins
              <!-- MUST BE THE FIRST war, see above -->
104 d0ded6af Andreas Kohlbecker
              <groupId>eu.etaxonomy</groupId>
105 f55d4981 Andreas Kohlbecker
              <artifactId>cdmlib-remote-webapp</artifactId>
106 d0ded6af Andreas Kohlbecker
            </overlay>
107
            <overlay>
108
              <groupId>eu.etaxonomy</groupId>
109 f55d4981 Andreas Kohlbecker
              <artifactId>cdm-vaadin</artifactId>
110 0cdfbe50 Andreas Kohlbecker
              <excludes>
111
                <exclude>WEB-INF/lib/cdmlib-*.jar</exclude>
112
              </excludes>
113 8ccd2fdc Andreas Kohlbecker
            </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 1c5f542f Andreas Kohlbecker
              <includes>
119 8ccd2fdc Andreas Kohlbecker
                <include>WEB-INF/lib/cdmlib-cache*.jar</include>
120 1c5f542f Andreas Kohlbecker
              </includes>
121 d0ded6af Andreas Kohlbecker
            </overlay>
122
          </overlays>
123 a21bc8ed Cherian Mathew
        </configuration>
124
      </plugin>
125 0d55ceae jenkins
      <!-- 
126 f3d07c11 Andreas Kohlbecker
        
127 a1056a0c Andreas Kohlbecker
        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 f3d07c11 Andreas Kohlbecker
        
131 a1056a0c Andreas Kohlbecker
        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 f3d07c11 Andreas Kohlbecker
        
136 20b683b4 Andreas Kohlbecker
        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 39c0adc4 Cherian Mathew
      <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 f3d07c11 Andreas Kohlbecker
        -->
156 0d55ceae jenkins
      <plugin>
157 f2608024 Andreas Kohlbecker
        <groupId>external.atlassian.jgitflow</groupId>
158
        <artifactId>jgitflow-maven-plugin</artifactId>
159 4d13b80c Andreas Kohlbecker
        <version>1.0-m6</version>
160 f2608024 Andreas Kohlbecker
        <configuration>
161
          <pushHotfixes>true</pushHotfixes>
162 4d13b80c Andreas Kohlbecker
          <pushReleases>true</pushReleases>
163 f2608024 Andreas Kohlbecker
          <enableSshAgent>true</enableSshAgent>
164
          <allowSnapshots>true</allowSnapshots>
165
          <allowUntracked>true</allowUntracked>
166
        </configuration>
167
        <dependencies>
168
          <!-- 
169
                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
170
                in order have ssl key exchange algorithms compatible with openssh 6.7 
171 5dc7cec8 Andreas Kohlbecker
          -->
172 f2608024 Andreas Kohlbecker
          <dependency>
173
            <groupId>com.jcraft</groupId>
174
            <artifactId>jsch</artifactId>
175
            <version>0.1.53</version>
176
          </dependency>
177
        </dependencies>
178
      </plugin>
179 bdda8f90 Andreas Kohlbecker
      <plugin>
180
        <groupId>org.apache.maven.plugins</groupId>
181
        <artifactId>maven-enforcer-plugin</artifactId>
182
        <version>3.0.0-M2</version>
183
        <executions>
184
          <execution>
185
            <id>enforce</id>
186
            <configuration>
187
              <fail>true</fail>
188
              <skip>false</skip>
189
              <rules>
190 9b599c40 jenkins
                <dependencyConvergence />
191 0722cc46 jenkins
                <requireMavenVersion>
192 bdda8f90 Andreas Kohlbecker
                  <version>[3.6.0,)</version>
193
                </requireMavenVersion>
194
              </rules>
195
            </configuration>
196
            <goals>
197
              <goal>enforce</goal>
198 0722cc46 jenkins
            
199
            
200 72018033 jenkins
            
201
            
202 75f03e56 jenkins
            
203
            
204 bdda8f90 Andreas Kohlbecker
              <!-- Binds by default to the lifecycle phase: validate -->
205
            </goals>
206
          </execution>
207
        </executions>
208
      </plugin>
209 a21bc8ed Cherian Mathew
    </plugins>
210 0d55ceae jenkins
    <extensions>
211 a21bc8ed Cherian Mathew
      <extension>
212
        <groupId>org.apache.maven.wagon</groupId>
213
        <artifactId>wagon-scm</artifactId>
214 583ec5f9 Andreas Kohlbecker
        <version>2.10</version>
215 a21bc8ed Cherian Mathew
      </extension>
216
      <extension>
217
        <groupId>org.apache.maven.wagon</groupId>
218
        <artifactId>wagon-ssh</artifactId>
219 583ec5f9 Andreas Kohlbecker
        <version>2.10</version>
220 a21bc8ed Cherian Mathew
      </extension>
221
      <extension>
222
        <groupId>org.apache.maven.wagon</groupId>
223
        <artifactId>wagon-ssh-external</artifactId>
224 583ec5f9 Andreas Kohlbecker
        <version>2.10</version>
225 a21bc8ed Cherian Mathew
      </extension>
226
    </extensions>
227
  </build>
228
</project>