[Commented] (MINSTALL-156) generatePom=false not working with 3.0.0-M1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (MINSTALL-156) generatePom=false not working with 3.0.0-M1

JIRA jira@apache.org

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

Robert Lieske commented on MINSTALL-156:
----------------------------------------

I might have tweaked the things a bit to fit my needs. ;)

When I don't configure the maven-install-plugin and maven-deploy-plugin, the artifacts are renamed (as per your example):

{{[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ test1 ---}}
{{[INFO] Installing D:\Workarea\sample\sample2\test1\target\{color:#d04437}blabla.jar{color} to C:\Users\xxx\.m2\repository\test1\test1\{color:#d04437}1.0-SNAPSHOT\test1-1.0-SNAPSHOT.jar{color}}}
{{[INFO] Installing D:\Workarea\sample\sample2\test1\pom.xml to C:\Users\xxx\.m2\repository\test1\test1\1.0-SNAPSHOT\{color:#d04437}test1-1.0-SNAPSHOT.pom{color}}}
{{[INFO] Installing D:\Workarea\sample\sample2\test1\target\{color:#d04437}blabla-jar-with-dependencies.jar{color} to C:\Users\xxx\.m2\repository\test1\test1\1.0-SNAPSHOT\{color:#d04437}test1-1.0-SNAPSHOT-jar-with-dependencies.jar{color}}}

and consequently:

{{[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ test1 ---}}
{{Uploading to snapshotRepository: http://xxx/repository/snapshots/test1/test1/1.0-SNAPSHOT/{color:#d04437}test1-1.0-20190211.100531-1.jar{color}}}
{{Uploading to snapshotRepository: http://xxx/repository/snapshots/test1/test1/1.0-SNAPSHOT/{color:#d04437}test1-1.0-20190211.100531-1.pom{color}}}
{{Uploading to snapshotRepository: http://xxx/repository/snapshots/test1/test1/1.0-SNAPSHOT/{color:#d04437}test1-1.0-20190211.100531-1-jar-with-dependencies.jar{color}}}

To avoid the renaming, the plugins have to be configured.

The old versions allow to configure everything as required. The new ones don't (i.e. behave different).

I can just stick to the old versions (and leave a comment in my POM, why), as they work as I need them to.

Regardless of my motivations / requirements: If you have a parameter named <generatePom>, set to false, and still get a POM generated, installed and uploaded, this is not to be expected!

> generatePom=false not working with 3.0.0-M1
> -------------------------------------------
>
>                 Key: MINSTALL-156
>                 URL: https://issues.apache.org/jira/browse/MINSTALL-156
>             Project: Maven Install Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M1
>            Reporter: Robert Lieske
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> Steps to reproduce:
> {{mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DgroupId=test1 -DartifactId=test1 -Dversion=1.0-SNAPSHOT}}
>  
> {{mvn clean package install:install-file -Dfile=target/test1-1.0-SNAPSHOT.jar -DgeneratePom=false}}
> produces:
> {quote}[INFO] --- maven-install-plugin:2.5.2:install-file (default-cli) @ test1 ---
> [INFO] Installing D:\Workarea\sample\test1\target\test1-1.0-SNAPSHOT.jar to C:\Users\xxx\.m2\repository\test1\test1\1.0-SNAPSHOT\test1-1.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> {quote}
>  
> changing the version of the maven-install-plugin in pom.xml to 
> {{<plugin>}}
> {{ <artifactId>maven-install-plugin</artifactId>}}
> {{ <version>3.0.0-M1</version>}}
> {{ </plugin>}}
>  
> the same call to
> {{mvn clean package install:install-file -Dfile=target/test1-1.0-SNAPSHOT.jar -DgeneratePom=false}}
> produces:
> {quote}[INFO] --- maven-install-plugin:3.0.0-M1:install-file (default-cli) @ test1 ---
> [INFO] Installing D:\Workarea\sample\test1\target\test1-1.0-SNAPSHOT.jar to C:\Users\xxx\.m2\repository\test1\test1\1.0-SNAPSHOT\test1-1.0-SNAPSHOT.jar
> [INFO] Installing C:\Users\xxx\AppData\Local\Temp\test1-1.0-SNAPSHOT7157743325898943802.pom to C:\Users\xxx\.m2\repository\test1\test1\1.0-SNAPSHOT\test1-1.0-SNAPSHOT.pom
> [INFO] ------------------------------------------------------------------------
> {quote}
>  
> Which also installs a POM - which is not what we want!
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)