Project

General

Profile

Download (7.71 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>4.4.0-SNAPSHOT</version>
7
  <packaging>war</packaging>
8
  <name>CDM Webapp</name>
9
  <properties>
10
    <cdmlib.version>4.4.0-SNAPSHOT</cdmlib.version>
11
    <cdm.vaadin.version>4.4.0-SNAPSHOT</cdm.vaadin.version>
12
  </properties>
13
  <repositories>
14
    <!-- the cdm internal repository -->
15
    <repository>
16
      <id>EditRepository</id>
17
      <url>http://wp5.e-taxonomy.eu/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>wp5.e-taxonomy.eu</id>
32
      <name>Edit Maven Repository</name>
33
      <url>scpexe://wp5.e-taxonomy.eu/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>cdm-vaadin</artifactId>
65
      <version>${cdm.vaadin.version}</version>
66
      <type>war</type>
67
    </dependency>
68
    <dependency>
69
      <groupId>eu.etaxonomy</groupId>
70
      <artifactId>cdmlib-remote-webapp</artifactId>
71
      <version>${cdmlib.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>2.6</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
            -->
94
            <overlay>
95
              <groupId>eu.etaxonomy</groupId>
96
              <artifactId>cdm-vaadin</artifactId>
97
            </overlay>
98
            <overlay>
99
              <groupId>eu.etaxonomy</groupId>
100
              <artifactId>cdmlib-remote-webapp</artifactId>
101
            </overlay>
102
          </overlays>
103
        </configuration>
104
      </plugin>
105
      <!-- 
106
        
107
        when executing the mvn deploy directly (not via jgit-flow *-finish) unpacked war
108
        resources are accumulating and must be deleted before entering the prepare-package
109
        life cycle phase, therefore configuring this auto-clean makes a lot of sense.
110
        
111
        BUT the auto-clean is causing problems with the jgit-flow plugin,
112
        it is called twice and thus removes the cdm-webapp-x.x.x.war after it has been build,
113
        maven then fails with : "The packaging for this project did not assign a file to the build artifact"
114
        Therefore this is disabled! 
115
        
116
        A possible solution to this is to bind define a special auto-clean execution to the prepare-package phase,
117
        as long as this plugin is defined before the maven-dependency-plugin the clean should only
118
        happen before the unpack, see http://www.mkyong.com/maven/maven-plugin-execution-order-in-same-phase/
119
        Maybe it makes sense to define a fileset that only includes the unpacked war files  
120
        
121
      <plugin>
122
        <groupId>org.apache.maven.plugins</groupId>
123
        <artifactId>maven-clean-plugin</artifactId>
124
        <version>2.5</version>
125
        <executions>
126
          <execution>
127
            <id>auto-clean</id>
128
            <phase>initialize</phase>
129
            <goals>
130
              <goal>clean</goal>
131
            </goals>
132
          </execution>
133
        </executions>
134
      </plugin>
135
        -->
136
        <!-- 
137
      <plugin>
138
        <groupId>org.apache.maven.plugins</groupId>
139
        <artifactId>maven-dependency-plugin</artifactId>
140
        <version>2.10</version>
141
        <executions>
142
          <execution>
143
            <id>unpack</id>
144
            <phase>prepare-package</phase>
145
            <goals>
146
              <goal>unpack</goal>
147
            </goals>
148
            <configuration>
149
              <artifactItems>
150
                <artifactItem>
151
                  <groupId>eu.etaxonomy</groupId>
152
                  <artifactId>cdm-vaadin</artifactId>
153
                  <version>${cdm.vaadin.version}</version>
154
                  <type>war</type>
155
                  <overWrite>true</overWrite>
156
                  <outputDirectory>${project.build.directory}/dependency/cdm-vaadin</outputDirectory>
157
                  <excludes>META-INF/**,WEB-INF/classes/log4j.properties</excludes>
158
                </artifactItem>
159
                <artifactItem>
160
                  <groupId>eu.etaxonomy</groupId>
161
                  <artifactId>cdmlib-remote-webapp</artifactId>
162
                  <version>${cdmlib.version}</version>
163
                  <type>war</type>
164
                  <overWrite>true</overWrite>
165
                  <outputDirectory>${project.build.directory}/dependency/cdmlib-remote-webapp</outputDirectory>
166
                </artifactItem>
167
              </artifactItems>
168
              <overWriteReleases>false</overWriteReleases>
169
              <overWriteSnapshots>true</overWriteSnapshots>
170
            </configuration>
171
          </execution>
172
        </executions>
173
      </plugin>
174
       -->
175
      <plugin>
176
        <groupId>external.atlassian.jgitflow</groupId>
177
        <artifactId>jgitflow-maven-plugin</artifactId>
178
        <version>1.0-m6</version>
179
        <configuration>
180
          <pushHotfixes>true</pushHotfixes>
181
          <pushReleases>true</pushReleases>
182
          <enableSshAgent>true</enableSshAgent>
183
          <allowSnapshots>true</allowSnapshots>
184
          <allowUntracked>true</allowUntracked>
185
        </configuration>
186
        <dependencies>
187
          <!-- 
188
                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
189
                in order have ssl key exchange algorithms compatible with openssh 6.7 
190
             -->
191
          <dependency>
192
            <groupId>com.jcraft</groupId>
193
            <artifactId>jsch</artifactId>
194
            <version>0.1.53</version>
195
          </dependency>
196
        </dependencies>
197
      </plugin>
198
    </plugins>
199
    <extensions>
200
      <extension>
201
        <groupId>org.apache.maven.wagon</groupId>
202
        <artifactId>wagon-scm</artifactId>
203
        <version>1.0-beta-6</version>
204
      </extension>
205
      <extension>
206
        <groupId>org.apache.maven.wagon</groupId>
207
        <artifactId>wagon-ssh</artifactId>
208
        <version>1.0-beta-6</version>
209
      </extension>
210
      <extension>
211
        <groupId>org.apache.maven.wagon</groupId>
212
        <artifactId>wagon-ssh-external</artifactId>
213
        <version>1.0-beta-6</version>
214
      </extension>
215
    </extensions>
216
  </build>
217
</project>
(3-3/3)