You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2018/09/23 00:58:00 UTC

[jira] [Comment Edited] (MINVOKER-243) invoker:install doesn't copy transitive dependencies anymore (as of 3.1.0)

    [ https://issues.apache.org/jira/browse/MINVOKER-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624876#comment-16624876 ] 

Christopher Tubbs edited comment on MINVOKER-243 at 9/23/18 12:57 AM:
----------------------------------------------------------------------

[~khmarbaise], sure thing: the current master branch of Accumulo (2.0.0-SNAPSHOT) failed in the maven-plugin module before I fixed this in commit [https://github.com/apache/accumulo/commit/16795c526f6d39d1cffd5be39168850bd1d6fbbd] by reverting to 3.0.1 of the plugin, but if you edit the pom to use 3.1.0 again (which is the version set in the Apache POM version 21), it fails to copy the transitive dependencies during the install goal.

You can see the difference by just looking at the number of jars copied during the "install" goal

For example, compare the console output of this broken build (3.1.0):
 [https://builds.apache.org/view/A/view/Accumulo/job/Accumulo-Master/2473/org.apache.accumulo$accumulo-maven-plugin/console]

with this working one (3.0.1):
 [https://builds.apache.org/view/A/view/Accumulo/job/Accumulo-Master/2475/org.apache.accumulo$accumulo-maven-plugin/console]

If you want to try to reproduce locally, keep in mind Accumulo probably won't build on Windows (only Mac and Linux), and also has a native JNI library, so you need {{g++}} and {{make}} installed. You can also make the build faster by doing {{mvn clean verify -Dtest=blah -Dit.test=blah -Dspotbugs.skip -Dcheckstyle.skip -Dwarbucks.skip -Dmodernizer.skip -P!autoformat}}. Don't do {{-DskipTests}} or {{-DskipITs}} because that will activate a profile which skips the invoker plugin execution entirely. Also, keep in mind that now that we've had a successful build, the build may succeed in spite of this bug, because it will pull the previous build's jar from the SNAPSHOT repository instead of from the sibling module's current build. But, you'll still be able to see the failure if you clobber the ${distMgmtSnapshotsUrl} property from the parent POM so it doesn't grab the previous snapshot build. And, in either case, you can still see the difference in the log output regarding which dependencies are being installed.


was (Author: ctubbsii):
[~khmarbaise], sure thing: the current master branch of Accumulo (2.0.0-SNAPSHOT) fails in the maven-plugin module. I fixed this in commit [https://github.com/apache/accumulo/commit/16795c526f6d39d1cffd5be39168850bd1d6fbbd] by reverting to 3.0.1 of the plugin, but if you edit the pom to use 3.1.0 again (which is the version set in the Apache POM version 21), it fails to copy the transitive dependencies during the install goal.

You can see the difference by just looking at the number of jars copied during the "install" goal

For example, compare the console output of this broken build (3.1.0):
[https://builds.apache.org/view/A/view/Accumulo/job/Accumulo-Master/2473/org.apache.accumulo$accumulo-maven-plugin/console]

with this working one (3.0.1):
[https://builds.apache.org/view/A/view/Accumulo/job/Accumulo-Master/2475/org.apache.accumulo$accumulo-maven-plugin/console]

If you want to try to reproduce locally, keep in mind Accumulo probably won't build on Windows (only Mac and Linux), and also has a native JNI library, so you need {{g++}} and {{make}} installed. You can also make the build faster by doing {{mvn clean verify -Dtest=blah -Dit.test=blah -Dspotbugs.skip -Dcheckstyle.skip -Dwarbucks.skip -Dmodernizer.skip -P\!autoformat}}. Don't do {{-DskipTests}} or {{-DskipITs}} because that will activate a profile which skips the invoker plugin execution entirely. Also, keep in mind that now that we've had a successful build, the build may succeed in spite of this bug, because it will pull the previous build's jar from the SNAPSHOT repository instead of from the sibling module's current build. But, you'll still be able to see the failure if you clobber the ${distMgmtSnapshotsUrl} property from the parent POM so it doesn't grab the previous snapshot build. And, in either case, you can still see the difference in the log output regarding which dependencies are being installed.

> invoker:install doesn't copy transitive dependencies anymore (as of 3.1.0)
> --------------------------------------------------------------------------
>
>                 Key: MINVOKER-243
>                 URL: https://issues.apache.org/jira/browse/MINVOKER-243
>             Project: Maven Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Christopher Tubbs
>            Priority: Blocker
>
> Something seems to have broken between 3.0.1 and 3.1.0, as the install goal no longer copies transitive dependencies to the localRepositoryPath as it did in version 3.0.1.
> This is very problematic, because if the artifacts are not in the localRepositoryPath, the invoked project will try to download them from a remote repository, which isn't possible for SNAPSHOT versions (such as those in a sibling module in a multi-module project). This can make it difficult to even build a multi-module project, unless the invoked task is skipped and the sibling module can be published to a remote snapshot repository temporarily, and then the build re-executed normally. (Saw this happen in Apache Accumulo after upgrading to apache-21.pom)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)