[
https://issues.apache.org/jira/browse/MINSTALL-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16768658#comment-16768658
]
Witold Markowski commented on MINSTALL-157:
-------------------------------------------
I tried to bisect but I had some issues with snapshot repository so I gave up.
But anyway, it was not so hard to find out that this issue is a side effect of
MINSTALL-121; now *packaging* is not used for file extension.
My case is that I'm developing some maven plugin with custom packaging - let's
say *xyz*. The main *jar* artifact produced during the build is not so
important for me. What is important, is the *zip* file produced by
*maven-assembly-plugin*. I was able to install this *zip* file in my local
repository (by using *instal-file* goal) with *xyz* file extension. Then in
some other project I can use this artifact (by defining a dependency with
*<type>xyz</type>*) and Maven is happy that (at least) the artifact is
available in my local repository. I'm not sure right now if I'm trying to hack
Maven system by doing this :)
Please advice.
> Seting custom packaging not working with 3.0.0-M1
> -------------------------------------------------
>
> Key: MINSTALL-157
> URL: https://issues.apache.org/jira/browse/MINSTALL-157
> Project: Maven Install Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0-M1
> Reporter: Witold Markowski
> Priority: Major
>
> Preparation to reproduce, in console execute:
> {noformat}
> mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4
> -DgroupId=test1 -DartifactId=test1 -Dversion=1. 0-SNAPSHOT
> {noformat}
> {noformat}
> cd test1
> {noformat}
> {noformat}
> mvn clean package
> {noformat}
> With *3.0.0-M1* while installing and using *packaging* the output is:
> {noformat}
> $ mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file
> -Dfile=target/test1-1.0-SNAPSHOT.jar -Dpackaging=xyz
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building test1 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-install-plugin:3.0.0-M1:install-file (default-cli) @ test1
> ---
> [INFO] Installing
> C:\Users\wmarkowski\dev-test\sources\test1\target\test1-1.0-SNAPSHOT.jar to
> C:\Users\wmarkowski\.m2\repository\test1\test1\1.0-SNAPSHOT\test1-1.0-SNAPSHOT.jar
> [INFO] Installing C:\cygwin64\tmp\test1-1.0-SNAPSHOT6382239492754272802.pom
> to
> C:\Users\wmarkowski\.m2\repository\test1\test1\1.0-SNAPSHOT\test1-1.0-SNAPSHOT.pom
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 0.722 s
> [INFO] Finished at: 2019-02-04T22:39:45+01:00
> [INFO] Final Memory: 9M/245M
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> The artifact is still installed as *jar*, however it should be installed as
> *xyz*.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)