maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Casey (JIRA)" <>
Subject [jira] Closed: (MNG-2225) Classloader problem when adding jars to M2_HOME
Date Tue, 05 Feb 2008 21:48:30 GMT


John Casey closed MNG-2225.

         Assignee: John Casey
       Resolution: Fixed
    Fix Version/s:     (was: 2.1)

You should be able to bring in any extras now using the build extension mechanism, and only
the extension components themselves will be added to the core container realm. As long as
these components implement interfaces already present in the core realm, or (I suppose) represent
themselves (i.e. they aren't going to be referenced by some interface they bring along in
their jar) they should be available without problem.

Dependencies of these extension components are actually loaded into a per-extension realm,
and the ext. component classes are imported from that realm into a project-specific realm
that inherits from the core realm. This means that the core realm is available, as are the
ext. components. However, the ext dependencies are isolated in their own realm, where only
those ext components have access to them.

There should be no need to modify the ${maven.home}/lib directory now, since you can specify
these extensions at the parent-pom level.

> Classloader problem when adding jars to M2_HOME
> -----------------------------------------------
>                 Key: MNG-2225
>                 URL:
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>            Reporter: Carlos Sanchez
>            Assignee: John Casey
>            Priority: Critical
>             Fix For: 2.1-alpha-1
>         Attachments: testwagonscm.tgz
> Added these jars to M2_HOME/custom to allow using scm based remote repos
> bin/m2.conf
> main is org.apache.maven.cli.MavenCli from plexus.core.maven
> set maven.home default ${user.home}/m2
> [plexus.core]
> load ${maven.home}/core/*.jar
> [plexus.core.maven]
> load ${maven.home}/custom/*.jar
> load ${maven.home}/lib/*.jar
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message