You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/09/24 08:42:00 UTC

[jira] [Commented] (MNG-6222) Support exclusion of direct plugin dependencies

    [ https://issues.apache.org/jira/browse/MNG-6222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608966#comment-17608966 ] 

Konrad Windszus commented on MNG-6222:
--------------------------------------

> Most clean solution I can think of is allowing to override the scope with "none" for plugin dependencies.

That would require consumers to duplicate the dependency version from the plugin and requires a modification with every plugin dependency update. Maybe at the same time one could make the version attribute of plugin -> dependencies -> dependency optional and if left out the version defined in the plugin would be chosen. That would also easy managing exclusions.

> Support exclusion of direct plugin dependencies
> -----------------------------------------------
>
>                 Key: MNG-6222
>                 URL: https://issues.apache.org/jira/browse/MNG-6222
>             Project: Maven
>          Issue Type: Improvement
>          Components: Plugins and Lifecycle
>            Reporter: Robert Scholte
>            Priority: Major
>             Fix For: Issues to be reviewed for 4.x
>
>
> Based on http://stackoverflow.com/questions/43630262/how-to-exclude-a-direct-dependency-of-a-maven-plugin
> {code:xml}
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.jvnet.jaxb2.maven2</groupId>
>             <artifactId>maven-jaxb2-plugin</artifactId>
>             <version>0.13.2</version>
>             <dependencies>
>                 <dependency>
>            <!-- how to exclude javax.xml.bind:jaxb-api so it can be picked up by the JRE -->
>                 </dependency>
>             </dependencies>
>         </plugin>
>     </plugins>
> </build>
> {code}
> Up until now there hasn't been any reason to do this, but this seems like a valid one. Most clean solution I can think of is allowing to override the scope with "none" for plugin dependencies.
> This solution won't break the pom-4.0.0.xsd



--
This message was sent by Atlassian Jira
(v8.20.10#820010)