Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1056451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:43:01+00:00 2026-05-16T17:43:01+00:00

I have an issue with updating the dependency version of dependent sibling projects. My

  • 0

I have an issue with updating the dependency version of dependent sibling projects.

My simplified project setup is the following.

root
|--parent
|--tool-core
|--tool
|--functional-tests

The parent project holds all the global properties and dependency management. The functional tests depend on the tool and the tool depends on the tool-core. The root pom.xml only aggregates (specifies whether the functional tests are included) and the parent project is the parent for all of the projects. I don’t know if this is trivial, but the parent is not included in the aggregation though, as it already is the parent for each child project.

Now, my problem is if I change the version of tool with versions:set. The tool version is changed but any dependency to the tool is not. How should I do this? I have already tried more or less randomly other goals and I did try to read the manual.

I’ve tried already using the <dependencyManagement> section and using a property for the version in the parent but these do not get updated to the new version.

Any help is really appreciated.

Addition

I get a message “Ignoring reactor dependency: com.tool:tool:jar:null:1.2.3” at best. This is when I try to versions:use-latest-releases. However, versions:display-dependency-updates does show that there is an update on a “local dependency” (functional-tests depend on tool).

Update

It seems that Maven do lookups for new versions from the repositories, including the local one which seems quite obvious now that I think of it. However, this means that the tool has to be built and installed to local repository before updating the dependencies.

I’m only wondering if this is the right way to have integration tests as their own project. I was hoping that there would be a way to update the version straight away.

Update

Basically I have the following setup. The version dependency on functional-tests of the tool is defined by the parent project. I have omitted the tool-core since it can be handled as part of the tool.

root:

<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>

parent:

<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>

tool:

<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>

functional-tests:

<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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:43:02+00:00Added an answer on May 16, 2026 at 5:43 pm

    Apparently one has to run the goal versions:use-latest-versions in the same path as where the pom.xml one needs to update is located. I solved this by moving the versions to the parent project and updating only that. I’m not too satisfied with this solution since it seems that the versions plugin does not support downgrading the version. Also, the new version is aquired from the (local) repository which means that the tool has to be built before updating the version. I think this was my problem initially.

    Here’s the script to solve this problem:

    #!/bin/bash
    
    if [[ $# -lt 1 ]]; then
        echo "Usage: $0 [version number]"
        exit 1
    fi
    
    function revert_version() {
        mvn -Pall versions:revert > /dev/null
        echo "ERROR: Failed updating the version"
        cat mvn_out.txt
        exit 1
    }
    
    v=$1
    profile=cli
    echo "Updating the version to $v..."
    mvn -P$profile versions:set -DnewVersion=$v -DartifactId=tool -q
    [ $? -eq 0 ] || revert_version
    
    echo "Building the tool..."
    mvn -P$profile install > /dev/null
    [ $? -eq 0 ] || revert_version
    
    echo "Updating the dependencies..."
    mvn versions:use-latest-versions -Dincludes=com.somecompany:* -f parent/pom.xml -q
    [ $? -eq 0 ] || revert_version
    mvn -Pall versions:commit -q
    [ $? -eq 0 ] || revert_version
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a simplified version of my code that experiences the same issue.
I have an issue with a datagrid inserting/updating rows twice. The datagrid is bound
I am working on an NHibernate project and have a question regarding updating transient
I have an issue that is driving me a bit nuts: Using a UserProfileManager
We have an issue using the PEAR libraries on Windows from PHP . Pear
We have an issue related to a Java application running under a (rather old)
We have an issue on our page whereby the first time a button posts
I have some issue with a Perl script. It modifies the content of a
I have an issue with using AWK to simply remove a field from a
I have big issue with url-rewriting for IIS 7.0. I've written simple module for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.