Skip to content

Commit 3f3f9e6

Browse files
committed
Maven packaging profiles.
Fixed line endings for distribution packages. Dependencies updated.
1 parent 9d976fd commit 3f3f9e6

File tree

7 files changed

+171
-28
lines changed

7 files changed

+171
-28
lines changed

pom.xml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4343
<product.vendor>jKool, LLC</product.vendor>
4444

45-
<project.java.version>1.7</project.java.version>
45+
<project.java.version>1.8</project.java.version>
4646
<java.source.version>${project.java.version}</java.source.version>
4747
<java.target.version>${project.java.version}</java.target.version>
4848
<java.compiler.version>${project.java.version}</java.compiler.version>
@@ -54,10 +54,16 @@
5454
<release.deploy.dir>../build/${release.deploy.name}</release.deploy.dir>
5555
<release.deploy.finalName>${release.deploy.name}-${project.version}</release.deploy.finalName>
5656
<release.deploy.zip.assembly>src/assembly/zipDeployAssembly.xml</release.deploy.zip.assembly>
57+
<release.deploy.gz.assembly>src/assembly/gzDeployAssembly.xml</release.deploy.gz.assembly>
5758
<release.deploy.dir.assembly>src/assembly/dirDeployAssembly.xml</release.deploy.dir.assembly>
5859

59-
<skipTests>true</skipTests>
60-
<gpg.skip.sign>true</gpg.skip.sign>
60+
<assembly.line.endings>unix</assembly.line.endings>
61+
62+
<skip.source.pack>true</skip.source.pack>
63+
<skip.javadoc.pack>true</skip.javadoc.pack>
64+
<skip.assembly.pack>true</skip.assembly.pack>
65+
<skip.gpg.sign>true</skip.gpg.sign>
66+
6167
<build.assemblies.attach>false</build.assemblies.attach>
6268
</properties>
6369

@@ -102,7 +108,7 @@
102108
<dependency>
103109
<groupId>org.jboss.resteasy</groupId>
104110
<artifactId>resteasy-client</artifactId>
105-
<version>3.0.26.Final</version>
111+
<version>4.1.1.Final</version>
106112
</dependency>
107113
<!-- https://mvnrepository.com/artifact/io.swagger/swagger-annotations -->
108114
<dependency>
@@ -123,13 +129,42 @@
123129
</dependency>
124130
</dependencies>
125131

