blob: 103aeb24d942593718ee3a0079bacb1dc342f87d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.servicecomb.demo</groupId>
<artifactId>demo-nacos</artifactId>
<version>3.4.0-SNAPSHOT</version>
</parent>
<artifactId>nacos-test-client</artifactId>
<name>Java Chassis::Demo::NACOS::TEST-CLIENT</name>
<packaging>jar</packaging>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>java-chassis-spring-boot-starter-standalone</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb.demo</groupId>
<artifactId>demo-schema</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>registry-local</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>docker</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>nacos/nacos-server:v2.1.2-slim</name>
<alias>nacos-server</alias>
<run>
<namingStrategy>alias</namingStrategy>
<env>
<MODE>standalone</MODE>
<PREFER_HOST_MODE>hostname</PREFER_HOST_MODE>
</env>
<wait>
<log>Tomcat started on port</log>
<tcp>
<ports>
<port>8848</port>
</ports>
</tcp>
<time>60000</time>
</wait>
<ports>
<port>nacos-server.port:8848</port>
</ports>
</run>
</image>
<image>
<name>nacos-provider:${project.version}</name>
<alias>nacos-provider</alias>
<run>
<namingStrategy>alias</namingStrategy>
<env>
<JAVA_OPTS>
-Dservicecomb.registry.nacos.serverAddr=http://nacos-server:8848
</JAVA_OPTS>
<JAR_PATH>/maven/maven/nacos-provider-${project.version}.jar</JAR_PATH>
</env>
<links>
<link>nacos-server:nacos-server</link>
</links>
<wait>
<log>Nacos is ready</log>
<tcp>
<ports>
<port>9094</port>
</ports>
</tcp>
<time>120000</time>
</wait>
<ports>
<port>9094:9094</port>
</ports>
</run>
</image>
<image>
<name>nacos-consumer:${project.version}</name>
<alias>nacos-consumer</alias>
<run>
<namingStrategy>alias</namingStrategy>
<env>
<JAVA_OPTS>
-Dservicecomb.registry.nacos.serverAddr=http://nacos-server:8848
</JAVA_OPTS>
<JAR_PATH>/maven/maven/nacos-consumer-${project.version}.jar</JAR_PATH>
</env>
<links>
<link>nacos-server:nacos-server</link>
</links>
<wait>
<log>Nacos is ready</log>
<tcp>
<ports>
<port>9092</port>
</ports>
</tcp>
<time>120000</time>
</wait>
<ports>
<port>9092:9092</port>
</ports>
</run>
</image>
<image>
<name>nacos-gateway:${project.version}</name>
<alias>nacos-gateway</alias>
<run>
<namingStrategy>alias</namingStrategy>
<env>
<JAVA_OPTS>
-Dservicecomb.registry.nacos.serverAddr=http://nacos-server:8848
</JAVA_OPTS>
<JAR_PATH>/maven/maven/nacos-gateway-${project.version}.jar</JAR_PATH>
</env>
<links>
<link>nacos-server:nacos-server</link>
</links>
<wait>
<log>Nacos is ready</log>
<tcp>
<ports>
<port>9090</port>
</ports>
</tcp>
<time>120000</time>
</wait>
<ports>
<port>9090:9090</port>
</ports>
</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>
</plugins>
</build>
</profile>
</profiles>
</project>