I have a problem updating the dependent version of dependent sibling projects.
My simplified project setup is as follows.
root
|
|
|
|
The parent project contains all global properties and dependency management. Function tests depend on the tool, and the tool depends on the tool core. Root agents pom.xml(determines whether functional tests are enabled), and the parent project is the parent for all projects. I do not know if this is trivial, but the parent is not included in the aggregation, although it is already the parent for each child project.
Now my problem is that I am changing the version of the tool with versions:set. The version of the tool has been changed, but there is no dependence on this tool. How should I do it? I already tried more or less randomly to use other goals, and I tried to read the manual.
I have already tried using the section <dependencyManagement>and using the property for the version in the parent, but they are not updated in the new version.
Any help really appreciated.
Adding
I get the message "Ignoring the dependence of the reactor: com.tool: tool: jar: null: 1.2.3" in the best case. This is when I try versions:use-latest-releases. However, it versions:display-dependency-updatesshows that there is an update of "local dependency" (functional tests depend on the tool).
Update
, Maven , , , . , .
, . , .
. functional-tests tool parent. tool-core, tool.
<groupId>com.somecompany</groupId>
<artifactId>x-reactor</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<profiles>
<profile>
<id>cli</id>
<modules>
<module>tool</module>
</modules>
</profile>
<profile>
<id>deploy</id>
<modules>
<module>tool</module>
<module>functional-tests</module>
</modules>
</profile>
</profiles>
:
<groupId>com.somecompany</groupId>
<artifactId>x-parent</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.somecompany</groupId>
<artifactId>tool</artifactId>
<version>3.2.3</version>
</dependency>
</dependencies>
</dependencyManagement>
:
<parent>
<groupId>com.somecompany</groupId>
<artifactId>x-parent</artifactId>
<version>1.0</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<groupId>com.somecompany</groupId>
<artifactId>tool</artifactId>
<packaging>jar</packaging>
<version>3.2.3</version>
:
<parent>
<groupId>com.somecompany</groupId>
<artifactId>x-parent</artifactId>
<version>1.0</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<groupId>functional-tests</groupId>
<artifactId>functional-tests</artifactId>
<version>0.1</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.somecompany</groupId>
<artifactId>tool</artifactId>
</dependency>
</dependencies>