Issue Details (XML | Word | Printable)

Key: MNG-2228
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Brett Porter
Reporter: Carlos Sanchez
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Maven 2

Classloader problem loading jars from build extensions

Created: 14/Apr/06 06:10 PM   Updated: 25/Jan/07 11:26 PM
Component/s: Dependencies
Affects Version/s: 2.0.4
Fix Version/s: 2.0.5

Time Tracking:
Not Specified

File Attachments: 1. File MNG-2228.tgz (2 kB)

Issue Links:
Related

Complexity: Intermediate


 Description  « Hide
When running "mvn install" and "mvn testwagonscm:test" in the attached test case you get a ClassCastException although the Class to assign to and the assigned one are the same. The problem seems to be that they come from different classloaders. This problem makes the project-info-report:scm goal fail.

Same as MNG-2225, but using build extensions instead of jars in M2_HOME



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Carlos Sanchez added a comment - 26/Apr/06 05:22 PM
This breaks generation of site when wagon-scm is in the build extensions, eg. to deploy the site to svn or cvs for Collabnet (dev.java.net)

When running site Maven tries always to instantiate projec-info-report mojos before checking in the pom for "exclude default reports" option.

The only way to generate the site was install the project-info-report plugin after removing the class ScmReport. It has to go under the same groupId, org.apache.maven.plugins, which makes it a real hack


John Casey added a comment - 22/Jun/06 03:18 PM
This would require some heavy refactoring to introduce a new way to manage artifacts in the core classloader during the resolution process. See MNG-2225 for more information.

Carlos Sanchez added a comment - 28/Nov/06 07:19 PM
Another worst problem is that it causes the release:prepare to fail too

Carlos Sanchez added a comment - 28/Nov/06 07:20 PM
New patch with less snapshots

Brett Porter added a comment - 31/Dec/06 12:19 AM
this caused some problems with the release plugin because jdom was in the root container (via wagon-webdav), but jaxen was not (because it is optional, so it was not caught by the resolution I added).

I have an alternate solution putting extensions in a child container like plugins which is working. I will clean up and commit tomorrow.

This could be reviewed and handled differently for trunk given the changes to plexus and classworlds. I'll examine that separately.