132+
<profiles>
133+
<profile>
134+
<id>win-ln</id>
135+
<activation>
136+
<os>
137+
<family>windows</family>
138+
</os>
139+
</activation>
140+
<properties>
141+
<assembly.line.endings>crlf</assembly.line.endings>
142+
</properties>
143+
</profile>
144+
145+
<profile>
146+
<id>pack-bin</id>
147+
<properties>
148+
<skip.assembly.pack>false</skip.assembly.pack>
149+
</properties>
150+
</profile>
151+
<profile>
152+
<id>pack-all</id>
153+
<properties>
154+
<skip.source.pack>false</skip.source.pack>
155+
<skip.javadoc.pack>false</skip.javadoc.pack>
156+
<skip.assembly.pack>false</skip.assembly.pack>
157+
</properties>
158+
</profile>
159+
</profiles>
160+
126161
<build>
127162
<defaultGoal>clean install</defaultGoal>
128163
<plugins>
129164
<plugin>
130165
<groupId>org.apache.maven.plugins</groupId>
131166
<artifactId>maven-compiler-plugin</artifactId>
132-
<version>3.8.0</version>
167+
<version>3.8.1</version>
133168
<configuration>
134169
<verbose>${java.compiler.verbose}</verbose>
135170
<compilerVersion>${java.compiler.version}</compilerVersion>
@@ -142,7 +177,10 @@
142177
<plugin>
143178
<groupId>org.apache.maven.plugins</groupId>
144179
<artifactId>maven-source-plugin</artifactId>
145-
<version>3.0.1</version>
180+
<version>3.1.0</version>
181+
<configuration>
182+
<skipSource>${skip.source.pack}</skipSource>
183+
</configuration>
146184
<executions>
147185
<execution>
148186
<id>attach-sources</id>
@@ -159,10 +197,11 @@
159197
<configuration>
160198
<failOnError>false</failOnError>
161199
<doclint>all</doclint>
200+
<skip>${skip.javadoc.pack}</skip>
162201
</configuration>
163202
<executions>
164203
<execution>
165-
<id>attach-javadocs</id>
204+
<id>build-javadocs-module</id>
166205
<goals>
167206
<goal>jar</goal>
168207
</goals>
@@ -173,6 +212,9 @@
173212
<groupId>org.apache.maven.plugins</groupId>
174213
<artifactId>maven-assembly-plugin</artifactId>
175214
<version>3.1.0</version>
215+
<configuration>
216+
<skipAssembly>${skip.assembly.pack}</skipAssembly>
217+
</configuration>
176218
<executions>
177219
<execution>
178220
<id>deploy-assembly</id>
@@ -185,6 +227,7 @@
185227
<descriptors>
186228
<descriptor>${release.deploy.dir.assembly}</descriptor>
187229
<descriptor>${release.deploy.zip.assembly}</descriptor>
230+
<descriptor>${release.deploy.gz.assembly}</descriptor>
188231
</descriptors>
189232
<attach>${build.assemblies.attach}</attach>
190233
<outputDirectory>${release.deploy.dir}</outputDirectory>
@@ -209,7 +252,7 @@
209252
<plugin>
210253
<groupId>org.apache.maven.plugins</groupId>
211254
<artifactId>maven-jar-plugin</artifactId>
212-
<version>3.1.0</version>
255+
<version>3.1.2</version>
213256
<configuration>
214257
<archive>
215258
<!--<index>true</index>-->
@@ -229,16 +272,16 @@
229272
<groupId>org.apache.maven.plugins</groupId>
230273
<artifactId>maven-gpg-plugin</artifactId>
231274
<version>1.6</version>
275+
<configuration>
276+
<skip>${skip.gpg.sign}</skip>
277+
</configuration>
232278
<executions>
233279
<execution>
234280
<id>sign-artifacts</id>
235281
<phase>verify</phase>
236282
<goals>
237283
<goal>sign</goal>
238284
</goals>
239-
<configuration>
240-
<skip>${gpg.skip.sign}</skip>
241-
</configuration>
242285
</execution>
243286
</executions>
244287
</plugin>
@@ -249,4 +292,4 @@
249292
</plugin>
250293
</plugins>
251294
</build>
252-
</project>
295+
</project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component xmlns="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0 http://maven.apache.org/xsd/assembly-component-2.0.0.xsd">
4+
<dependencySets>
5+
<dependencySet>
6+
<useProjectArtifact>false</useProjectArtifact>
7+
<useTransitiveDependencies>true</useTransitiveDependencies>
8+
<outputDirectory>lib</outputDirectory>
9+
<unpack>false</unpack>
10+
</dependencySet>
11+
</dependencySets>
12+
13+
<fileSets>
14+
<!-- user defined property files -->
15+
<fileSet>
16+
<directory>.</directory>
17+
<includes>
18+
<include>cmd.properties</include>
19+
</includes>
20+
<outputDirectory></outputDirectory>
21+
<lineEnding>${assembly.line.endings}</lineEnding>
22+
</fileSet>
23+
<!-- static content -->
24+
<fileSet>
25+
<directory>.</directory>
26+
<includes>
27+
<include>README*</include>
28+
<include>LICENSE*</include>
29+
<include>NOTICE*</include>
30+
</includes>
31+
<outputDirectory></outputDirectory>
32+
<lineEnding>${assembly.line.endings}</lineEnding>
33+
</fileSet>
34+
<fileSet>
35+
<directory>${project.build.directory}</directory>
36+
<includes>
37+
<include>*.jar</include>
38+
</includes>
39+
<outputDirectory></outputDirectory>
40+
</fileSet>
41+
</fileSets>
42+
</component>
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<component xmlns="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0 http://maven.apache.org/xsd/assembly-component-2.0.0.xsd">
4+
<dependencySets>
5+
<dependencySet>
6+
<useProjectArtifact>false</useProjectArtifact>
7+
<useTransitiveDependencies>true</useTransitiveDependencies>
8+
<outputDirectory>lib</outputDirectory>
9+
<unpack>false</unpack>
10+
</dependencySet>
11+
</dependencySets>
12+
413
<fileSets>
514
<!-- user defined property files -->
615
<fileSet>
@@ -9,16 +18,18 @@
918
<include>cmd.properties</include>
1019
</includes>
1120
<outputDirectory></outputDirectory>
21+
<lineEnding>unix</lineEnding>
1222
</fileSet>
1323
<!-- static content -->
1424
<fileSet>
1525
<directory>.</directory>
1626
<includes>
17-
<include>LICENSE*</include>
1827
<include>README*</include>
28+
<include>LICENSE*</include>
1929
<include>NOTICE*</include>
2030
</includes>
2131
<outputDirectory></outputDirectory>
32+
<lineEnding>unix</lineEnding>
2233
</fileSet>
2334
<fileSet>
2435
<directory>${project.build.directory}</directory>
@@ -28,12 +39,4 @@
2839
<outputDirectory></outputDirectory>
2940
</fileSet>
3041
</fileSets>
31-
<dependencySets>
32-
<dependencySet>
33-
<useProjectArtifact>false</useProjectArtifact>
34-
<useTransitiveDependencies>true</useTransitiveDependencies>
35-
<outputDirectory>lib</outputDirectory>
36-
<unpack>false</unpack>
37-
</dependencySet>
38-
</dependencySets>
3942
</component>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component xmlns="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY-COMPONENT/2.0.0 http://maven.apache.org/xsd/assembly-component-2.0.0.xsd">
4+
<dependencySets>
5+
<dependencySet>
6+
<useProjectArtifact>false</useProjectArtifact>
7+
<useTransitiveDependencies>true</useTransitiveDependencies>
8+
<outputDirectory>lib</outputDirectory>
9+
<unpack>false</unpack>
10+
</dependencySet>
11+
</dependencySets>
12+
13+
<fileSets>
14+
<!-- user defined property files -->
15+
<fileSet>
16+
<directory>.</directory>
17+
<includes>
18+
<include>cmd.properties</include>
19+
</includes>
20+
<outputDirectory></outputDirectory>
21+
<lineEnding>crlf</lineEnding>
22+
</fileSet>
23+
<!-- static content -->
24+
<fileSet>
25+
<directory>.</directory>
26+
<includes>
27+
<include>README*</include>
28+
<include>LICENSE*</include>
29+
<include>NOTICE*</include>
30+
</includes>
31+
<outputDirectory></outputDirectory>
32+
<lineEnding>${assembly.line.endings}</lineEnding>
33+
</fileSet>
34+
<fileSet>
35+
<directory>crlf</directory>
36+
<includes>
37+
<include>*.jar</include>
38+
</includes>
39+
<outputDirectory></outputDirectory>
40+
</fileSet>
41+
</fileSets>
42+
</component>

