[
https://issues.apache.org/jira/browse/MINSTALL-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16761601#comment-16761601
]
Robert Lieske commented on MINSTALL-156:
----------------------------------------
Hi Karl Heinz,
Actually I don't care much about the Install, its the deploy that bothers me.
The issue is just similar.
I want to deploy both the created JAR and the JAR-with-dependencies to the
repository. As the release repository does not allow to upload the same POM
twice, I have to configure the maven-deploy-plugin to skip generation of POM
when uploading the JAR-with-dependencies.
As a side note: the uploaded artifacts have to have a different name, so I need
to configure everything by hand:
{code:java}
<finalName>blabla</finalName>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>install-small-file</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<artifactId>${project.build.finalName}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</configuration>
</execution>
<execution>
<id>install-fat-file</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar</file>
<generatePom>false</generatePom>
<artifactId>${project.build.finalName}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<classifier>jar-with-dependencies</classifier>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<id>default-deploy</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>deploy-small-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>${targetrepositoryId}</repositoryId>
<url>${targetrepositoryUrl}</url>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<artifactId>${project.build.finalName}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
</configuration>
</execution>
<execution>
<id>deploy-fat-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>${targetrepositoryId}</repositoryId>
<url>${targetrepositoryUrl}</url>
<file>${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar</file>
<generatePom>false</generatePom>
<artifactId>${project.build.finalName}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<classifier>jar-with-dependencies</classifier>
</configuration>
</execution>
</executions>
</plugin>
{code}
> 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
>
> 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)