[ http://jira.codehaus.org/browse/MAVEN-1576?page=all ]

Arnaud Heritier closed MAVEN-1576.
----------------------------------

    Resolution: Won't Fix

Not enough important to fix it.

> expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
> ---------------------------------------------------------------------
>
>                 Key: MAVEN-1576
>                 URL: http://jira.codehaus.org/browse/MAVEN-1576
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0.2
>         Environment: Linux
>            Reporter: Willie Milnor
>
> I am trying to get around using com.werken.forehead.Forehead to run Maven, 
> and instead use my own class that extends org.apache.maven.cli.App.  However, 
> I get the following error no matter what I try:
> java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader
>         at 
> org.apache.maven.plugin.PluginManager.processDependencies(PluginManager.java:437)
>         at 
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:642)
>         at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
>         at MyApp.myDoMain(MyApp.java:80)
>         at MyApp.main(MyApp.java:575)
> I know that this is caused by the following line:
> ForeheadClassLoader projectClassLoader = 
> (ForeheadClassLoader)project.getContext().getClassLoader();
> I assume that when com.werken.forehead.Forehead is called, it somehow sets 
> the class loader (for the context) to an instance of ForeheadClassLoader; but 
> by calling my class directly, the context uses an instance of 
> sun.misc.Launcher$AppClassLoader.
> I am able to run my own class calling com.werken.forehead.Forehead first (I 
> edited the forehead.conf file), and it works as it should.  I tried setting 
> the class loader for the context using a ForeheadClassLoader, but that loader 
> is changed somewhere along the way to processing the dependencies.
> Is there a way around this problem?  I am using maven 1.0.2...is there a 
> newer beta version of maven that expects simply a ClassLoader rather than a 
> ForeheadClassLoader?

-- 
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

        

Reply via email to