You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tavian Barnes (JIRA)" <ji...@apache.org> on 2015/07/11 00:11:05 UTC

[jira] [Commented] (MINVOKER-191) “Artifact is not fully assembled” error with maven-invoker-plugin in parallel build

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

Tavian Barnes commented on MINVOKER-191:
----------------------------------------

> The problem can simply be solved by using a dependency to project-2 in your project-3.

True, but there shouldn't be a need for such a dependency.  project-2 is not used by project-3.  And this workaround gets more inconvenient the more subprojects you have.

I hope the fix is as simple as just turning [these|https://github.com/apache/maven-plugins/blob/55fefb245d9ebcc2ed77965485c2c3e26f00c036/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java#L265] [lines|(https://github.com/apache/maven-plugins/blob/55fefb245d9ebcc2ed77965485c2c3e26f00c036/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java#L306] into warnings or something.  Then in a parallel build, some artifacts will be installed non-deterministically.  But you'll always get *at least* your dependencies installed, which should be fine.

> “Artifact is not fully assembled” error with maven-invoker-plugin in parallel build
> -----------------------------------------------------------------------------------
>
>                 Key: MINVOKER-191
>                 URL: https://issues.apache.org/jira/browse/MINVOKER-191
>             Project: Maven Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 1.10
>            Reporter: Tavian Barnes
>
> According to the docs (https://maven.apache.org/plugins/maven-invoker-plugin/install-mojo.html), maven-invoker-plugin is "thread-safe and supports parallel builds." However, when I build by multi-module project with -T 1C, I get an error like the following:
> bq. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:1.10:install (integration-test) on project my-archetype: Failed to install project dependencies: MavenProject: com.tavianator:my-archetype:1.6-SNAPSHOT @ /home/tavianator/code/Project/my-archetype/pom.xml: Failed to install project artifacts: MavenProject: com.tavianator:my-project-2:1.6-SNAPSHOT @ /home/tavianator/code/Project/my-project-2/pom.xml: Failed to install artifact: com.tavianator:my-project-2:jar:1.6-SNAPSHOT: Artifact is not fully assembled: /home/tavianator/code/Project/my-project-2/target/classes -> [Help 1]
> The project layout is like this:
> {code}
> Root
> |--Project 1
> |--Project 2
> |--Archetype (depends on Project 1, scope=test)
> {code}
> The archetype integration tests use the maven-invoker-plugin to install the relevant dependencies (Root and Project 1) to a local repository, then runs the normal archetype integration tests. In parallel builds, Archetype and Project 2 run at the same time. When the maven-invoker-plugin runs, it tries to install Project 2 to the local repo, but Project 2 isn't built yet, hence the error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)