jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-1814

release prepare : when generate-reactor-projects can't resolve transitively dependency.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.3.6
  • Component/s: Release
  • Labels:
    None
  • Environment:
    maven 2.0.7, subversion 1.4.2
  • Complexity:
    Intermediate

Description

[INFO] Updating local copy against the scm...
[ERROR] org.apache.maven.shared.release.ReleaseExecutionException: Unable to get reactor projects: Failed to build project.
at org.apache.maven.continuum.release.phase.GenerateReactorProjectsPhase.execute(GenerateReactorProjectsPhase.java:82)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194)
at org.apache.maven.shared.release.DefaultReleaseManager.prepareWithResult(DefaultReleaseManager.java:107)
at org.apache.maven.continuum.release.executors.PrepareReleaseTaskExecutor.execute(PrepareReleaseTaskExecutor.java:43)
at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:67)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.maven.continuum.release.ContinuumReleaseException: Failed to build project.
at org.apache.maven.continuum.release.phase.GenerateReactorProjectsPhase.addModules(GenerateReactorProjectsPhase.java:169)
at org.apache.maven.continuum.release.phase.GenerateReactorProjectsPhase.getReactorProjects(GenerateReactorProjectsPhase.java:109)
at org.apache.maven.continuum.release.phase.GenerateReactorProjectsPhase.execute(GenerateReactorProjectsPhase.java:78)
... 10 more
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) fr.paris.lutece:lutece-core:lutece-core:2.1.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=fr.paris.lutece -DartifactId=lutece-core \
-Dversion=2.1.2 -Dpackaging=lutece-core -Dfile=/path/to/file

Path to dependency:
1) fr.paris.lutece.plugins:lutece-plugins-pom:pom:2.6-SNAPSHOT
2) fr.paris.lutece.plugins:library-lutece-unit-testing:jar:2.0.2
3) fr.paris.lutece:lutece-core:lutece-core:2.1.2

----------
1 required artifact is missing.

