The following comment has been added to this issue: Author: Eirik Maus Created: Tue, 29 Jun 2004 8:48 AM Body: More details:
The failing code is near the start of method: org.apache.maven.plugin.PluginManager.processDependencies() it looks like this: ForeheadClassLoader projectClassLoader = (ForeheadClassLoader) project.getContext().getClassLoader(); When launched from ant, the classloader is not a ForeheadClassLoader, but a sun.misc.Launcher$AppClassLoader --------------------------------------------------------------------- View this comment: http://jira.codehaus.org/browse/MAVEN-1322?page=comments#action_21148 --------------------------------------------------------------------- View the issue: http://jira.codehaus.org/browse/MAVEN-1322 Here is an overview of the issue: --------------------------------------------------------------------- Key: MAVEN-1322 Summary: ClassCastException crashes Maven Ant task Type: Bug Status: Unassigned Priority: Critical Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: maven Components: core Versions: 1.0-rc3 Assignee: Reporter: Eirik Maus Created: Wed, 16 Jun 2004 7:28 AM Updated: Tue, 29 Jun 2004 8:48 AM Environment: Windows XP, java 1.4.2 Description: Starting maven from an ant script is the simplest (and only?) way to integrate Maven with the IDEs that have ant support. However, I get a ClassCastException during the initialisation of the Maven core: [maven] java.lang.ClassCastException [maven] at org.apache.maven.plugin.PluginManager.processDependencies(PluginManager.java:379) [maven] at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:586) [maven] at org.apache.maven.MavenSession.attainGoals(MavenSession.java:266) [maven] at org.apache.maven.cli.App.doMain(App.java:485) [maven] at org.apache.maven.cli.App.main(App.java:1214) [maven] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [maven] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [maven] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [maven] at java.lang.reflect.Method.invoke(Method.java:324) [maven] at com.werken.forehead.Forehead.run(Forehead.java:551) [maven] at com.werken.forehead.Forehead.main(Forehead.java:581) [maven] at org.apache.maven.ant.MavenTask.execute(MavenTask.java:183) The goal executes normally when maven is started on the command line --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]