GithubHelp home page GithubHelp logo

Comments (8)

danielflower avatar danielflower commented on August 27, 2024 2

I did a bit more digging around this. This will happen in a multi-module project where there is at least one module that does not have a parent in the same repo (or more specifically, when a module and its parent don't declare the release plugin).

I hope to spend some time to see if I can get around this. Until then, use the fully qualified name or declare the plugin in any module that doesn't inherit the plugin from an ancestor pom already.

Edit: somehow I missed the excellent explanation above from @frizzlebit when writing this comment. That is exactly the problem.

from multi-module-maven-release-plugin.

bbolli avatar bbolli commented on August 27, 2024 1

The solution that worked for me without changing any POMs was to add this to my .m2/settings.xml:

<pluginGroups>
  <pluginGroup>com.github.danielflower.mavenplugins</pluginGroup>
</pluginGroups>

from multi-module-maven-release-plugin.

danielflower avatar danielflower commented on August 27, 2024

Hi Darren, yes I think this should be simple....

You need to move the plugin declaration outside of the pluginManagement node. The <plugins> node should be a direct descendent of the <build> node. Give that a try and let me know how it goes.

Cheers.

from multi-module-maven-release-plugin.

pmibal avatar pmibal commented on August 27, 2024

I am experiencing the exact same issue. @darrin, did the solution work for you?

from multi-module-maven-release-plugin.

danielflower avatar danielflower commented on August 27, 2024

I actually saw this on one project where everything appeared to be set up correctly. Maven was ignoring the prefix for some reason. Can you try multi-module-maven-release-plugin:release instead? Or maybe com.github.danielflower.mavenplugins:multi-module-maven-release-plugin:release

from multi-module-maven-release-plugin.

darrin avatar darrin commented on August 27, 2024

Sorry guys - I'm a victim of shifting priorities and got pulled off that project shortly after reporting the issue.

from multi-module-maven-release-plugin.

frizzlebit avatar frizzlebit commented on August 27, 2024

I found that the missing prefix error is a generic maven issue related to how you declare the plugin.

I found that I needed to declare the plugin within /build/pluginManagement/plugins of the multi-module pom.xml you use to start the build. You must also declare it in the same section of all the children modules.

This is probably because I use a project structure where inheritance information is kept in a parent pom.xml that is separate from an 'aggregator pom' used to list all the modules for build/release. There is no relationship between the 'aggregator pom' and the parent pom.

My example:

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.danielflower.mavenplugins</groupId>
                    <artifactId>multi-module-maven-release-plugin</artifactId>
                    <version>1.0.2</version>
                </plugin>           
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- 
            | Get more detail with: mvn releaser:help -Ddetail=true -Dgoal=release 
            -->
            <plugin>
                <groupId>com.github.danielflower.mavenplugins</groupId>
                <artifactId>multi-module-maven-release-plugin</artifactId>
                <configuration>
                    <releaseGoals>
                        <releaseGoal>deploy</releaseGoal>
                    </releaseGoals>
                </configuration>                
            </plugin>
        </plugins>
    </build>

This solution worked for me. For more complex scenarios consult:
https://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html

from multi-module-maven-release-plugin.

danielflower avatar danielflower commented on August 27, 2024

Closing as this is just a maven behaviour that can't be changed. Workaround: make sure every module has a reference to the plugin (either directly or via a parent), or call the goal with the full plugin name: com.github.danielflower.mavenplugins:multi-module-maven-release-plugin:release

from multi-module-maven-release-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.