mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:25:50 +00:00
Check code build
This commit is contained in:
parent
4dc3f05a4d
commit
3f9b3aa215
6 changed files with 79 additions and 13 deletions
0
.dockerenv
Executable file
0
.dockerenv
Executable file
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Stage 1: Build Stage
|
||||
FROM maven:3.9.4-eclipse-temurin-17 AS build
|
||||
|
||||
# Set the working directory inside the build stage
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the Maven project files to the build stage
|
||||
COPY pom.xml .
|
||||
COPY src ./src
|
||||
|
||||
# Build the project and create the jar
|
||||
RUN mvn clean package -DskipTests
|
||||
|
||||
# Stage 2: Runtime Stage
|
||||
FROM openjdk:17-alpine
|
||||
|
||||
# Set the working directory inside the runtime stage
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the built jar from the build stage
|
||||
COPY --from=build /app/target/spring-petclinic-4.0.2-SNAPSHOT.jar /app/
|
||||
|
||||
# Command to run the application
|
||||
CMD ["java", "-jar", "spring-petclinic-4.0.2-SNAPSHOT.jar"]
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
mysql:
|
||||
image: mysql:9.1
|
||||
ports:
|
||||
|
|
32
pom.xml
32
pom.xml
|
@ -9,11 +9,23 @@
|
|||
<relativePath />
|
||||
</parent>
|
||||
|
||||
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>nexus-snapshots</id>
|
||||
<url>http://localhost:8081/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>nexus-releases</id>
|
||||
<url>http://localhost:8081/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:Piasecki-grid/maven-project.git</connection>
|
||||
<connection>scm:git:git@github.com:Piasecki-grid/maven-project.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:Piasecki-grid/maven-project.git</developerConnection>
|
||||
<url>https://github.com/Piasecki-grid/maven-project</url>
|
||||
<tag>HEAD</tag>
|
||||
|
||||
</scm>
|
||||
<groupId>org.springframework.samples</groupId>
|
||||
<artifactId>spring-petclinic</artifactId>
|
||||
|
@ -48,6 +60,12 @@
|
|||
|
||||
<dependencies>
|
||||
<!-- Spring and Spring Boot dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.sonatype.nexus.maven</groupId>
|
||||
<artifactId>nexus-common</artifactId>
|
||||
<version>1.6.13</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
|
@ -158,6 +176,11 @@
|
|||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -317,6 +340,11 @@
|
|||
</licenses>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-group</id>
|
||||
<url>http://localhost:8081/repository/maven-central/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
|
|
|
@ -6,17 +6,18 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<relativePath></relativePath>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:Piasecki-grid/maven-project.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:Piasecki-grid/maven-project.git</developerConnection>
|
||||
<url>https://github.com/Piasecki-grid/maven-project</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<groupId>org.springframework.samples</groupId>
|
||||
<artifactId>spring-petclinic</artifactId>
|
||||
<version>3.4.0-SNAPSHOT</version>
|
||||
<version>4.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>petclinic</name>
|
||||
|
||||
|
@ -28,7 +29,7 @@
|
|||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set
|
||||
-DnewVersion=... -->
|
||||
<project.build.outputTimestamp>2024-11-28T14:37:52Z</project.build.outputTimestamp>
|
||||
<project.build.outputTimestamp>2025-01-04T17:55:21Z</project.build.outputTimestamp>
|
||||
|
||||
<!-- Web dependencies -->
|
||||
<webjars-locator.version>1.0.1</webjars-locator.version>
|
||||
|
@ -165,9 +166,14 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<serverId>github</serverId>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>prepare</goal>
|
||||
<goal>perform</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
|
@ -428,7 +434,7 @@
|
|||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
|
@ -441,7 +447,7 @@
|
|||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
|
@ -454,7 +460,7 @@
|
|||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#release configuration
|
||||
#Sat Jan 04 19:33:45 CET 2025
|
||||
completedPhase=check-poms
|
||||
#Sat Jan 04 19:35:46 CET 2025
|
||||
completedPhase=end-release
|
||||
exec.pomFileName=pom.xml
|
||||
exec.snapshotReleasePluginAllowed=false
|
||||
pinExternals=false
|
||||
preparationGoals=clean verify
|
||||
project.dev.org.springframework.samples\:spring-petclinic=4.0.2-SNAPSHOT
|
||||
project.rel.org.springframework.samples\:spring-petclinic=4.0.1
|
||||
project.scm.org.springframework.samples\:spring-petclinic.connection=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
||||
project.scm.org.springframework.samples\:spring-petclinic.developerConnection=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
||||
project.scm.org.springframework.samples\:spring-petclinic.tag=HEAD
|
||||
|
@ -19,5 +21,6 @@ scm.commentPrefix=[maven-release-plugin]
|
|||
scm.developmentCommitComment=@{prefix} prepare for next development iteration
|
||||
scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
|
||||
scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
|
||||
scm.tag=spring-petclinic-4.0.1
|
||||
scm.tagNameFormat=@{project.artifactId}-@{project.version}
|
||||
scm.url=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
||||
|
|
Loading…
Reference in a new issue