1

I have this classical project tree:

project
  pom.xml

This pom.xml generates a full maven project with its own pom.xml like this:

project
  pom.xml
  generated-module
    pom.xml
    src
      ...

Is it possible to generate and buid this generated module with this simple command ?

mvn package
Nelson G.
  • 5,145
  • 4
  • 43
  • 54

1 Answers1

0

You need to add a modules decleration in your parent-pom.xml

<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <modelVersion>4.0.0</modelVersion>
        <groupId>myproject</groupId>
        <artifactId>PARENT</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>pom</packaging>
        <modules>
                <module>generated-module</module>
                <module>...</module>
        </modules>
</project>

https://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

Martin Baumgartner
  • 3,524
  • 3
  • 20
  • 31