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

[jira] [Commented] (MDEP-782) Add a option to unpack goals

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

Jasper Kamerling commented on MDEP-782:
---------------------------------------

I could also really use this functionality. 
I went out and created the pull request for this: [[MDEP-782] - Add ability to strip type by scramados · Pull Request #233 · apache/maven-dependency-plugin (github.com)|https://github.com/apache/maven-dependency-plugin/pull/233]

> Add a <stripType> option to unpack goals
> ----------------------------------------
>
>                 Key: MDEP-782
>                 URL: https://issues.apache.org/jira/browse/MDEP-782
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>          Components: unpack-dependencies
>    Affects Versions: 3.2.0
>         Environment: Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
>            Reporter: Andreas Sewe
>            Priority: Major
>
> When using {{unpack-dependencies}} with
> {noformat}
> <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
> <stripVersion>true</stripVersion>
> {noformat}
> dependencies will get unpacked in directories like {{{}${outputDirectory}/some-artifactId-{*}jar{*}/{}}}. In other words, the artifact's type is always appended; AFAICT from the [code|https://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache/maven/plugins/dependency/utils/DependencyUtil.html#L189], there is no way to unpack into a directory whose name is just the dependency's {{{}artifactId{}}}.
> It would hence be nice to have a {{<stripType>}} configuration option to mirror [{{<stripVersion>}}|https://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#stripVersion] and [{{<stripClassifier>}}|https://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#stripClassifier] (although the later option is also ignored on {{{}unpack-dependencies{}}}. A separate bug?).



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