mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 12:45:48 +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:
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:9.1
|
image: mysql:9.1
|
||||||
ports:
|
ports:
|
||||||
|
|
30
pom.xml
30
pom.xml
|
@ -9,11 +9,23 @@
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</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>
|
<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>
|
<developerConnection>scm:git:git@github.com:Piasecki-grid/maven-project.git</developerConnection>
|
||||||
<url>https://github.com/Piasecki-grid/maven-project</url>
|
<url>https://github.com/Piasecki-grid/maven-project</url>
|
||||||
<tag>HEAD</tag>
|
|
||||||
</scm>
|
</scm>
|
||||||
<groupId>org.springframework.samples</groupId>
|
<groupId>org.springframework.samples</groupId>
|
||||||
<artifactId>spring-petclinic</artifactId>
|
<artifactId>spring-petclinic</artifactId>
|
||||||
|
@ -48,6 +60,12 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Spring and Spring Boot dependencies -->
|
<!-- Spring and Spring Boot dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.sonatype.nexus.maven</groupId>
|
||||||
|
<artifactId>nexus-common</artifactId>
|
||||||
|
<version>1.6.13</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
@ -158,6 +176,11 @@
|
||||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.scm</groupId>
|
||||||
|
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -317,6 +340,11 @@
|
||||||
</licenses>
|
</licenses>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven-group</id>
|
||||||
|
<url>http://localhost:8081/repository/maven-central/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
|
|
|
@ -6,17 +6,18 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>3.4.0</version>
|
||||||
<relativePath></relativePath>
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<scm>
|
<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>
|
<developerConnection>scm:git:git@github.com:Piasecki-grid/maven-project.git</developerConnection>
|
||||||
<url>https://github.com/Piasecki-grid/maven-project</url>
|
<url>https://github.com/Piasecki-grid/maven-project</url>
|
||||||
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
<groupId>org.springframework.samples</groupId>
|
<groupId>org.springframework.samples</groupId>
|
||||||
<artifactId>spring-petclinic</artifactId>
|
<artifactId>spring-petclinic</artifactId>
|
||||||
<version>3.4.0-SNAPSHOT</version>
|
<version>4.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>petclinic</name>
|
<name>petclinic</name>
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set
|
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set
|
||||||
-DnewVersion=... -->
|
-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 -->
|
<!-- Web dependencies -->
|
||||||
<webjars-locator.version>1.0.1</webjars-locator.version>
|
<webjars-locator.version>1.0.1</webjars-locator.version>
|
||||||
|
@ -165,9 +166,14 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
<configuration>
|
<executions>
|
||||||
<serverId>github</serverId>
|
<execution>
|
||||||
</configuration>
|
<goals>
|
||||||
|
<goal>prepare</goal>
|
||||||
|
<goal>perform</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -428,7 +434,7 @@
|
||||||
</goals>
|
</goals>
|
||||||
</pluginExecutionFilter>
|
</pluginExecutionFilter>
|
||||||
<action>
|
<action>
|
||||||
<ignore></ignore>
|
<ignore />
|
||||||
</action>
|
</action>
|
||||||
</pluginExecution>
|
</pluginExecution>
|
||||||
<pluginExecution>
|
<pluginExecution>
|
||||||
|
@ -441,7 +447,7 @@
|
||||||
</goals>
|
</goals>
|
||||||
</pluginExecutionFilter>
|
</pluginExecutionFilter>
|
||||||
<action>
|
<action>
|
||||||
<ignore></ignore>
|
<ignore />
|
||||||
</action>
|
</action>
|
||||||
</pluginExecution>
|
</pluginExecution>
|
||||||
<pluginExecution>
|
<pluginExecution>
|
||||||
|
@ -454,7 +460,7 @@
|
||||||
</goals>
|
</goals>
|
||||||
</pluginExecutionFilter>
|
</pluginExecutionFilter>
|
||||||
<action>
|
<action>
|
||||||
<ignore></ignore>
|
<ignore />
|
||||||
</action>
|
</action>
|
||||||
</pluginExecution>
|
</pluginExecution>
|
||||||
</pluginExecutions>
|
</pluginExecutions>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#release configuration
|
#release configuration
|
||||||
#Sat Jan 04 19:33:45 CET 2025
|
#Sat Jan 04 19:35:46 CET 2025
|
||||||
completedPhase=check-poms
|
completedPhase=end-release
|
||||||
exec.pomFileName=pom.xml
|
exec.pomFileName=pom.xml
|
||||||
exec.snapshotReleasePluginAllowed=false
|
exec.snapshotReleasePluginAllowed=false
|
||||||
pinExternals=false
|
pinExternals=false
|
||||||
preparationGoals=clean verify
|
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.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.developerConnection=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
||||||
project.scm.org.springframework.samples\:spring-petclinic.tag=HEAD
|
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.developmentCommitComment=@{prefix} prepare for next development iteration
|
||||||
scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
|
scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
|
||||||
scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
|
scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
|
||||||
|
scm.tag=spring-petclinic-4.0.1
|
||||||
scm.tagNameFormat=@{project.artifactId}-@{project.version}
|
scm.tagNameFormat=@{project.artifactId}-@{project.version}
|
||||||
scm.url=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
scm.url=scm\:git\:git@github.com\:Piasecki-grid/maven-project.git
|
||||||
|
|
Loading…
Reference in a new issue