File tree Expand file tree Collapse file tree 2 files changed +36
-25
lines changed Expand file tree Collapse file tree 2 files changed +36
-25
lines changed Original file line number Diff line number Diff line change 1
- FROM maven:3.5-jdk-8-alpine as build
2
- WORKDIR /app
3
- COPY ./ /app
4
- RUN mvn install -q && \
5
- mvn package -q && \
6
- ls /app/target/ && \
7
- MVN_VERSION=$(mvn -q \
8
- -Dexec.executable="echo" \
9
- -Dexec.args='${project.version}' \
10
- --non-recursive \
11
- org.codehaus.mojo:exec-maven-plugin:1.6.0:exec) && \
12
- mv /app/target/openapi-diff-${MVN_VERSION}-jar-with-dependencies.jar /app/openapi-diff.jar
1
+ FROM openjdk:8-jdk-alpine AS build
2
+ WORKDIR /build
3
+ COPY ./ /build
4
+ RUN ./mvnw -V -B -ff -P cli package -q
13
5
14
6
FROM openjdk:8-jre-alpine
15
7
WORKDIR /app
16
- COPY --from=0 /app/ openapi-diff.jar /app
8
+ COPY --from=build /build/target/ openapi-diff-jar-with-dependencies .jar /app/openapi-diff.jar
17
9
ENTRYPOINT ["java" , "-jar" , "/app/openapi-diff.jar" ]
18
10
CMD ["--help" ]
Original file line number Diff line number Diff line change 172
172
</plugins >
173
173
</build >
174
174
</profile >
175
+ <profile >
176
+ <id >cli</id >
177
+ <properties >
178
+ <maven .javadoc.skip>true</maven .javadoc.skip>
179
+ <maven .source.skip>true</maven .source.skip>
180
+ </properties >
181
+ <build >
182
+ <plugins >
183
+ <plugin >
184
+ <groupId >org.apache.maven.plugins</groupId >
185
+ <artifactId >maven-assembly-plugin</artifactId >
186
+ <version >3.2.0</version >
187
+ <configuration >
188
+ <descriptorRefs >
189
+ <descriptorRef >jar-with-dependencies</descriptorRef >
190
+ </descriptorRefs >
191
+ <finalName >${project.artifactId} </finalName >
192
+ </configuration >
193
+ <executions >
194
+ <execution >
195
+ <id >make-assembly</id >
196
+ <phase >package</phase >
197
+ <goals >
198
+ <goal >single</goal >
199
+ </goals >
200
+ </execution >
201
+ </executions >
202
+ </plugin >
203
+ </plugins >
204
+ </build >
205
+ </profile >
175
206
</profiles >
176
207
<build >
177
208
<plugins >
233
264
<mainClass >com.qdesrame.openapi.diff.Main</mainClass >
234
265
</manifest >
235
266
</archive >
236
- <descriptorRefs >
237
- <descriptorRef >jar-with-dependencies</descriptorRef >
238
- </descriptorRefs >
239
267
</configuration >
240
- <executions >
241
- <execution >
242
- <id >make-assembly</id >
243
- <phase >package</phase >
244
- <goals >
245
- <goal >single</goal >
246
- </goals >
247
- </execution >
248
- </executions >
249
268
</plugin >
250
269
<plugin >
251
270
<groupId >org.apache.maven.plugins</groupId >
You can’t perform that action at this time.
0 commit comments