multi-module-maven-release-plugin icon indicating copy to clipboard operation
multi-module-maven-release-plugin copied to clipboard

Version numbers in plugin dependencies are not rewritten

Open manoswerts opened this issue 7 years ago • 3 comments

We have a multi module project where 1 module contains Checkstyle configuration. That modules is then included in the parent POM as a plugin dependency:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <version>2.16</version>
    <dependencies>
        <dependency>
            <groupId>com.my.company</groupId>
            <artifactId>my-artifact</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
</plugin>

When releasing, the build fails stating that it cannot resolve the dependency. This because the release plugin does not rewrite the plugin dependency.

Currently we need to set it to a release version, but every time we release a new version we need to update the parent. And that then causes a release of all child modules again...

Can the plugin be updated to take into account plugin dependencies?

manoswerts avatar Feb 01 '18 15:02 manoswerts

If you could handle the whole multimodule project to use the same version to release all its artifacts (as requested in #58) you could just use ${project.version} instead of 1.0-SNAPSHOT when you're referencing modules that are al inside the same multimodule project.

jorgenota avatar Mar 05 '18 14:03 jorgenota

The whole point for us to start using this module was a monorepo approach, i.e. only release modules that have changed and with their own versions. So forcing a release of all of the artifacts with the same version number is something we really don't want.

The only way to handle this would be applying the same intelligence to plugin versions as to dependency versions, i.e. get the latest released version from Maven.

manoswerts avatar Apr 06 '18 14:04 manoswerts

@manoswerts This is done in https://github.com/danielflower/multi-module-maven-release-plugin/pull/98

Waiting for merge

cr-kobyisrael avatar Feb 23 '20 13:02 cr-kobyisrael