You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/06/28 20:14:13 UTC

[GitHub] [maven-shade-plugin] nielsbasjes edited a comment on pull request #26: [MSHADE-326] Hide shaded dependencies from the rest of the reactor build

nielsbasjes edited a comment on pull request #26:
URL: https://github.com/apache/maven-shade-plugin/pull/26#issuecomment-869974552


   @michael-o @rfscholte 
   [Sorry, earlier I got it wrong. So I edited this comment]
   
   What I think you meant:
   If this hack in maven is removed the test I created for this merge request should "just pass", even without the code change.
   
   Side note: This comment was removed in this commit https://github.com/apache/maven/commit/d3ace78602405079d6416a63c13216568ba97995
   
   What I did:
   1. I cloned the maven main source repo and removed the code fragment which was originally documented as a hack. 
       https://github.com/nielsbasjes/maven/tree/MSHADE-326-RemoveHack
       https://github.com/nielsbasjes/maven/commit/b52e10c6d577f66860b56fba4bd2e03816826228
       I also had disabled the rat plugin to run this build because of several files under `maven-xml/` (seems unrelated).
   2. I built maven with 
       `mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-4.0.x-SNAPSHOT" clean package`. 
       For this build I used maven 3.8.1 on Java 11.0.11 . 
       This build passed all available tests.
   3. In my local copy of this merge request I reverted the code change and left the test intact.
   4. I built the maven-shade-plugin with
        `export M2_HOME=$HOME/app/maven/apache-maven-4.0.x-SNAPSHOT` 
       `${M2_HOME}/bin/mvn verify -Prun-its` 
       I ran it without the invoker.parallelThreads to make the output better readable.
   
   This last build fails over this test:
   ```
   [INFO] Building: MSHADE-340_shadedTestJarArtifactAttached/pom.xml
   [INFO] run post-build script verify.groovy
   [INFO]   The post-build script did not succeed. assert originalUberJar.exists()
          |               |
          |               false
          /home/nbasjes/workspace/Apache/maven-shade-plugin/target/it/MSHADE-340_shadedTestJarArtifactAttached/uber/target/mshade-340-uber-1.0.jar
   [INFO]           MSHADE-340_shadedTestJarArtifactAttached/pom.xml . FAILED (2.5 s)
   ```
   
   Most notably the test I created (which fails on maven 3.8.1) now passed.
   ```
   [INFO] Building: MSHADE-326-Hide-dependencies-from-reactor/pom.xml
   [INFO] run post-build script verify.bsh
   [INFO]           MSHADE-326-Hide-dependencies-from-reactor/pom.xml  SUCCESS (2.9 s)
   ```
   
   So apparently without this hack indeed my test does what I want.
   
   Please advise how to proceed.
   Do you want me to put up a merge request for maven?


-- 
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