File tree Expand file tree Collapse file tree 3 files changed +17
-13
lines changed
frameworks/Java/smart-socket Expand file tree Collapse file tree 3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 125
125
</plugin >
126
126
127
127
<plugin >
128
- <artifactId >maven-assembly-plugin</artifactId >
129
- <version >3.1.0</version >
130
- <configuration >
131
- <descriptorRefs >
132
- <descriptorRef >jar-with-dependencies</descriptorRef >
133
- </descriptorRefs >
134
- </configuration >
128
+ <artifactId >maven-shade-plugin</artifactId >
129
+ <version >3.3.0</version >
135
130
<executions >
136
131
<execution >
137
- <id >make-assembly</id >
138
132
<phase >package</phase >
139
133
<goals >
140
- <goal >single </goal >
134
+ <goal >shade </goal >
141
135
</goals >
136
+ <configuration >
137
+ <createDependencyReducedPom >false</createDependencyReducedPom >
138
+ <transformers >
139
+ <!-- 采用追加的方式 -->
140
+ <transformer
141
+ implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
142
+ <resource >META-INF/services/tech.smartboot.feat.core.apt.AptLoader</resource >
143
+ </transformer >
144
+ </transformers >
145
+ </configuration >
142
146
</execution >
143
147
</executions >
144
148
</plugin >
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ FROM maven:3.9.7-amazoncorretto-21 as maven
2
2
WORKDIR /smart-socket
3
3
COPY pom.xml pom.xml
4
4
COPY src src
5
- RUN mvn install assembly:single -q
5
+ RUN mvn install -q
6
6
7
7
FROM openjdk:21-jdk-slim
8
8
WORKDIR /smart-socket
9
- COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0-jar-with-dependencies .jar app.jar
9
+ COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0.jar app.jar
10
10
11
11
EXPOSE 8080
12
12
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ FROM maven:3.9.7-amazoncorretto-21 as maven
2
2
WORKDIR /smart-socket
3
3
COPY pom.xml pom.xml
4
4
COPY src src
5
- RUN mvn install assembly:single -q
5
+ RUN mvn install -q
6
6
7
7
FROM openjdk:21-jdk-slim
8
8
WORKDIR /smart-socket
9
- COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0-jar-with-dependencies .jar app.jar
9
+ COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0.jar app.jar
10
10
11
11
EXPOSE 8080
12
12
You can’t perform that action at this time.
0 commit comments