我有一个多模块项目:父POM.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
</parent>
<groupId>be.bodyreset</groupId>
<artifactId>bodyreset-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Bodyreset Parent</name>
<description>Manages the common properties and dependencies for the child modules</description>
<modules>
<module>bodyreset-commons</module>
<module>messaging-contract</module>
<module>discovery-microservice</module>
<module>api-gateway-microservice</module>
<module>rest-client-microservice</module>
<module>email-commons</module>
<module>security-microservice</module>
<module>user-microservice</module>
<module>point-of-service-microservice</module>
</modules>
<properties>
<docker.image.prefix>bodyreset</docker.image.prefix>
<java.version>1.8</java.version>
<powermock.version>1.6.6</powermock.version>
</properties>
<dependencyManagement>
<dependencies>
...
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.11</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
rest-client-microservice的POM.xml如下所示:
<?xml …Run Code Online (Sandbox Code Playgroud)