Project

General

Profile

Download (7.37 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 6769fd63 jenkins
  <version>4.3.0-SNAPSHOT</version>
7 a21bc8ed Cherian Mathew
  <packaging>war</packaging>
8
  <name>CDM Webapp</name>
9
  <properties>
10 304b03cc jenkins
    <cdmlib.version>4.3.0-SNAPSHOT</cdmlib.version>
11
    <cdm.vaadin.version>4.3.0-SNAPSHOT</cdm.vaadin.version>
12 a21bc8ed Cherian Mathew
  </properties>
13
  <repositories>
14
    <!-- the cdm internal repository -->
15
    <repository>
16
      <id>EditRepository</id>
17
      <url>http://wp5.e-taxonomy.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
      <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 0d55ceae jenkins
  <dependencies>
62
    <dependency>
63
      <groupId>eu.etaxonomy</groupId>
64 f56be808 Cherian Mathew
      <artifactId>cdmlib-remote-webapp</artifactId>
65 b3984db7 Andreas Kohlbecker
      <version>${cdmlib.version}</version>
66 f56be808 Cherian Mathew
      <type>war</type>
67
    </dependency>
68 0d55ceae jenkins
    <dependency>
69
      <groupId>eu.etaxonomy</groupId>
70
      <artifactId>cdm-vaadin</artifactId>
71
      <version>${cdm.vaadin.version}</version>
72 f56be808 Cherian Mathew
      <type>war</type>
73 0d55ceae jenkins
    </dependency>
74
  </dependencies>
75 a21bc8ed Cherian Mathew
  <build>
76
    <plugins>
77
      <plugin>
78
        <groupId>org.apache.maven.plugins</groupId>
79
        <artifactId>maven-war-plugin</artifactId>
80 18679cd8 Andreas Kohlbecker
        <version>2.6</version>
81 a21bc8ed Cherian Mathew
        <configuration>
82
          <webResources>
83
            <resource>
84
              <!-- this is relative to the pom.xml directory -->
85 39c0adc4 Cherian Mathew
              <directory>${project.build.directory}/dependency/cdm-vaadin</directory>
86 a21bc8ed Cherian Mathew
            </resource>
87
            <resource>
88
              <!-- this is relative to the pom.xml directory -->
89 39c0adc4 Cherian Mathew
              <directory>${project.build.directory}/dependency/cdmlib-remote-webapp</directory>
90 a21bc8ed Cherian Mathew
            </resource>
91
          </webResources>
92
        </configuration>
93
      </plugin>
94 0d55ceae jenkins
      <!-- 
95 f3d07c11 Andreas Kohlbecker
        
96 a1056a0c Andreas Kohlbecker
        when executing the mvn deploy directly (not via jgit-flow *-finish) unpacked war
97
        resources are accumulating and must be deleted before entering the prepare-package
98
        life cycle phase, therefore configuring this auto-clean makes a lot of sense.
99 f3d07c11 Andreas Kohlbecker
        
100 a1056a0c Andreas Kohlbecker
        BUT the auto-clean is causing problems with the jgit-flow plugin,
101
        it is called twice and thus removes the cdm-webapp-x.x.x.war after it has been build,
102
        maven then fails with : "The packaging for this project did not assign a file to the build artifact"
103
        Therefore this is disabled! 
104 f3d07c11 Andreas Kohlbecker
        
105 20b683b4 Andreas Kohlbecker
        A possible solution to this is to bind define a special auto-clean execution to the prepare-package phase,
106
        as long as this plugin is defined before the maven-dependency-plugin the clean should only
107
        happen before the unpack, see http://www.mkyong.com/maven/maven-plugin-execution-order-in-same-phase/
108
        Maybe it makes sense to define a fileset that only includes the unpacked war files  
109
        
110 39c0adc4 Cherian Mathew
      <plugin>
111
        <groupId>org.apache.maven.plugins</groupId>
112
        <artifactId>maven-clean-plugin</artifactId>
113
        <version>2.5</version>
114
        <executions>
115
          <execution>
116
            <id>auto-clean</id>
117
            <phase>initialize</phase>
118
            <goals>
119
              <goal>clean</goal>
120
            </goals>
121
          </execution>
122
        </executions>
123
      </plugin>
124 f3d07c11 Andreas Kohlbecker
        -->
125 a21bc8ed Cherian Mathew
      <plugin>
126
        <groupId>org.apache.maven.plugins</groupId>
127
        <artifactId>maven-dependency-plugin</artifactId>
128 18679cd8 Andreas Kohlbecker
        <version>2.10</version>
129 a21bc8ed Cherian Mathew
        <executions>
130
          <execution>
131
            <id>unpack</id>
132
            <phase>prepare-package</phase>
133
            <goals>
134
              <goal>unpack</goal>
135
            </goals>
136
            <configuration>
137
              <artifactItems>
138
                <artifactItem>
139
                  <groupId>eu.etaxonomy</groupId>
140
                  <artifactId>cdm-vaadin</artifactId>
141
                  <version>${cdm.vaadin.version}</version>
142
                  <type>war</type>
143
                  <overWrite>true</overWrite>
144 39c0adc4 Cherian Mathew
                  <outputDirectory>${project.build.directory}/dependency/cdm-vaadin</outputDirectory>
145 6e90836d Andreas Kohlbecker
                  <excludes>META-INF/**,WEB-INF/classes/log4j.properties</excludes>
146 a21bc8ed Cherian Mathew
                </artifactItem>
147
                <artifactItem>
148
                  <groupId>eu.etaxonomy</groupId>
149
                  <artifactId>cdmlib-remote-webapp</artifactId>
150 b3984db7 Andreas Kohlbecker
                  <version>${cdmlib.version}</version>
151 a21bc8ed Cherian Mathew
                  <type>war</type>
152
                  <overWrite>true</overWrite>
153 39c0adc4 Cherian Mathew
                  <outputDirectory>${project.build.directory}/dependency/cdmlib-remote-webapp</outputDirectory>
154 a21bc8ed Cherian Mathew
                </artifactItem>
155
              </artifactItems>
156
              <overWriteReleases>false</overWriteReleases>
157
              <overWriteSnapshots>true</overWriteSnapshots>
158
            </configuration>
159
          </execution>
160
        </executions>
161
      </plugin>
162 0d55ceae jenkins
      <plugin>
163 f2608024 Andreas Kohlbecker
        <groupId>external.atlassian.jgitflow</groupId>
164
        <artifactId>jgitflow-maven-plugin</artifactId>
165 4d13b80c Andreas Kohlbecker
        <version>1.0-m6</version>
166 f2608024 Andreas Kohlbecker
        <configuration>
167
          <pushHotfixes>true</pushHotfixes>
168 4d13b80c Andreas Kohlbecker
          <pushReleases>true</pushReleases>
169 f2608024 Andreas Kohlbecker
          <enableSshAgent>true</enableSshAgent>
170
          <allowSnapshots>true</allowSnapshots>
171
          <allowUntracked>true</allowUntracked>
172
        </configuration>
173
        <dependencies>
174
          <!-- 
175
                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
176
                in order have ssl key exchange algorithms compatible with openssh 6.7 
177
             -->
178
          <dependency>
179
            <groupId>com.jcraft</groupId>
180
            <artifactId>jsch</artifactId>
181
            <version>0.1.53</version>
182
          </dependency>
183
        </dependencies>
184
      </plugin>
185 a21bc8ed Cherian Mathew
    </plugins>
186 0d55ceae jenkins
    <extensions>
187 a21bc8ed Cherian Mathew
      <extension>
188
        <groupId>org.apache.maven.wagon</groupId>
189
        <artifactId>wagon-scm</artifactId>
190
        <version>1.0-beta-6</version>
191
      </extension>
192
      <extension>
193
        <groupId>org.apache.maven.wagon</groupId>
194
        <artifactId>wagon-ssh</artifactId>
195
        <version>1.0-beta-6</version>
196
      </extension>
197
      <extension>
198
        <groupId>org.apache.maven.wagon</groupId>
199
        <artifactId>wagon-ssh-external</artifactId>
200
        <version>1.0-beta-6</version>
201
      </extension>
202
    </extensions>
203
  </build>
204
</project>