Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

META-INF/plexus/components.xml should NOT specify plugin versions #539

Closed
jakub-bochenski opened this issue Aug 19, 2016 · 1 comment
Closed

Comments

@jakub-bochenski
Copy link
Contributor

Per https://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html :

Set the name of the packaging type under role-hint, and the set of phases containing the coordinates of the goals to bind (omit the version). Multiple goals can be associated with a phase using a comma delimited list.

Overriding the Default Lifecycle.

<component-set>
    <components>
        <component>
            <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
            <role-hint>zip</role-hint>
            <implementation>
                org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
            </implementation>
            <configuration>
                <phases>
                    <process-resources>
                        org.apache.maven.plugins:maven-resources-plugin:resources
                    </process-resources>
                    <compile>
                        org.apache.maven.plugins:maven-compiler-plugin:compile
                    </compile>
                    <package>org.sonatype.mavenbook.plugins:maven-zip-plugin:zip</package>
                </phases>
            </configuration>
        </component>
    </components>
</component-set>

Why would you force users to use e.g. a specific version of the compiler plugin instead of letting Maven pick it via the usual mechanism?

The change is rather trivial so I can send a PR if you agree to this..

@rhuss
Copy link
Collaborator

rhuss commented Sep 1, 2016

Thanks, just fixed this. I haven't added the version intensionally, just a c&p issue.

@rhuss rhuss closed this as completed in d62ea0d Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants