jira-importer commented on issue #222:
URL: 
https://github.com/apache/maven-deploy-plugin/issues/222#issuecomment-2771516379

   **[Matthias 
Hanisch](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=matze)** 
commented
   
   Sorry to jump in late.
   
   We got also hit by the issue above and I gave it a quick try to check if our 
scenario is really solved with the upcoming 3.0.0 of deploy plugin.
   I created a very simple jar project with a hello world class and a 
accompanying bill of materials which should be additionally uploaded using 
deploy-file goal.
   
   The pom attaches sources and javadoc jar, executes "default-deploy" to 
upload the "hello world" jar and also executes a deploy-file to upload the 
corresponding bom.
   The "deploy-bom" still uploads sources and javadoc jar again, even with 
3.0.0-SNAPSHOT.
   
   Let me just attach the relevant plugin configurations. If more information 
is required or if I should create a new issue just let me know.
   
   ```xml
   <!-- Attach sources and javadoc -->
   <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <executions>
                <execution>
                        <id>attach-javadocs</id>
                        <goals>
                                <goal>jar</goal>
                        </goals>
                </execution>
        </executions>
   </plugin>
   <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
                <execution>
                        <id>attach-sources</id>
                        <goals>
                                <goal>jar</goal>
                        </goals>
                </execution>
        </executions>
   </plugin>
   
   <!-- upload bom with the jar -->
   <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.0.0-SNAPSHOT</version>
        <configuration>
                
<url>${project.distributionManagementArtifactRepository.url}</url>
                
<repositoryId>${project.distributionManagementArtifactRepository.id}</repositoryId>
        </configuration>
        <executions>
                <execution>
                        <id>deploy-bom</id>
                        <phase>deploy</phase>
                        <goals>
                                <goal>deploy-file</goal>
                        </goals>
                        <configuration>
                                <file>${project.basedir}/bom/pom.xml</file>
                                
<pomFile>${project.basedir}/bom/pom.xml</pomFile>
                        </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