Skip to content

releases module with fixed dependency version #139

@froque

Description

@froque

I am testing this plugin to see if it fits my organization.

One of my tests consists of a module2 with a dependency on module1, but with a fixed version

module2/pom.xml

        <dependency>
            <groupId>org.example</groupId>
            <artifactId>module1</artifactId>
            <version>1.6.0</version>
            <scope>compile</scope>
        </dependency>

parent pom.xml

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.danielflower.mavenplugins</groupId>
                <artifactId>multi-module-maven-release-plugin</artifactId>
                <version>3.6.4</version>
                <configuration>
                    <noChangesAction>ReleaseNone</noChangesAction>
                </configuration>
            </plugin>
        </plugins>
    </build>

After changing something on module1 and committing, multi-module-maven-release-plugin tries to also release module2

❯ mvn releaser:next  
Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it.
[INFO] Scanning for projects...
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] maven-multimodule-relase-demo                                                                                        [pom]
[INFO] module1                                                                                                              [jar]
[INFO] module2                                                                                                              [jar]
[INFO] 
[INFO] --------------------------------------< org.example:maven-multimodule-relase-demo >---------------------------------------
[INFO] Building maven-multimodule-relase-demo 1.6-SNAPSHOT                                                                  [1/3]
[INFO]   from pom.xml
[INFO] ---------------------------------------------------------[ pom ]----------------------------------------------------------
[INFO] 
[INFO] --- releaser:3.6.4:next (default-cli) @ maven-multimodule-relase-demo ---
[INFO] Will use version 1.6.0 for maven-multimodule-relase-demo as it has not been changed since that release.
[INFO] Will use version 2.1.2 for module1 as it has changed since the last release.
[INFO] Releasing module2 1.6.3 as module1 has changed.
[INFO] Copying org.example:maven-multimodule-relase-demo:pom:1.6-SNAPSHOT to project local repository
[INFO] Copying org.example:maven-multimodule-relase-demo:pom:consumer:1.6-SNAPSHOT to project local repository
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] maven-multimodule-relase-demo 1.6-SNAPSHOT ........................................................... SUCCESS [  0.387 s]
[INFO] module1 2.1-SNAPSHOT ................................................................................. SKIPPED
[INFO] module2 1.6-SNAPSHOT ................................................................................. SKIPPED
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  0.531 s
[INFO] Finished at: 2023-07-20T17:19:36+01:00

Is this intentional behavior ? I do not think it should publish module2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions