You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nielsbasjes (via GitHub)" <gi...@apache.org> on 2023/02/19 22:14:34 UTC

[GitHub] [maven-artifact-plugin] nielsbasjes opened a new pull request, #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

nielsbasjes opened a new pull request, #16:
URL: https://github.com/apache/maven-artifact-plugin/pull/16

   In https://issues.apache.org/jira/browse/MARTIFACT-44 @hboutemy asked for a reproduction of the issue.
   
   What better way to provide a reproduction than a new test for the project itself.
   So this is ONLY an integration test that creates and installs a dependency which is then used, shaded, minimized and the reduced pom is then injected into the jar file.
   
   So this pull request will FAIL the build because it does not solve the problem I ran into, only show it and facilitate reproduction by others.
   
   During the install of the `include-drp` integration test you see (simplified for readability):
   ```
   [INFO] --- maven-install-plugin:2.4:install (default-install) @ include-drp ---
   [INFO] Installing include-drp-1.0-SNAPSHOT.jar to ~/.m2/.../include-drp-1.0-SNAPSHOT.jar
   [INFO] Installing dependency-reduced-pom.xml to ~/.m2/.../include-drp-1.0-SNAPSHOT.pom
   ```
   Then after a rebuild without install you run the `artifact:compare` and you get (simplified for readability):
   ```
   [INFO] --- maven-artifact-plugin:3.4.0:compare (default-cli) @ include-drp ---
   ...
   [ERROR] size mismatch include-drp-1.0-SNAPSHOT.pom: investigate with diffoscope target/reference/include-drp-1.0-SNAPSHOT.pom pom.xml
   ...
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   ```
   
   Closer inspection shows `dependency-reduced-pom.xml` and  `target/reference/include-drp-1.0-SNAPSHOT.pom` to be the same (so the build IS reproducible!).
   Yet both are very different from the `pom.xml` against which the compare is done which fails the build.


-- 
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-unsubscribe@maven.apache.org

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


[GitHub] [maven-artifact-plugin] hboutemy commented on pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #16:
URL: https://github.com/apache/maven-artifact-plugin/pull/16#issuecomment-1724914751

   I'll drop this new IT, because we already have 2 compare ITs showing what to do
   but I wrote #20 to try to enhance documentation 


-- 
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-unsubscribe@maven.apache.org

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


[GitHub] [maven-artifact-plugin] bmarwell commented on pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

Posted by "bmarwell (via GitHub)" <gi...@apache.org>.
bmarwell commented on PR #16:
URL: https://github.com/apache/maven-artifact-plugin/pull/16#issuecomment-1464890277

   Thanks for your contribution! I will put this PR in the slack channel 


-- 
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-unsubscribe@maven.apache.org

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


[GitHub] [maven-artifact-plugin] nielsbasjes commented on pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

Posted by "nielsbasjes (via GitHub)" <gi...@apache.org>.
nielsbasjes commented on PR #16:
URL: https://github.com/apache/maven-artifact-plugin/pull/16#issuecomment-1436114640

   Remarkable observation.
   
   If I do `mvn clean verify artifact:compare` in the `include-drp` project I get this output and the build does not fail.
   
   ```
   [INFO] --- maven-artifact-plugin:3.4.0:compare (default-cli) @ include-drp ---
   [WARNING] SCM source tag in buildinfo source.scm.tag=maven-buildinfo-plugin does not permit rebuilders reproducible source checkout
   [INFO] Saved info on build to /home/nbasjes/workspace/Apache/maven-artifact-plugin/src/it/include-drp/target/include-drp-1.0-SNAPSHOT.buildinfo
   [INFO] Checking against reference build from central...
   [INFO] Reference buildinfo file not found: it will be generated from downloaded reference artifacts
   [INFO] Reference build java.version: 17 (from MANIFEST.MF Build-Jdk-Spec)
   [INFO] Reference build os.name: Unix (from pom.properties newline)
   [INFO] Minimal buildinfo generated from downloaded artifacts: /home/nbasjes/workspace/Apache/maven-artifact-plugin/src/it/include-drp/target/reference/include-drp-1.0-SNAPSHOT.buildinfo
   [INFO] Reproducible Build output summary: 2 files ok
   [INFO] Reproducible Build output comparison saved to /home/nbasjes/workspace/Apache/maven-artifact-plugin/src/it/include-drp/target/include-drp-1.0-SNAPSHOT.buildcompare
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   ```
   
   The mentioned buildinfo files now contain the same `length` and `checksums` for both
   ```
   outputs.0.filename=include-drp-1.0-SNAPSHOT.pom
   outputs.1.filename=include-drp-1.0-SNAPSHOT.jar
   ```
   


-- 
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-unsubscribe@maven.apache.org

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


[GitHub] [maven-artifact-plugin] nielsbasjes commented on pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

Posted by "nielsbasjes (via GitHub)" <gi...@apache.org>.
nielsbasjes commented on PR #16:
URL: https://github.com/apache/maven-artifact-plugin/pull/16#issuecomment-1438362234

   As it turns out the `clean verify artifact:compare` must be combined in a single invocation.
   So my bug report was incorrect.
   
   @hboutemy 
   I'm leaving it up to you to either include this as an extra test to prove this is the way it works or to simply not include this.
   


-- 
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-unsubscribe@maven.apache.org

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


[GitHub] [maven-artifact-plugin] hboutemy closed pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar

Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy closed pull request #16: [MARTIFACT-44] Integration test Handle maven-shade-plugin useDependencyReducedPomInJar
URL: https://github.com/apache/maven-artifact-plugin/pull/16


-- 
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-unsubscribe@maven.apache.org

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