src/assembly/dirDeployAssembly.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
2+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
4+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
55
<id>${project.build.finalName}-dir_deploy</id>
66
<formats>
77
<format>dir</format>
88
</formats>
99
<includeBaseDirectory>false</includeBaseDirectory>
1010
<baseDirectory>${release.deploy.finalName}</baseDirectory>
1111
<componentDescriptors>
12-
<componentDescriptor>src/assembly/deployComponent.xml</componentDescriptor>
12+
<componentDescriptor>src/assembly/deployComponentDir.xml</componentDescriptor>
1313
</componentDescriptors>
1414
</assembly>

src/assembly/gzDeployAssembly.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
5+
<id>${project.build.finalName}-gz_deploy</id>
6+
<formats>
7+
<format>tar.gz</format>
8+
</formats>
9+
<includeBaseDirectory>true</includeBaseDirectory>
10+
<baseDirectory>${release.deploy.finalName}</baseDirectory>
11+
<componentDescriptors>
12+
<componentDescriptor>src/assembly/deployComponentUnix.xml</componentDescriptor>
13+
</componentDescriptors>
14+
</assembly>

src/assembly/zipDeployAssembly.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
2+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
4+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
55
<id>${project.build.finalName}-zip_deploy</id>
66
<formats>
77
<format>zip</format>
8-
<format>tar.gz</format>
98
</formats>
109
<includeBaseDirectory>true</includeBaseDirectory>
1110
<baseDirectory>${release.deploy.finalName}</baseDirectory>
1211
<componentDescriptors>
13-
<componentDescriptor>src/assembly/deployComponent.xml</componentDescriptor>
12+
<componentDescriptor>src/assembly/deployComponentWin.xml</componentDescriptor>
1413
</componentDescriptors>
1514
</assembly>

0 commit comments

Comments
 (0)