Skip to content

Commit 70f5865

Browse files
author
Francisco Solis
committed
Updated Maven Compiler Plugin Configuration
1 parent bad1974 commit 70f5865

File tree

2 files changed

+64
-62
lines changed

2 files changed

+64
-62
lines changed

dependency-reduced-pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
<plugins>
2020
<plugin>
2121
<artifactId>maven-compiler-plugin</artifactId>
22-
<version>3.7.0</version>
22+
<version>3.8.1</version>
2323
<configuration>
24+
<proc>none</proc>
2425
<source>${java.version}</source>
2526
<target>${java.version}</target>
2627
</configuration>

pom.xml

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,68 @@
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
</properties>
1818

19+
<build>
20+
<finalName>${project.artifactId}</finalName>
21+
<sourceDirectory>src/main/java</sourceDirectory>
22+
<testSourceDirectory>src/test/java</testSourceDirectory>
23+
<defaultGoal>clean package test</defaultGoal>
24+
<plugins>
25+
<plugin>
26+
<groupId>org.apache.maven.plugins</groupId>
27+
<artifactId>maven-compiler-plugin</artifactId>
28+
<version>3.8.1</version>
29+
<configuration>
30+
<proc>none</proc>
31+
<source>${java.version}</source>
32+
<target>${java.version}</target>
33+
</configuration>
34+
</plugin>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-shade-plugin</artifactId>
38+
<version>3.1.0</version>
39+
<executions>
40+
<execution>
41+
<phase>package</phase>
42+
<goals>
43+
<goal>shade</goal>
44+
</goals>
45+
<configuration>
46+
<createDependencyReducedPom>true</createDependencyReducedPom>
47+
<minimizeJar>false</minimizeJar>
48+
<relocations>
49+
<relocation>
50+
<pattern>com.google.gson</pattern>
51+
<shadedPattern>xyz.theprogramsrc.supercoreapi.google.gson</shadedPattern>
52+
</relocation>
53+
<relocation>
54+
<pattern>org.apache.commons.codec</pattern>
55+
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.codec</shadedPattern>
56+
</relocation>
57+
<relocation>
58+
<pattern>org.apache.commons.io</pattern>
59+
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.io</shadedPattern>
60+
</relocation>
61+
</relocations>
62+
</configuration>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<!-- Unit Testing -->
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-surefire-plugin</artifactId>
70+
<version>2.22.1</version>
71+
</plugin>
72+
</plugins>
73+
<resources>
74+
<resource>
75+
<directory>src/main/resources</directory>
76+
<filtering>true</filtering>
77+
</resource>
78+
</resources>
79+
</build>
80+
1981
<distributionManagement>
2082
<repository>
2183
<id>theprogramsrc-releases</id>
@@ -155,65 +217,4 @@
155217
<scope>test</scope>
156218
</dependency>
157219
</dependencies>
158-
159-
<build>
160-
<finalName>${project.artifactId}</finalName>
161-
<sourceDirectory>src/main/java</sourceDirectory>
162-
<testSourceDirectory>src/test/java</testSourceDirectory>
163-
<defaultGoal>clean package test</defaultGoal>
164-
<plugins>
165-
<plugin>
166-
<groupId>org.apache.maven.plugins</groupId>
167-
<artifactId>maven-compiler-plugin</artifactId>
168-
<version>3.8.1</version>
169-
<configuration>
170-
<source>${java.version}</source>
171-
<target>${java.version}</target>
172-
</configuration>
173-
</plugin>
174-
<plugin>
175-
<groupId>org.apache.maven.plugins</groupId>
176-
<artifactId>maven-shade-plugin</artifactId>
177-
<version>3.1.0</version>
178-
<executions>
179-
<execution>
180-
<phase>package</phase>
181-
<goals>
182-
<goal>shade</goal>
183-
</goals>
184-
<configuration>
185-
<createDependencyReducedPom>true</createDependencyReducedPom>
186-
<minimizeJar>false</minimizeJar>
187-
<relocations>
188-
<relocation>
189-
<pattern>com.google.gson</pattern>
190-
<shadedPattern>xyz.theprogramsrc.supercoreapi.google.gson</shadedPattern>
191-
</relocation>
192-
<relocation>
193-
<pattern>org.apache.commons.codec</pattern>
194-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.codec</shadedPattern>
195-
</relocation>
196-
<relocation>
197-
<pattern>org.apache.commons.io</pattern>
198-
<shadedPattern>xyz.theprogramsrc.supercoreapi.apache.commons.io</shadedPattern>
199-
</relocation>
200-
</relocations>
201-
</configuration>
202-
</execution>
203-
</executions>
204-
</plugin>
205-
<!-- Unit Testing -->
206-
<plugin>
207-
<groupId>org.apache.maven.plugins</groupId>
208-
<artifactId>maven-surefire-plugin</artifactId>
209-
<version>2.22.1</version>
210-
</plugin>
211-
</plugins>
212-
<resources>
213-
<resource>
214-
<directory>src/main/resources</directory>
215-
<filtering>true</filtering>
216-
</resource>
217-
</resources>
218-
</build>
219220
</project>

0 commit comments

Comments
 (0)