jira-importer commented on issue #306:
URL: 
https://github.com/apache/maven-install-plugin/issues/306#issuecomment-2771866574

   **[Robert 
Lieske](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=robert12345)**
 commented
   
   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:
   
   ```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>
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to