added cleanup tasks after bundle jre
[taxeditor.git] / eu.etaxonomy.taxeditor / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <parent>
4 <groupId>eu.etaxonomy</groupId>
5 <artifactId>taxeditor-parent</artifactId>
6 <version>3.5.0-SNAPSHOT</version>
7 </parent>
8
9 <modelVersion>4.0.0</modelVersion>
10 <artifactId>eu.etaxonomy.taxeditor</artifactId>
11 <packaging>eclipse-repository</packaging>
12
13 <name>EDIT Taxonomic Editor Product</name>
14 <description>The EDIT Taxonomic Desktop Editor</description>
15 <url>http://wp5.e-taxonomy.eu/taxeditor</url>
16 <properties>
17 <jre.vm>-vm jre/bin</jre.vm>
18 <product.id>eu.etaxonomy.taxeditor.product</product.id>
19 </properties>
20 <build>
21 <plugins>
22 <plugin>
23 <groupId>org.eclipse.tycho</groupId>
24 <artifactId>tycho-p2-director-plugin</artifactId>
25 <version>${tycho.version}</version>
26 <executions>
27 <execution>
28 <id>materialize-products</id>
29 <goals>
30 <goal>materialize-products</goal>
31 </goals>
32 </execution>
33 <execution>
34 <id>archive-products</id>
35 <goals>
36 <goal>archive-products</goal>
37 </goals>
38 </execution>
39 </executions>
40 <configuration>
41 <products>
42 <product>
43 <id>${product.id}</id>
44 <rootFolder>EDIT Taxonomic Editor</rootFolder>
45 </product>
46 </products>
47 </configuration>
48 </plugin>
49 </plugins>
50 </build>
51 <profiles>
52 <profile>
53 <id>signJars</id>
54 <build>
55 <plugins>
56 <plugin>
57 <groupId>org.apache.maven.plugins</groupId>
58 <artifactId>maven-jarsigner-plugin</artifactId>
59 <version>1.3.2</version>
60 <configuration>
61 <alias>editor</alias>
62 <removeExistingSignatures>true</removeExistingSignatures>
63 <!-- keystore properties should be set in the ~/.m2/settings.xml -->
64 <keystore>${keystore.path}</keystore>
65 <storepass>${keystore.store.password}</storepass>
66 <keypass>${keystore.key.password}</keypass>
67
68 <archiveDirectory>${project.build.directory}/repository</archiveDirectory>
69 <!-- Following two settings are to ensure that the product
70 .zip files are not signed -->
71 <processMainArtifact>false</processMainArtifact>
72 <processAttachedArtifacts>false</processAttachedArtifacts>
73 <includes>
74 <include>plugins/eu.etaxonomy.taxeditor*.jar</include>
75 <include>features/eu.etaxonomy.taxeditor*.jar</include>
76 </includes>
77 <arguments>
78 <!-- Due to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=378155
79 we need to force the signature / digest algorithm to SHA1 since this is the
80 only one which plays well with Eclipse 3.x -->
81 <argument>-sigalg</argument>
82 <argument>SHA1withDSA</argument>
83 <argument>-digestalg</argument>
84 <argument>SHA1</argument>
85 </arguments>
86 </configuration>
87 <executions>
88 <execution>
89 <id>sign</id>
90 <goals>
91 <goal>sign</goal>
92 </goals>
93 </execution>
94 </executions>
95 </plugin>
96 </plugins>
97 </build>
98 </profile>
99 <profile>
100 <!-- Upload the repo to the server -->
101 <!-- ATTENTION : This does not work well currently since the file permissions
102 are set with read permission set to off after upload -->
103 <id>uploadRepo</id>
104 <build>
105 <plugins>
106 <plugin>
107 <groupId>org.codehaus.mojo</groupId>
108 <artifactId>wagon-maven-plugin</artifactId>
109 <version>1.0-beta-3</version>
110 <!-- Problems with the wagon-maven-plugin have been encounterd
111 on Windows, it should work properly on linux though. -->
112 <executions>
113 <execution>
114 <phase>package</phase>
115 <goals>
116 <goal>upload</goal>
117 </goals>
118 </execution>
119 </executions>
120 <configuration>
121 <fromDir>${project.build.directory}/repository</fromDir>
122 <url>scpexe://wp5.e-taxonomy.eu/var/www/download/taxeditor/update/${update.dir}</url>
123 <includes>
124 binary/*,content.jar,artifacts.jar,**/eu.etaxonomy.*.jar
125 </includes>
126 <!-- Comment out the above and uncomment the below to upload
127 all jars -->
128 <!-- <includes>**/*</includes> -->
129 <serverId>wp5.e-taxonomy.eu</serverId>
130 </configuration>
131 </plugin>
132 </plugins>
133 </build>
134 </profile>
135 <profile>
136 <!-- Configures the editor to lanuch using the packaged jre by adding
137 the '-vm jre/bin' option the eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product -->
138 <id>bundleJre</id>
139 <build>
140 <plugins>
141 <plugin>
142 <groupId>org.apache.maven.plugins</groupId>
143 <artifactId>maven-antrun-plugin</artifactId>
144 <version>1.8</version>
145 <executions>
146 <execution>
147 <id>setProductWithJRE</id>
148 <phase>validate</phase>
149 <configuration>
150 <target>
151 <copy overwrite="true" force="true"
152 file="${basedir}/eu.etaxonomy.taxeditor.product.with.jre"
153 tofile="${basedir}/eu.etaxonomy.taxeditor.product" />
154 </target>
155 </configuration>
156 <goals>
157 <goal>run</goal>
158 </goals>
159 </execution>
160 <execution>
161 <id>setProductWithoutJRE</id>
162 <phase>clean</phase>
163 <configuration>
164 <target>
165 <copy overwrite="true" force="true"
166 file="${basedir}/eu.etaxonomy.taxeditor.product.wo.jre"
167 tofile="${basedir}/eu.etaxonomy.taxeditor.product" />
168 </target>
169 </configuration>
170 <goals>
171 <goal>run</goal>
172 </goals>
173 </execution>
174 </executions>
175 </plugin>
176 </plugins>
177 </build>
178 </profile>
179 </profiles>
180
181 </project>