for artifact:
fr.paris.lutece.plugins:lutece-plugins-pom:pom:2.6-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
codehausSnapshots (http://snapshots.maven.codehaus.org/maven2),
lutece (http://dev.lutece.paris.fr/maven_repository),
luteceSnapshot (http://dev.lutece.paris.fr/snapshot_repository)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:305)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:272)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:253)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildWithDependencies(DefaultMavenProjectBuilder.java:367)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildWithDependencies(DefaultMavenProjectBuilder.java:315)
at org.apache.maven.continuum.release.phase.GenerateReactorProjectsPhase.addModules(GenerateReactorProjectsPhase.java:151)
... 12 more

the Artifact is in my repository and in my local repository.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    CONTINUUM-1814.patch
    12/Feb/10 5:15 PM
    2 kB
    Brent N Atkinson
  2. Hide
    Zip Archive
    CONTINUUM-1814-TestProject.zip
    10/Feb/10 6:11 PM
    3 kB
    Brent N Atkinson
    1. XML File
      CONTINUUM-1814/ear-module/pom.xml 1 kB
    2. XML File
      CONTINUUM-1814/har-module/pom.xml 0.9 kB
    3. XML File
      CONTINUUM-1814/.../jboss-service.xml 0.0 kB
    4. XML File
      CONTINUUM-1814/pom.xml 0.9 kB
    Download Zip
    Show
    Zip Archive
    CONTINUUM-1814-TestProject.zip
    10/Feb/10 6:11 PM
    3 kB
    Brent N Atkinson
  3. Java Source File
    GenerateReactorProjects_snippet.java
    02/Mar/09 4:15 AM
    2 kB
    Sebastian Bathke

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
jsteve added a comment - 28/Jul/08 9:59 AM

the problem does not arise because of transitive dependencies but because of the type used for the dependency.
When using a specific type, example :

<dependency>
<groupId>fr.paris.lutece</groupId>
<artifactId>lutece-core</artifactId>
<version>2.2.1</version>
<type>lutece-core</ type>
</dependency>

The release prepare phase don't work, because the dependencies is not found.

When using no type, example :

<dependency>
<groupId>fr.paris.lutece</groupId>
<artifactId>lutece-core</artifactId>
<version>2.2.1</version>
</dependency>

The release prepare phase work correctly.

Show
jsteve added a comment - 28/Jul/08 9:59 AM the problem does not arise because of transitive dependencies but because of the type used for the dependency. When using a specific type, example :
<dependency> <groupId>fr.paris.lutece</groupId> <artifactId>lutece-core</artifactId> <version>2.2.1</version> <type>lutece-core</ type> </dependency>
The release prepare phase don't work, because the dependencies is not found. When using no type, example :
<dependency> <groupId>fr.paris.lutece</groupId> <artifactId>lutece-core</artifactId> <version>2.2.1</version> </dependency>
The release prepare phase work correctly.
Hide
Permalink
Géraud Dugé added a comment - 15/Jan/09 9:56 AM

This issue is still present in Continuum 1.2.2 with Maven 2.0.9.
Has someone any info about the resolution of this issue?

Show
Géraud Dugé added a comment - 15/Jan/09 9:56 AM This issue is still present in Continuum 1.2.2 with Maven 2.0.9. Has someone any info about the resolution of this issue?
Hide
Permalink
Sebastian Bathke added a comment - 02/Mar/09 4:15 AM - edited

I just modified the GenerateReactorProjects Class of the continuum-release module to invoke the usual "build()" instead of the "buildWithDependencies()" Method of the MavenProjectsBuilder (see attached Source snippet).
This resolves the problems with transitive Dependencies in my project.

I didn't had the time to read about the exact difference of this two methods, the idea to change it was the result of reading this comment in the "buildWithDependencies()" Method

// ----------------------------------------------------------------------
// Typically when the project builder is being used from maven proper
// the transitive dependencies will not be resolved here because this
// requires a lot of work when we may only be interested in running
// something simple like 'm2 clean'. So the artifact collector is used
// in the dependency resolution phase if it is required by any of the
// goals being executed. But when used as a component in another piece
// of code people may just want to build maven projects and have the
// dependencies resolved for whatever reason: this is why we keep
// this snippet of code here.
// ----------------------------------------------------------------------

I would appreciate if someone could look over this workaround

Continuum: 1.2.2
Maven: 2.0.9

Show
Sebastian Bathke added a comment - 02/Mar/09 4:15 AM - edited I just modified the GenerateReactorProjects Class of the continuum-release module to invoke the usual "build()" instead of the "buildWithDependencies()" Method of the MavenProjectsBuilder (see attached Source snippet). This resolves the problems with transitive Dependencies in my project. I didn't had the time to read about the exact difference of this two methods, the idea to change it was the result of reading this comment in the "buildWithDependencies()" Method // ---------------------------------------------------------------------- // Typically when the project builder is being used from maven proper // the transitive dependencies will not be resolved here because this // requires a lot of work when we may only be interested in running // something simple like 'm2 clean'. So the artifact collector is used // in the dependency resolution phase if it is required by any of the // goals being executed. But when used as a component in another piece // of code people may just want to build maven projects and have the // dependencies resolved for whatever reason: this is why we keep // this snippet of code here. // ---------------------------------------------------------------------- I would appreciate if someone could look over this workaround Continuum: 1.2.2 Maven: 2.0.9
Hide
Permalink
Jamie Cavanaugh added a comment - 06/Apr/09 6:59 PM

I'm using Contiuum 1.3.2 and Maven 2.0.9 and i have this issue.

My dependency is:

<dependency>
<groupId>datacom.ivs.service</groupId>
<artifactId>ivs-services-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>

And it works when i run release:prepare from the command line, but not through continuum.

I've tried changing the release preparationGoals to use clean install but still have the issue.

Any ideas?

Show
Jamie Cavanaugh added a comment - 06/Apr/09 6:59 PM I'm using Contiuum 1.3.2 and Maven 2.0.9 and i have this issue. My dependency is: <dependency> <groupId>datacom.ivs.service</groupId> <artifactId>ivs-services-ejb</artifactId> <version>${project.version}</version> <type>ejb</type> </dependency> And it works when i run release:prepare from the command line, but not through continuum. I've tried changing the release preparationGoals to use clean install but still have the issue. Any ideas?
Hide
Permalink
Maria Catherine Tan added a comment - 13/Apr/09 1:21 AM

This might be related to CONTINUUM-1997

Show
Maria Catherine Tan added a comment - 13/Apr/09 1:21 AM This might be related to CONTINUUM-1997
Hide
Permalink
Wendy Smoak added a comment - 11/Sep/09 4:06 PM

Is this still happening with the latest release?

If so, we need an example project that demonstrates the problem so we can use it as an integration test.

Show
Wendy Smoak added a comment - 11/Sep/09 4:06 PM Is this still happening with the latest release? If so, we need an example project that demonstrates the problem so we can use it as an integration test.
Hide
Permalink
Wendy Smoak added a comment - 02/Oct/09 4:30 PM

This has votes and a patch, still not sure if it's a problem in the latest release, but I'll add it to the backlog for someone to take a look.

Show
Wendy Smoak added a comment - 02/Oct/09 4:30 PM This has votes and a patch, still not sure if it's a problem in the latest release, but I'll add it to the backlog for someone to take a look.
Hide
Permalink
Brent N Atkinson added a comment - 10/Feb/10 6:11 PM

Attaching a project that reproduces the bug. Releases occur normally if executing from the command line, but releasing through continuum fails (on release:prepare at release phase generate-reactor-projects).

Show
Brent N Atkinson added a comment - 10/Feb/10 6:11 PM Attaching a project that reproduces the bug. Releases occur normally if executing from the command line, but releasing through continuum fails (on release:prepare at release phase generate-reactor-projects).
Hide
Permalink
Brent N Atkinson added a comment - 10/Feb/10 6:17 PM

For the record, I have reproduced this on continuum 1.3.5 running under jetty with Java6.

Show
Brent N Atkinson added a comment - 10/Feb/10 6:17 PM For the record, I have reproduced this on continuum 1.3.5 running under jetty with Java6.
Hide
Permalink
Brett Porter added a comment - 10/Feb/10 6:23 PM

I think this is the same problem I had performing a release on NPanday as well that I was meant to file.

Show
Brett Porter added a comment - 10/Feb/10 6:23 PM I think this is the same problem I had performing a release on NPanday as well that I was meant to file.
Hide
Permalink
Brent N Atkinson added a comment - 12/Feb/10 5:12 PM

In continuum-1.3.5, the stack trace is:

Thread [pool-3-thread-1] (Suspended (breakpoint at line 395 in DefaultMavenProjectBuilder))	
	DefaultMavenProjectBuilder.buildWithDependencies(File, ArtifactRepository, ProfileManager, TransferListener) line: 395	
	DefaultMavenProjectBuilder.buildWithDependencies(File, ArtifactRepository, ProfileManager) line: 343	
	GenerateReactorProjectsPhase.addModules(List<MavenProject>, MavenProject, ArtifactRepository) line: 153	
	GenerateReactorProjectsPhase.getReactorProjects(ReleaseDescriptor) line: 111	
	GenerateReactorProjectsPhase.execute(ReleaseDescriptor, Settings, List) line: 78	
	DefaultReleaseManager.prepare(ReleaseDescriptor, Settings, List, boolean, boolean, ReleaseManagerListener, ReleaseResult) line: 194	
	DefaultReleaseManager.prepareWithResult(ReleaseDescriptor, Settings, List, boolean, boolean, ReleaseManagerListener) line: 107	
	PrepareReleaseTaskExecutor.execute(ReleaseProjectTask) line: 44

From initial inspection, it appears that the submitted code might be appropriate. Why does continuum use buildWithDependencies(...)? I ran the attached build under maven 2.0.9 and it is never called. Instead, build(...) [line 198] is called. It also isn't called from anywhere else in the continuum codebase.

Show
Brent N Atkinson added a comment - 12/Feb/10 5:12 PM In continuum-1.3.5, the stack trace is:
Thread [pool-3-thread-1] (Suspended (breakpoint at line 395 in DefaultMavenProjectBuilder))	
	DefaultMavenProjectBuilder.buildWithDependencies(File, ArtifactRepository, ProfileManager, TransferListener) line: 395	
	DefaultMavenProjectBuilder.buildWithDependencies(File, ArtifactRepository, ProfileManager) line: 343	
	GenerateReactorProjectsPhase.addModules(List<MavenProject>, MavenProject, ArtifactRepository) line: 153	
	GenerateReactorProjectsPhase.getReactorProjects(ReleaseDescriptor) line: 111	
	GenerateReactorProjectsPhase.execute(ReleaseDescriptor, Settings, List) line: 78	
	DefaultReleaseManager.prepare(ReleaseDescriptor, Settings, List, boolean, boolean, ReleaseManagerListener, ReleaseResult) line: 194	
	DefaultReleaseManager.prepareWithResult(ReleaseDescriptor, Settings, List, boolean, boolean, ReleaseManagerListener) line: 107	
	PrepareReleaseTaskExecutor.execute(ReleaseProjectTask) line: 44
From initial inspection, it appears that the submitted code might be appropriate. Why does continuum use buildWithDependencies(...)? I ran the attached build under maven 2.0.9 and it is never called. Instead, build(...) [line 198] is called. It also isn't called from anywhere else in the continuum codebase.
Hide
Permalink
Brent N Atkinson added a comment - 12/Feb/10 5:15 PM

I've attached a patch based on continuum 1.3.5. It replaces usage of buildWithDependencies() with build() in continuum-release.

Show
Brent N Atkinson added a comment - 12/Feb/10 5:15 PM I've attached a patch based on continuum 1.3.5. It replaces usage of buildWithDependencies() with build() in continuum-release.
Hide
Permalink
Brett Porter added a comment - 22/Feb/10 6:00 AM

is there anything using the dependency artifacts that relies on them being resolved?

Show
Brett Porter added a comment - 22/Feb/10 6:00 AM is there anything using the dependency artifacts that relies on them being resolved?
Hide
Permalink
Maria Odea Ching added a comment - 01/Mar/10 2:56 AM

I tried reproducing this using the attached project and the build fails in ear-module when I built it on Continuum. It wasn't able to resolve the har-module jar because of the custom type. When I built the project from the root dir in the command line, everything builds successfully. But if I build each module individually, I also get the same error (failed to resolve artifact) in ear-module from the command-line.

Continuum builds each module/project separately that's why the build is failing in Continuum as well. Did you encounter the same problem if just building the project?

To get to the releasing part, I changed the default build defs to just run 'clean' in order to get a successful build for ear-module. I also encountered the same error posted above during release:prepare.

Show
Maria Odea Ching added a comment - 01/Mar/10 2:56 AM I tried reproducing this using the attached project and the build fails in ear-module when I built it on Continuum. It wasn't able to resolve the har-module jar because of the custom type. When I built the project from the root dir in the command line, everything builds successfully. But if I build each module individually, I also get the same error (failed to resolve artifact) in ear-module from the command-line. Continuum builds each module/project separately that's why the build is failing in Continuum as well. Did you encounter the same problem if just building the project? To get to the releasing part, I changed the default build defs to just run 'clean' in order to get a successful build for ear-module. I also encountered the same error posted above during release:prepare.
Hide
Permalink
Maria Odea Ching added a comment - 01/Mar/10 3:07 AM - edited

Moving up the jboss-packaging-maven-plugin config from har-module to the root pom in the test project fixed the build error when building each module/project individually. The failed to resolve artifact error still encountered during release:prepare.

Show
Maria Odea Ching added a comment - 01/Mar/10 3:07 AM - edited Moving up the jboss-packaging-maven-plugin config from har-module to the root pom in the test project fixed the build error when building each module/project individually. The failed to resolve artifact error still encountered during release:prepare.
Hide
Permalink
Maria Odea Ching added a comment - 02/Mar/10 2:57 AM

I think it is sufficient to use MavenProjectBuilder#build(...) instead of MavenProjectBuilder#buildWithDependencies(...) since we only need to get the projects to be added to the reactor in the GenerateReactorProjectsPhase and not the transitive dependencies.

Thanks for the patches Sebastian and Brent! I applied CONTINUUM-1814.patch to trunk -r917918.

Show
Maria Odea Ching added a comment - 02/Mar/10 2:57 AM I think it is sufficient to use MavenProjectBuilder#build(...) instead of MavenProjectBuilder#buildWithDependencies(...) since we only need to get the projects to be added to the reactor in the GenerateReactorProjectsPhase and not the transitive dependencies. Thanks for the patches Sebastian and Brent! I applied CONTINUUM-1814.patch to trunk -r917918.
Hide
Permalink
Maria Odea Ching added a comment - 02/Mar/10 5:24 AM

Changing fix version to 1.3.6. Merged the changes to 1.3.x branch -r917967.

Show
Maria Odea Ching added a comment - 02/Mar/10 5:24 AM Changing fix version to 1.3.6. Merged the changes to 1.3.x branch -r917967.

People

  • Assignee:
    Maria Odea Ching
    Reporter:
    jsteve
Vote (5)
Watch (6)

Dates

  • Created:
    02/Jul/08 10:33 AM
    Updated:
    02/Mar/10 5:24 AM
    Resolved:
    02/Mar/10 5:24 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.