You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2024/03/21 00:17:44 UTC

[PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

lhotari opened a new pull request, #4237:
URL: https://github.com/apache/bookkeeper/pull/4237

   ### Motivation
   
   dev/release/003-release-perform.sh fails with errors
   ```
   [INFO] [INFO] --- source:3.3.0:jar (attach-sources) @ buildtools ---
   [INFO] [INFO] Building jar: /Users/lari/workspace-pulsar/bookkeeper/target/checkout/buildtools/target/buildtools-4.17.0-sources.jar
   [INFO] [INFO]
   [INFO] [INFO] --- source:3.3.0:jar-no-fork (attach-sources) @ buildtools ---
   [INFO] [ERROR] We have duplicated artifacts attached.
   ...
   [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-source-plugin:3.3.0:jar-no-fork (attach-sources) on project buildtools: Presumably you have configured maven-source-plugn to execute twice times in your build. You have to configure a classifier for at least on of them. -> [Help 1]
   [INFO] [ERROR]
   ```
   
   ### Changes
   
   - use `jar-no-fork` goal instead of `jar` goal.
   - change parent pom version to 29 (also used in apache/pulsar)
     - [parent pom diff between 26 -> 29](https://github.com/apache/maven-apache-parent/compare/apache-26..apache-29#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8)


-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "eolivelli (via GitHub)" <gi...@apache.org>.
eolivelli merged PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237


-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237#issuecomment-2011066386

   @eolivelli @nicoloboschi This is also needed in branch-4.16 and branch-4.15 since those are also broken due to pom.xml changed made while fixing integration tests. Please also include #4235 and #4236. 


-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "eolivelli (via GitHub)" <gi...@apache.org>.
eolivelli commented on code in PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237#discussion_r1533576926


##########
bookkeeper-dist/all/pom.xml:
##########
@@ -152,7 +152,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-deploy-plugin</artifactId>
-        <version>${maven-deploy-plugin.version}</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>

Review Comment:
   This wounds weird



-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237#issuecomment-2010955470

   please also review and merge #4235 and #4236 since those were necessary at least in my case (MacOS Apple Silicon M3 Max)


-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237#discussion_r1533792764


##########
bookkeeper-dist/all/pom.xml:
##########
@@ -152,7 +152,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-deploy-plugin</artifactId>
-        <version>${maven-deploy-plugin.version}</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>

Review Comment:
   Thanks for the suggestions on Slack @eolivelli . I have resolved this by reverting the changes to skip install and instead changed packaging from jar to pom for `bookkeeper-dist/all`, `bookkeeper-dist/bkctl` and `bookkeeper-dist/server`.



-- 
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: commits-unsubscribe@bookkeeper.apache.org

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


Re: [PR] Fix duplicate artifacts issue with maven-source-plugin in release build [bookkeeper]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #4237:
URL: https://github.com/apache/bookkeeper/pull/4237#discussion_r1533610544


##########
bookkeeper-dist/all/pom.xml:
##########
@@ -152,7 +152,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-deploy-plugin</artifactId>
-        <version>${maven-deploy-plugin.version}</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>

Review Comment:
   I agree. after fixing the maven-source-plugin error, the release script `dev/release/003-release-perform.sh` failed again. The error message was `The packaging plugin for this project did not assign a main file to the project but it has attachments.` This happens for all 3 projects, `bookkeeper-dist/all`, `bookkeeper-dist/bkctl` and `bookkeeper-dist/server`.



-- 
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: commits-unsubscribe@bookkeeper.apache.org

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