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

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

     [ https://issues.apache.org/jira/browse/MDEP-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Sewe updated MDEP-782:
------------------------------
    Description: 
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?).

  was:
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?).


> 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.1#820001)