You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lars Uffmann (Jira)" <ji...@apache.org> on 2023/09/15 07:31:00 UTC
[jira] [Commented] (MNG-7885) Plugin dependencies should be part in dependency management
[ https://issues.apache.org/jira/browse/MNG-7885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765486#comment-17765486 ]
Lars Uffmann commented on MNG-7885:
-----------------------------------
The maven compiler-plugin use case. I could add mapstruct-processor and lombok as an optional compile time dependency and their versions would be part of standard dependency management mechanism.
{code:java}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
{code}
> Plugin dependencies should be part in dependency management
> -----------------------------------------------------------
>
> Key: MNG-7885
> URL: https://issues.apache.org/jira/browse/MNG-7885
> Project: Maven
> Issue Type: Improvement
> Components: Dependencies
> Reporter: Lars Uffmann
> Priority: Major
>
> It would be a great improvement in dependency management if plugin dependencies could be part of the standard dependency management resolution. In the example below I could manage the version of the rewrite-maven-plugin using pluginManagement, the version of the rewrite-spring plugin dependency however has to be set in place.
>
>
> {code:java}
> <build>
> <plugins>
> <plugin>
> <groupId>org.openrewrite.maven</groupId>
> <artifactId>rewrite-maven-plugin</artifactId>
> <configuration>
> <activeRecipes>
> <recipe>org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration</recipe>
> </activeRecipes>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.openrewrite.recipe</groupId>
> <artifactId>rewrite-spring</artifactId>
> <version>4.35.0</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> <build>{code}
>
>
> Other plugins are using special configurations to declare extra dependencies. The version. management issue however is the same. A good example is
> _annotationProcessorPaths_ of the compiler plugin.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)