You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Kanters (Jira)" <ji...@apache.org> on 2020/10/23 13:00:02 UTC

[jira] [Comment Edited] (MDEP-699) Create a goal to add a new dependency to an existing pom

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

Martin Kanters edited comment on MDEP-699 at 10/23/20, 12:59 PM:
-----------------------------------------------------------------

I think it would be useful to have this, mainly in the scope of tutorials. Instead of having to copy/paste 5+ lines of xml code to your pom file, only 1 command line invocation would be needed. The order of dependencies might have an impact, but in my opinion this feature would just be a small utility function. The user should still think about the consequences.  

I gave it a quick try, but will park it because of one major concern. In the current implementation it will reformat the whole pom file, which is undesirable in my opinion.

If anyone wants to continue this, feel free:
 [https://github.com/infosupport/maven-dependency-plugin/commit/b9c672111d77db7bb86d947981232bcfec12432f] 

Also I think we need to support several things:
 * Specifying the scope of the dependency
 * Only add unique dependencies
 * Perhaps create a validate step to make sure that added dependencies also exist


was (Author: martinkanters):
I think it would be useful to have this, mainly in the scope of tutorials. Instead of having to copy/paste 5+ lines of xml code to your pom file, only 1 command line invocation would be needed.

I gave it a quick try, but will park it because of one major concern. In the current implementation it will reformat the whole pom file, which is undesirable in my opinion.

If anyone wants to continue this, feel free:
[https://github.com/infosupport/maven-dependency-plugin/commit/b9c672111d77db7bb86d947981232bcfec12432f] 

> Create a goal to add a new dependency to an existing pom
> --------------------------------------------------------
>
>                 Key: MDEP-699
>                 URL: https://issues.apache.org/jira/browse/MDEP-699
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>            Reporter: QualiteSys QualiteSys
>            Priority: Minor
>
> I work with third party or open source maven projesct, and existing pom files. I would like to insert additional dependencies to the pom, in command line, not via manual editing or shells. Is it possible to create a specific goal for that ?
> Thanks for your help



--
This message was sent by Atlassian Jira
(v8.3.4#803005)