parent project maven
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<modules>
<module>module1</module>
<module>module2</module>
</modules>
<properties>
<revision>0.1.10-SNAPSHOT</revision>
</properties>
<build>
<plugins>
<plugin>
flatten-maven-plugin
...
</plugin>
</plugin>
<build>
child 1 module
<parent>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>module1</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
child 2 module
<parent>
<artifactId>artifactId</artifactId>
<groupId>groupId</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>module2</artifactId>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>module1</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
module1 is a springboot project which should be packaged to a executable jar, and module2 should be deployed to nexus Now, module2 is uploaded to nexus successfully but module1 unable to start by java -jar
add build in module1 can fix the problem