This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 818afc49f [#4690]use profile to replace mixin-maven-plugin (#4711)
818afc49f is described below
commit 818afc49f90bcf8a59a62cd4339d597bbd28f478
Author: liubao68 <[email protected]>
AuthorDate: Mon Feb 10 14:05:32 2025 +0800
[#4690]use profile to replace mixin-maven-plugin (#4711)
---
demo/demo-consul/consumer/pom.xml | 46 ++++++-
demo/demo-consul/gateway/pom.xml | 46 ++++++-
demo/demo-consul/provider/pom.xml | 52 ++++++-
demo/demo-crossapp/crossapp-client/pom.xml | 90 ++++++++++--
demo/demo-crossapp/crossapp-server/pom.xml | 56 +++++---
demo/demo-edge/authentication/pom.xml | 56 +++++---
demo/demo-edge/business-1-1-0/pom.xml | 56 +++++---
demo/demo-edge/business-1.0.0/pom.xml | 56 +++++---
demo/demo-edge/business-2.0.0/pom.xml | 56 +++++---
demo/demo-edge/consumer/pom.xml | 214 +++++++++++++++++++++++++++--
demo/demo-edge/edge-service/pom.xml | 56 +++++---
demo/demo-etcd/consumer/pom.xml | 62 ++++++---
demo/demo-etcd/gateway/pom.xml | 62 ++++++---
demo/demo-etcd/provider/pom.xml | 62 ++++++---
demo/demo-nacos/consumer/pom.xml | 56 +++++---
demo/demo-nacos/gateway/pom.xml | 56 +++++---
demo/demo-nacos/provider/pom.xml | 56 +++++---
demo/demo-pojo/pojo-server/pom.xml | 59 +++++---
demo/demo-zookeeper/consumer/pom.xml | 62 ++++++---
demo/demo-zookeeper/gateway/pom.xml | 62 ++++++---
demo/demo-zookeeper/provider/pom.xml | 62 ++++++---
demo/pom.xml | 99 ++++---------
22 files changed, 1090 insertions(+), 392 deletions(-)
diff --git a/demo/demo-consul/consumer/pom.xml
b/demo/demo-consul/consumer/pom.xml
index ce11fa144..48fe65a1b 100644
--- a/demo/demo-consul/consumer/pom.xml
+++ b/demo/demo-consul/consumer/pom.xml
@@ -52,19 +52,51 @@
<profiles>
<profile>
<id>docker</id>
- <properties>
- <build.enable.docker.image>true</build.enable.docker.image>
- </properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-consul/gateway/pom.xml b/demo/demo-consul/gateway/pom.xml
index c21ce220d..708792e05 100644
--- a/demo/demo-consul/gateway/pom.xml
+++ b/demo/demo-consul/gateway/pom.xml
@@ -55,19 +55,51 @@
<profiles>
<profile>
<id>docker</id>
- <properties>
- <build.enable.docker.image>true</build.enable.docker.image>
- </properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-consul/provider/pom.xml
b/demo/demo-consul/provider/pom.xml
index 0b862228c..1636940be 100644
--- a/demo/demo-consul/provider/pom.xml
+++ b/demo/demo-consul/provider/pom.xml
@@ -60,21 +60,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
- <properties>
- <build.enable.docker.image>true</build.enable.docker.image>
- </properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-crossapp/crossapp-client/pom.xml
b/demo/demo-crossapp/crossapp-client/pom.xml
index c67cb1755..652245759 100644
--- a/demo/demo-crossapp/crossapp-client/pom.xml
+++ b/demo/demo-crossapp/crossapp-client/pom.xml
@@ -42,24 +42,88 @@
<demo.service.name>crossapp-server</demo.service.name>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>servicecomb/service-center</name>
+ <alias>service-center</alias>
+ <run>
+ <wait>
+ <log>server is ready</log>
+ <tcp>
+ <ports>
+ <port>30100</port>
+ </ports>
+ </tcp>
+ <time>60000</time>
+ </wait>
+ <ports>
+ <port>30100:30100</port>
+ </ports>
+ </run>
+ </image>
+ <image>
+ <name>${demo.service.name}:${project.version}</name>
+ <alias>${demo.service.name}</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/${demo.service.name}-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>ServiceComb is ready</log>
+ <tcp>
+ <ports>
+ <port>8080</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>7070:7070</port>
+ <port>8080:8080</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-crossapp/crossapp-server/pom.xml
b/demo/demo-crossapp/crossapp-server/pom.xml
index e6f0fefed..f09bb9f31 100644
--- a/demo/demo-crossapp/crossapp-server/pom.xml
+++ b/demo/demo-crossapp/crossapp-server/pom.xml
@@ -47,28 +47,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/authentication/pom.xml
b/demo/demo-edge/authentication/pom.xml
index 5edd0dbea..b925f4d4d 100644
--- a/demo/demo-edge/authentication/pom.xml
+++ b/demo/demo-edge/authentication/pom.xml
@@ -43,28 +43,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/business-1-1-0/pom.xml
b/demo/demo-edge/business-1-1-0/pom.xml
index 9186d30df..a6b386c9d 100644
--- a/demo/demo-edge/business-1-1-0/pom.xml
+++ b/demo/demo-edge/business-1-1-0/pom.xml
@@ -49,28 +49,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/business-1.0.0/pom.xml
b/demo/demo-edge/business-1.0.0/pom.xml
index 62619c775..37e74d493 100644
--- a/demo/demo-edge/business-1.0.0/pom.xml
+++ b/demo/demo-edge/business-1.0.0/pom.xml
@@ -51,28 +51,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/business-2.0.0/pom.xml
b/demo/demo-edge/business-2.0.0/pom.xml
index 841eb1521..b18f156f1 100644
--- a/demo/demo-edge/business-2.0.0/pom.xml
+++ b/demo/demo-edge/business-2.0.0/pom.xml
@@ -51,28 +51,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/consumer/pom.xml b/demo/demo-edge/consumer/pom.xml
index 0cd698cc8..b98756836 100644
--- a/demo/demo-edge/consumer/pom.xml
+++ b/demo/demo-edge/consumer/pom.xml
@@ -47,24 +47,212 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>servicecomb/service-center</name>
+ <alias>service-center</alias>
+ <run>
+ <wait>
+ <log>server is ready</log>
+ <tcp>
+ <ports>
+ <port>30100</port>
+ </ports>
+ </tcp>
+ <time>60000</time>
+ </wait>
+ <ports>
+ <port>30100:30100</port>
+ </ports>
+ </run>
+ </image>
+ <image>
+ <name>authentication:${project.version}</name>
+ <alias>authentication</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/authentication-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>ServiceComb is ready</log>
+ <tcp>
+ <ports>
+ <port>7070</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>7070:7070</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ <image>
+ <name>business-1-0-0:${project.version}</name>
+ <alias>business-1-0-0</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/business-1-0-0-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>ServiceComb is ready</log>
+ <tcp>
+ <ports>
+ <port>8080</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>8080:8080</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ <image>
+ <name>business-1-1-0:${project.version}</name>
+ <alias>business-1-1-0</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/business-1-1-0-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>ServiceComb is ready</log>
+ <tcp>
+ <ports>
+ <port>8090</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>8090:8090</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ <image>
+ <name>business-2-0-0:${project.version}</name>
+ <alias>business-2-0-0</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/business-2-0-0-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>Register microservice instance success</log>
+ <tcp>
+ <ports>
+ <port>8091</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>8091:8091</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ <image>
+ <name>edge-service:${project.version}</name>
+ <alias>edge-service</alias>
+ <run>
+ <env>
+ <JAVA_OPTS>
+
-Dservicecomb.registry.sc.address=http://sc.servicecomb.io:30100
+ </JAVA_OPTS>
+
<JAR_PATH>/maven/maven/edge-service-${project.version}.jar</JAR_PATH>
+ </env>
+ <links>
+ <link>service-center:sc.servicecomb.io</link>
+ </links>
+ <wait>
+ <log>Register microservice instance success</log>
+ <!--
+ the log waiting of the plugin has a bug and fails
frequently
+ refer to
https://github.com/fabric8io/docker-maven-plugin/issues/767
+ this http checking is used as a temporary solution
+ -->
+ <tcp>
+ <ports>
+ <port>18090</port>
+ </ports>
+ </tcp>
+ <time>120000</time>
+ </wait>
+ <ports>
+ <port>18090:18090</port>
+ </ports>
+ <dependsOn>
+ <container>service-center</container>
+ </dependsOn>
+ </run>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-run-config-edge</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/edge-service/pom.xml
b/demo/demo-edge/edge-service/pom.xml
index c827fb8b7..9c48d93d9 100644
--- a/demo/demo-edge/edge-service/pom.xml
+++ b/demo/demo-edge/edge-service/pom.xml
@@ -49,28 +49,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-etcd/consumer/pom.xml b/demo/demo-etcd/consumer/pom.xml
index 0c9ed7794..8951a8460 100644
--- a/demo/demo-etcd/consumer/pom.xml
+++ b/demo/demo-etcd/consumer/pom.xml
@@ -60,31 +60,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-etcd/gateway/pom.xml b/demo/demo-etcd/gateway/pom.xml
index 9bed75de8..e4188fe58 100644
--- a/demo/demo-etcd/gateway/pom.xml
+++ b/demo/demo-etcd/gateway/pom.xml
@@ -59,31 +59,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-etcd/provider/pom.xml b/demo/demo-etcd/provider/pom.xml
index cc926bda1..272a6e7f3 100644
--- a/demo/demo-etcd/provider/pom.xml
+++ b/demo/demo-etcd/provider/pom.xml
@@ -69,31 +69,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-nacos/consumer/pom.xml b/demo/demo-nacos/consumer/pom.xml
index f5b2cafa8..bc74f9b40 100644
--- a/demo/demo-nacos/consumer/pom.xml
+++ b/demo/demo-nacos/consumer/pom.xml
@@ -53,28 +53,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-nacos/gateway/pom.xml b/demo/demo-nacos/gateway/pom.xml
index c04739ea5..a6c12eb62 100644
--- a/demo/demo-nacos/gateway/pom.xml
+++ b/demo/demo-nacos/gateway/pom.xml
@@ -56,28 +56,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-nacos/provider/pom.xml b/demo/demo-nacos/provider/pom.xml
index 282f2b032..07d3381d7 100644
--- a/demo/demo-nacos/provider/pom.xml
+++ b/demo/demo-nacos/provider/pom.xml
@@ -57,28 +57,50 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-pojo/pojo-server/pom.xml
b/demo/demo-pojo/pojo-server/pom.xml
index b8c675705..c1c750a00 100644
--- a/demo/demo-pojo/pojo-server/pom.xml
+++ b/demo/demo-pojo/pojo-server/pom.xml
@@ -36,7 +36,9 @@
<properties>
<demo.main>org.apache.servicecomb.demo.pojo.server.PojoServer</demo.main>
+ <build.docker.image.enable>true</build.docker.image.enable>
</properties>
+
<build>
<plugins>
<plugin>
@@ -49,28 +51,51 @@
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-zookeeper/consumer/pom.xml
b/demo/demo-zookeeper/consumer/pom.xml
index 28857551b..d515ccaa7 100644
--- a/demo/demo-zookeeper/consumer/pom.xml
+++ b/demo/demo-zookeeper/consumer/pom.xml
@@ -50,31 +50,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-zookeeper/gateway/pom.xml
b/demo/demo-zookeeper/gateway/pom.xml
index b51d04b7a..1ffb4e92f 100644
--- a/demo/demo-zookeeper/gateway/pom.xml
+++ b/demo/demo-zookeeper/gateway/pom.xml
@@ -53,31 +53,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-zookeeper/provider/pom.xml
b/demo/demo-zookeeper/provider/pom.xml
index d49e354a4..bda558bc6 100644
--- a/demo/demo-zookeeper/provider/pom.xml
+++ b/demo/demo-zookeeper/provider/pom.xml
@@ -62,31 +62,59 @@
</build>
<profiles>
+ <profile>
+ <id>build-docker-image</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
<profile>
<id>docker</id>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>${project.artifactId}:${project.version}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <from>openjdk:17-alpine</from>
+ <ports>
+ <port>7070</port>
+ <port>8080</port>
+ </ports>
+ <assembly>
+ <mode>tar</mode>
+
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
+ </assembly>
+ <entryPoint>
+ <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
+ </entryPoint>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>com.github.odavid.maven.plugins</groupId>
- <artifactId>mixin-maven-plugin</artifactId>
- <configuration>
- <mixins>
- <mixin>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>docker-build-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/pom.xml b/demo/pom.xml
index 706e70b4f..5fe99cc27 100644
--- a/demo/pom.xml
+++ b/demo/pom.xml
@@ -184,80 +184,33 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>directories</id>
+ <goals>
+ <goal>directory-of</goal>
+ </goals>
+ <phase>initialize</phase>
+ <configuration>
+ <property>root.basedir</property>
+ <project>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-parent</artifactId>
+ </project>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
-
- <profiles>
- <profile>
- <id>build-docker-image</id>
- <activation>
- <property>
- <name>build.enable.docker.image</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <images>
- <image>
- <name>${project.artifactId}:${project.version}</name>
- <alias>${project.artifactId}</alias>
- <build>
- <from>openjdk:17-alpine</from>
- <ports>
- <port>7070</port>
- <port>8080</port>
- </ports>
- <assembly>
- <mode>tar</mode>
-
<descriptor>${root.basedir}/assembly/assembly.xml</descriptor>
- </assembly>
- <entryPoint>
- <shell>java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell>
- </entryPoint>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>build</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.commonjava.maven.plugins</groupId>
- <artifactId>directory-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>directories</id>
- <goals>
- <goal>directory-of</goal>
- </goals>
- <phase>initialize</phase>
- <configuration>
- <property>root.basedir</property>
- <project>
- <groupId>org.apache.servicecomb.demo</groupId>
- <artifactId>demo-parent</artifactId>
- </project>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
</project>