-
Notifications
You must be signed in to change notification settings - Fork 1
/
pom.xml
284 lines (231 loc) · 8.69 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) Aros Bio AB.
CPSign is an Open Source Software that is dual licensed to allow you to choose a license that best suits your requirements:
1) GPLv3 (GNU General Public License Version 3) with Additional Terms, including an attribution clause as well as a limitation to use the software for commercial purposes.
2) CPSign Proprietary License that allows you to use CPSign for commercial activities, such as in a revenue-generating operation or environment, or integrate CPSign in your proprietary software without worrying about disclosing the source code of your proprietary software, which is required if you choose to use the software under GPLv3 license. See arosbio.com/cpsign/commercial-license for details.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.arosbio</groupId>
<artifactId>parent</artifactId>
<version>2.0.0-rc6</version>
</parent>
<artifactId>cpsign</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<description>CPSign main project, including chemistry and the CLI application</description>
<packaging>jar</packaging>
<properties>
<!-- Here setting the names during the package phase - as we're both building a thin and fat jar -->
<thin.final.name>${project.artifactId}-${project.version}.jar</thin.final.name>
<!-- The name of the final 'fat jar' (excluding .jar as the shade plugin adds it by default) -->
<fat.final.name>${project.artifactId}-${project.version}-fatjar</fat.final.name>
<main.class>com.arosbio.cpsign.app.CPSignApp</main.class>
<parent.basedir>${project.basedir}/..</parent.basedir>
</properties>
<profiles>
<!-- Building the thin jar (maven central repo) -->
<profile>
<id>thinjar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${jar.plugin.version}</version>
<configuration>
<archive>
<manifest>
<mainClass>${main.class}</mainClass>
</manifest>
<manifestEntries>
<Implementation-Title>Aros Bio ${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor-Id>${mf.impl.vendor}</Implementation-Vendor-Id>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Building the fat jar (GitHub release) -->
<profile>
<id>fatjar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${fat.final.name}</finalName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<!-- FILTERS -->
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>header.txt</exclude>
<exclude>jena-*</exclude>
<exclude>log4j.properties</exclude>
</excludes>
</filter>
</filters>
<transformers>
<!-- Handles the external third party licenses -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>${main.class}</Main-Class>
<Implementation-Title>Aros Bio ${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor-Id>${mf.impl.vendor}</Implementation-Vendor-Id>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
<!-- Manually add the CPSign license file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/LICENSE.txt</resource>
<file>${parent.basedir}/license/META-INF/LICENSE.txt</file>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- now make the jar chmod +x style executable -->
<plugin>
<groupId>org.skife.maven</groupId>
<artifactId>really-executable-jar-maven-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- apparently need to add the build directory for this plugin to find it -->
<inputFile>${project.build.directory}/${fat.final.name}.jar</inputFile>
<!-- value of flags will be interpolated into the java invocation -->
<!-- as "java $flags -jar ..." -->
<!-- <flags>-Xmx1G</flags> -->
<!-- (optional) name for a file that will define what script gets -->
<!-- embedded into the executable jar. This can be used to -->
<!-- override the default startup script which is -->
<!-- `#!/bin/sh -->
<!-- -->
<!-- exec java " + flags + " -jar "$0" "$@" -->
<!-- <scriptFile>src/packaging/someScript.extension</scriptFile> -->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>really-executable-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${parent.basedir}/license</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<!-- For testing -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.plugin.version}</version>
<executions>
<!-- CLI TESTS -->
<execution>
<id>cli</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<groups>${test.pkg}.CLITest</groups>
<excludedGroups>${test.pkg}.NonSuiteTest,${test.pkg}.UnitTest,${test.pkg}.PerformanceTest</excludedGroups>
<skip>${maven.test.skip}</skip>
</configuration>
</execution>
</executions>
<!-- General config -->
<configuration>
<skip>true</skip>
<failIfNoTests>false</failIfNoTests>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
<argLine>-Xmx2048m</argLine>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.arosbio</groupId>
<artifactId>cpsign-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
</dependency>
<dependency>
<groupId>com.arosbio</groupId>
<artifactId>test-utils</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.arosbio</groupId>
<artifactId>confai</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.arosbio</groupId>
<artifactId>cpsign-api</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</project>