Skip to content

Commit 69ec049

Browse files
committed
Update uberjar profile
1 parent 0b8ea3d commit 69ec049

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

pom.xml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<dependency>
3939
<groupId>org.slf4j</groupId>
4040
<artifactId>slf4j-jdk14</artifactId>
41+
<scope>test</scope>
4142
</dependency>
4243

4344
<dependency>
@@ -62,13 +63,12 @@
6263
<scope>import</scope>
6364
</dependency>
6465

66+
<!-- Test dependencies -->
6567
<dependency>
6668
<groupId>org.slf4j</groupId>
6769
<artifactId>slf4j-jdk14</artifactId>
6870
<version>${slf4j.version}</version>
6971
</dependency>
70-
71-
<!-- Test dependencies -->
7272
<dependency>
7373
<groupId>org.junit.jupiter</groupId>
7474
<artifactId>junit-jupiter-params</artifactId>
@@ -77,6 +77,21 @@
7777
</dependencies>
7878
</dependencyManagement>
7979

80+
<profiles>
81+
<profile>
82+
<id>uberjar</id>
83+
<build>
84+
<plugins>
85+
<!-- Uber JAR creation -->
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-shade-plugin</artifactId>
89+
</plugin>
90+
</plugins>
91+
</build>
92+
</profile>
93+
</profiles>
94+
8095
<build>
8196
<resources>
8297
<resource>
@@ -85,12 +100,6 @@
85100
</resource>
86101
</resources>
87102
<plugins>
88-
<!-- Uber JAR creation -->
89-
<plugin>
90-
<groupId>org.apache.maven.plugins</groupId>
91-
<artifactId>maven-shade-plugin</artifactId>
92-
</plugin>
93-
94103
<!-- Code Coverage report generation -->
95104
<plugin>
96105
<groupId>org.jacoco</groupId>
@@ -101,9 +110,9 @@
101110
<pluginManagement>
102111
<plugins>
103112
<plugin>
113+
<groupId>org.apache.maven.plugins</groupId>
104114
<artifactId>maven-surefire-plugin</artifactId>
105-
<version>3.0.0-M9</version>
106-
115+
<version>3.0.0</version>
107116
<configuration>
108117
<environmentVariables>
109118
<TESTCONTAINERS_REUSE_ENABLE>true</TESTCONTAINERS_REUSE_ENABLE>
@@ -131,10 +140,13 @@
131140
<artifactId>maven-shade-plugin</artifactId>
132141
<version>3.4.0</version>
133142
<configuration>
143+
<minimizeJar>true</minimizeJar>
134144
<shadedArtifactAttached>true</shadedArtifactAttached>
145+
<shadedClassifierName>full</shadedClassifierName>
135146
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
136-
<shadedClassifierName>shaded</shadedClassifierName>
137-
<createDependencyReducedPom>false</createDependencyReducedPom>
147+
<createDependencyReducedPom>true</createDependencyReducedPom>
148+
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
149+
138150
<transformers>
139151
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
140152
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
@@ -169,24 +181,6 @@
169181
<exclude>META-INF/*.RSA</exclude>
170182
</excludes>
171183
</filter>
172-
<filter>
173-
<artifact>com.yandex.cloud:java-genproto</artifact>
174-
<includes>
175-
<include>yandex/cloud/api/*.class</include>
176-
<include>yandex/cloud/api/iam/**</include>
177-
</includes>
178-
</filter>
179-
<filter>
180-
<artifact>tech.ydb:ydb-proto-api</artifact>
181-
<includes>
182-
<include>tech/ydb/*.class</include>
183-
<include>tech/ydb/common/**</include>
184-
<include>tech/ydb/discovery/**</include>
185-
<include>tech/ydb/formats/**</include>
186-
<include>tech/ydb/table/**</include>
187-
<include>tech/ydb/scheme/**</include>
188-
</includes>
189-
</filter>
190184
</filters>
191185
</configuration>
192186
<executions>

0 commit comments

Comments
 (0)