The following comment has been added to this issue:
Author: Eirik Maus
Created: Wed, 16 Jun 2004 9:49 AM
Body:
Ant versions: don't know. The one in IntelliJ 4.0.3 and the one provided with Maven.
I tried to escape IntelliJ's ant version with the following code, in order to use the
ant version inside maven. No difference.
First fork new ant in new java VM:
<target name="site" >
<java fork="true" classname="org.apache.tools.ant.Main" >
<classpath>
<fileset dir="${maven.dir}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<arg value="-f"/><arg value="ant-space2.xml" />
<arg value="site-impl" />
</java>
</target>
And then start maven from there:
<target name="site-impl">
<taskdef name="maven"
classname="org.apache.maven.ant.MavenTask">
<classpath>
<fileset dir="${maven.dir}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<maven mavenHome="${maven.dir}"
goalName="multiproject:site"
projectBuildFile="maven.xml"
projectFileName="project.xml"
toolsJar="${java.home}/lib/tools.jar"
/>
</target>
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MAVEN-1322?page=comments#action_20713
---------------------------------------------------------------------
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: Wed, 16 Jun 2004 9:49 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]