maven-issues mailing list archives

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

     [ http://jira.codehaus.org/browse/MNG-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

John Casey closed MNG-2225.
---------------------------

         Assignee: John Casey
       Resolution: Fixed
    Fix Version/s:     (was: 2.1)
                   2.1-alpha-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: http://jira.codehaus.org/browse/MNG-2225
>             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
> http://www.ibiblio.org/maven2/org/apache/maven/scm/maven-scm-api/1.0-beta-2/maven-scm-api-1.0-beta-2.jar
> http://www.ibiblio.org/maven2/org/apache/maven/scm/maven-scm-manager-plexus/1.0-beta-2/maven-scm-manager-plexus-1.0-beta-2.jar
> http://www.ibiblio.org/maven2/org/apache/maven/scm/maven-scm-provider-svn/1.0-beta-2/maven-scm-provider-svn-1.0-beta-2.jar
> http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/wagon/wagon-scm/1.0-alpha-7-SNAPSHOT/wagon-scm-1.0-alpha-7-20060308.183410-3.jar
> 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: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message