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 125125 </plugin >
126126
127127 <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 >
135130 <executions >
136131 <execution >
137- <id >make-assembly</id >
138132 <phase >package</phase >
139133 <goals >
140- <goal >single </goal >
134+ <goal >shade </goal >
141135 </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 >
142146 </execution >
143147 </executions >
144148 </plugin >
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ FROM maven:3.9.7-amazoncorretto-21 as maven
22WORKDIR /smart-socket
33COPY pom.xml pom.xml
44COPY src src
5- RUN mvn install assembly:single -q
5+ RUN mvn install -q
66
77FROM openjdk:21-jdk-slim
88WORKDIR /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
1010
1111EXPOSE 8080
1212
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ FROM maven:3.9.7-amazoncorretto-21 as maven
22WORKDIR /smart-socket
33COPY pom.xml pom.xml
44COPY src src
5- RUN mvn install assembly:single -q
5+ RUN mvn install -q
66
77FROM openjdk:21-jdk-slim
88WORKDIR /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
1010
1111EXPOSE 8080
1212
You can’t perform that action at this time.
0 commit comments