Skip to content

Commit

Permalink
add mvn wrapper and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Aug 16, 2024
1 parent 6998f93 commit b7ec041
Show file tree
Hide file tree
Showing 16 changed files with 199 additions and 43 deletions.
9 changes: 9 additions & 0 deletions online_bontique_demo/adService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,13 @@

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
22 changes: 22 additions & 0 deletions online_bontique_demo/cartService/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the demo Dockerfile for the generated template project, please change accordingly before building image from it.
# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest .
FROM openjdk:17-jdk-alpine

# Set the working directory to /build
WORKDIR /build
COPY . /build

RUN chmod +x ../mvnw
RUN ./mvnw clean package -U -DskipTests

# JAR file will be specified by passing in a build time argument to docker build
ARG APP_FILE

# Remember to change the port according to the RPC protocol you select
EXPOSE 8082

# copy the JAR file into the root and rename
RUN cp ./target/${APP_FILE} app.jar

# Run java with the jar file when the container starts up
CMD ["java","-jar","app.jar"]
9 changes: 9 additions & 0 deletions online_bontique_demo/cartService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,13 @@

</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
22 changes: 22 additions & 0 deletions online_bontique_demo/checkoutService/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the demo Dockerfile for the generated template project, please change accordingly before building image from it.
# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest .
FROM openjdk:17-jdk-alpine

# Set the working directory to /build
WORKDIR /build
COPY . /build

RUN chmod +x ../mvnw
RUN ./mvnw clean package -U -DskipTests

# JAR file will be specified by passing in a build time argument to docker build
ARG APP_FILE

# Remember to change the port according to the RPC protocol you select
EXPOSE 8083

# copy the JAR file into the root and rename
RUN cp ./target/${APP_FILE} app.jar

# Run java with the jar file when the container starts up
CMD ["java","-jar","app.jar"]
9 changes: 9 additions & 0 deletions online_bontique_demo/checkoutService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
22 changes: 22 additions & 0 deletions online_bontique_demo/currencyService/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the demo Dockerfile for the generated template project, please change accordingly before building image from it.
# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest .
FROM openjdk:17-jdk-alpine

# Set the working directory to /build
WORKDIR /build
COPY . /build

RUN chmod +x ../mvnw
RUN ./mvnw clean package -U -DskipTests

# JAR file will be specified by passing in a build time argument to docker build
ARG APP_FILE

# Remember to change the port according to the RPC protocol you select
EXPOSE 8084

# copy the JAR file into the root and rename
RUN cp ./target/${APP_FILE} app.jar

# Run java with the jar file when the container starts up
CMD ["java","-jar","app.jar"]
10 changes: 9 additions & 1 deletion online_bontique_demo/currencyService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-nacos-spring-boot-starter</artifactId>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
22 changes: 22 additions & 0 deletions online_bontique_demo/emailService/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the demo Dockerfile for the generated template project, please change accordingly before building image from it.
# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest .
FROM openjdk:17-jdk-alpine

# Set the working directory to /build
WORKDIR /build
COPY . /build

RUN chmod +x ../mvnw
RUN ./mvnw clean package -U -DskipTests

# JAR file will be specified by passing in a build time argument to docker build
ARG APP_FILE

# Remember to change the port according to the RPC protocol you select
EXPOSE 8085

# copy the JAR file into the root and rename
RUN cp ./target/${APP_FILE} app.jar

# Run java with the jar file when the container starts up
CMD ["java","-jar","app.jar"]
9 changes: 9 additions & 0 deletions online_bontique_demo/emailService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
7 changes: 7 additions & 0 deletions online_bontique_demo/frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@
</compilerArgs>
</configuration>
</plugin>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>



</project>
22 changes: 22 additions & 0 deletions online_bontique_demo/frontend/src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the demo Dockerfile for the generated template project, please change accordingly before building image from it.
# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest .
FROM openjdk:17-jdk-alpine

# Set the working directory to /build
WORKDIR /build
COPY . /build

RUN chmod +x ../mvnw
RUN ./mvnw clean package -U -DskipTests

# JAR file will be specified by passing in a build time argument to docker build
ARG APP_FILE

# Remember to change the port according to the RPC protocol you select
EXPOSE 8084

# copy the JAR file into the root and rename
RUN cp ./target/${APP_FILE} app.jar

# Run java with the jar file when the container starts up
CMD ["java","-jar","app.jar"]
9 changes: 9 additions & 0 deletions online_bontique_demo/paymentService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
41 changes: 0 additions & 41 deletions online_bontique_demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,48 +112,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<eclipse>
<file>/home/heliang/Code/online_bontique_demo/code-style.xml</file>
</eclipse>
<licenseHeader>
<file>/home/heliang/Code/online_bontique_demo/license-header</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<encoding>UTF-8</encoding>
<nrOfIndentSpace>4</nrOfIndentSpace>
<keepBlankLines>true</keepBlankLines>
<indentBlankLines>false</indentBlankLines>
<indentSchemaLocation>true</indentSchemaLocation>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<sortModules>false</sortModules>
<sortExecutions>false</sortExecutions>
<predefinedSortOrder>custom_1</predefinedSortOrder>
<expandEmptyElements>false</expandEmptyElements>
<sortProperties>false</sortProperties>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<goals>
<goal>apply</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>

</plugins>

</pluginManagement>
</build>

Expand Down
10 changes: 9 additions & 1 deletion online_bontique_demo/productCatalogsService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-nacos-spring-boot-starter</artifactId>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions online_bontique_demo/recommendationService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
10 changes: 10 additions & 0 deletions online_bontique_demo/shippingService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,14 @@
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

0 comments on commit b7ec041

Please sign in to comment.