File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ RUN mvn compile assembly:single
3131FROM adoptopenjdk/openjdk11:alpine
3232
3333# Copy the jar to the production image from the builder stage.
34- COPY --from=builder /app/target/hello-broken- *dependencies.jar /hello-broken .jar
34+ COPY --from=builder /app/target/hello-*dependencies.jar /service .jar
3535
3636# Run the web service on container startup.
37- CMD ["java" ,"-jar" ,"/hello-broken .jar" ]
37+ CMD ["java" ,"-jar" ,"/service .jar" ]
3838# [END run_broken_dockerfile]
Original file line number Diff line number Diff line change @@ -27,10 +27,11 @@ limitations under the License.
2727 </parent >
2828 <properties >
2929 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
30- <maven .compiler.source>11</maven .compiler.source>
3130 <maven .compiler.target>11</maven .compiler.target>
31+ <maven .compiler.source>11</maven .compiler.source>
3232 </properties >
3333 <dependencies >
34+ <!-- [START run_broken_service_dep] -->
3435 <dependency >
3536 <groupId >com.sparkjava</groupId >
3637 <artifactId >spark-core</artifactId >
@@ -51,6 +52,7 @@ limitations under the License.
5152 <artifactId >slf4j-simple</artifactId >
5253 <version >1.6.4</version >
5354 </dependency >
55+ <!-- [END run_broken_service_dep] -->
5456 <dependency >
5557 <groupId >junit</groupId >
5658 <artifactId >junit</artifactId >
@@ -64,11 +66,16 @@ limitations under the License.
6466 <scope >test</scope >
6567 </dependency >
6668 </dependencies >
69+ <!-- [START run_broken_service_build] -->
6770 <build >
6871 <plugins >
6972 <plugin >
7073 <artifactId >maven-compiler-plugin</artifactId >
7174 <version >3.8.0</version >
75+ <configuration >
76+ <source >11</source >
77+ <target >11</target >
78+ </configuration >
7279 </plugin >
7380 <plugin >
7481 <artifactId >maven-assembly-plugin</artifactId >
@@ -85,4 +92,5 @@ limitations under the License.
8592 </plugin >
8693 </plugins >
8794 </build >
95+ <!-- [END run_broken_service_build] -->
8896</project >
You can’t perform that action at this time.
0 commit comments