You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Fredrik Vraalsen (JIRA)" <ji...@codehaus.org> on 2006/05/11 11:28:40 UTC

[jira] Created: (MANTRUN-51) Can't find plugin dependency in multiproject

Can't find plugin dependency in multiproject
--------------------------------------------

         Key: MANTRUN-51
         URL: http://jira.codehaus.org/browse/MANTRUN-51
     Project: Maven 2.x Antrun Plugin
        Type: Bug

    Versions: 1.0, 1.1    
 Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
    Reporter: Fredrik Vraalsen


I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  

When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.

{{<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-antrun-plugin</artifactId>
	<executions>
		<execution>
			<phase>package</phase>
			<configuration>
				<tasks>
					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
				</tasks>
			</configuration>
			<goals>
				<goal>run</goal>
			</goals>
		</execution>
	</executions>
	<dependencies>
		<dependency>
			<groupId>izpack</groupId>
			<artifactId>standalone-compiler</artifactId>
			<version>3.8.0</version>
		</dependency>
	</dependencies>
</plugin>}}

{{[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        ... 24 more}}

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


[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Filippos Slavik (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=comments#action_83491 ] 
            
Filippos Slavik commented on MANTRUN-51:
----------------------------------------

Well, I have the same problem and I finally have an explanation. The problem occurs in a multi-module projects where the antrun plugin is being used in more than one module. 

In my case, let's say that my multi-module project has modules A and B. Both modules are using the antrun plugin, but only module B specifies an additional  classpath  for the antrun plugin. If I invoke the antrun plugin within module B everything works great but if I do that  from the parent, then my build fails. This is because module A ran it's build cycle before B and for some reason the maven.plugin.classpath was not altered for the antrun plugin when running module B build  (perhaps because it was already defined from module A).

Thanks


> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Bas van der Bent (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162651#action_162651 ] 

Bas van der Bent edited comment on MANTRUN-51 at 1/27/09 5:23 AM:
------------------------------------------------------------------

Thanks Anders and Aaron! That really helped me out.

As I run it:

<project>
    <parent>
...
    </parent>

    <!-- Dependencies. -->
   <dependencies>
      <dependency>
      ....
      </dependency>
      <!-- http://jira.codehaus.org/browse/MANTRUN-51 --> 
      <dependency>
         <groupId>ant-contrib</groupId>
         <artifactId>ant-contrib</artifactId>
         <version>1.0b3</version>
         <!-- antrun uses a different version of ant --> 
         <exclusions>
            <exclusion>
               <groupId>ant</groupId>
               <artifactId>ant</artifactId>
            </exclusion>
         </exclusions>
         <scope>provided</scope>
      </dependency>
    </dependencies>
 <profiles>

    <build>
      <plugins> 
		<plugin>
            <artifactId>maven-antrun-plugin</artifactId>
			<executions>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
<!-- adds the ant-contrib tasks (if/then/else used below) -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"  classpathref="maven.compile.classpath" />
...
etc				


      was (Author: bvdbent):
    Thanks Aaron! that really helped me out.

As I run it:

<project>
    <parent>
...
    </parent>

    <!-- Dependencies. -->
   <dependencies>
      <dependency>
      ....
      </dependency>
      <!-- http://jira.codehaus.org/browse/MANTRUN-51 --> 
      <dependency>
         <groupId>ant-contrib</groupId>
         <artifactId>ant-contrib</artifactId>
         <version>1.0b3</version>
         <!-- antrun uses a different version of ant --> 
         <exclusions>
            <exclusion>
               <groupId>ant</groupId>
               <artifactId>ant</artifactId>
            </exclusion>
         </exclusions>
         <scope>provided</scope>
      </dependency>
    </dependencies>
 <profiles>

    <build>
      <plugins> 
		<plugin>
            <artifactId>maven-antrun-plugin</artifactId>
			<executions>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
<!-- adds the ant-contrib tasks (if/then/else used below) -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"  classpathref="maven.compile.classpath" />
...
etc				

  
> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Brian Topping (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101098 ] 

Brian Topping commented on MANTRUN-51:
--------------------------------------

I'm looking at my build and think I have found a lead.  I don't know the solution yet.  Can others look at their build and see if this sounds right?

The build I am having problems with this on has a parent POM.  Both the child and parent POMs have separate antrun executions.  Initially, when I would execute the child build, everything would work fine, including the parent executions.  But in reactor, the child fails.  

Then I took the dependency that seems to be getting lost in the child build and duplicated it to the (seemingly) unrelated antrun plugin configuration in the parent.  Problem solved.

I think this configuration creates a circular dependency in my case, but it did solve the problem.  Now, on to seeing what I can do with it.  Maybe move the dependencies into the executions instead of at the global level.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "bastian kaempfe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133654#action_133654 ] 

seafoxx edited comment on MANTRUN-51 at 5/6/08 5:21 AM:
----------------------------------------------------------------

My guess is that the problem is caused ANT.
description of the ant-property-task:
*Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.*

i think, this might be the root cause of these problems.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the {{maven-antrun-plugins}} tries to set several properties, for example: {{maven.plugin.classpath}}.
so the first project wins. every property this {{maven-antrun-plugin}} sets will be available in every other projet, running after this one. and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the {{fork}} of the {{maven-compiler-plugin}}.
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a {{maven-antrun-plugin}}-block.
could be: prefix={{srcgen}} -> maven property : {{maven.plugin.classpath.srcgen}} instead of only {{maven.plugin.classpath}}
or one could use the {{maven-antrun-plugin}}-{{id}}, if one is provided.
so if my execution-id is {{backend-wsdl2java}} the maven-set properties could be {{maven.plugin.classpath.backend-wsdl2java}}

i hope, this helps in understanding and solving...


      was (Author: seafoxx):
    My guess is that the problem is caused ANT.
description of the ant-property-task:
Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.

i think, this might be the root cause of these problems.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the maven-antrun-plugins tries to set several properties, for example: "maven.plugin.classpath".
so the first project wins. every property this antrun-plugin sets will be available in every other projet, running after this one.
and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the "fork" of the "maven-compiler-plugin".
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a "maven-antrun-plugin"-block.
could be: prefix="srcgen" -> maven property : "maven.plugin.classpath.srcgen" instead of only "maven.plugin.classpath"
or one could use the "maven-antrun-plugin"-"id", if one is provided.
so if my execution-id is "backend-wsdl2java" the maven-set properties could be "maven.plugin.classpath.backend-wsdl2java"

i hope, this helps in understanding and solving...

  
> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Updated: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated MANTRUN-51:
-----------------------------

    Fix Version/s: 1.4

This is an issue in Maven core and is fixed in Maven 3.  For the antrun plugin, documentation should be added to the plugin site that shows how to deal with this problem, and then this issue can be closed.

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>             Fix For: 1.4
>
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Anders Li (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=152990#action_152990 ] 

Anders Li commented on MANTRUN-51:
----------------------------------

Using "classpathref" of taskdef to specify the classpath in which your ant task is.

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>JPA Enhance</id>
            <phase>process-classes</phase>
            <configuration>
              <tasks>
                <!-- "classpathref" will make the 'ANT' task found when launching this project build from parent module. -->
                <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="maven.compile.classpath"/>
                
                <openjpac addDefaultConstructor="true" enforcePropertyRestrictions="true" tmpClassLoader="false">
                  <classpath refid="maven.compile.classpath"/>
                  <fileset dir="./src/main/java">
                    <include name="**/authentication/db/*.java"/>
                  </fileset>
                  <config propertiesFile="./src/main/resources/META-INF/openjpa.xml"/>
                </openjpac>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "bastian kaempfe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133654#action_133654 ] 

seafoxx edited comment on MANTRUN-51 at 5/6/08 5:17 AM:
----------------------------------------------------------------

My guess is that the problem is caused ANT.
description of the ant-property-task:
Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.

i think, this might be the root cause of these problems.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the maven-antrun-plugins tries to set several properties, for example: "maven.plugin.classpath".
so the first project wins. every property this antrun-plugin sets will be available in every other projet, running after this one.
and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the "fork" of the "maven-compiler-plugin".
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a "maven-antrun-plugin"-block.
could be: prefix="srcgen" -> maven property : "maven.plugin.classpath.srcgen" instead of only "maven.plugin.classpath"
or one could use the "maven-antrun-plugin"-"id", if one is provided.
so if my execution-id is "backend-wsdl2java" the maven-set properties could be "maven.plugin.classpath.backend-wsdl2java"

i hope, this helps in understanding and solving...


      was (Author: seafoxx):
    My guess is that the problem is caused ANT.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the maven-antrun-plugins tries to set several properties, for example: "maven.plugin.classpath".
so the first project wins. every property this antrun-plugin sets will be available in every other projet, running after this one.
and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the "fork" of the "maven-compiler-plugin".
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a "maven-antrun-plugin"-block.
could be: prefix="srcgen" -> maven property : "maven.plugin.classpath.srcgen" instead of only "maven.plugin.classpath"
or one could use the "maven-antrun-plugin"-"id", if one is provided.
so if my execution-id is "backend-wsdl2java" the maven-set properties could be "maven.plugin.classpath.backend-wsdl2java"

i hope, this helps in understanding and solving...

  
> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Closed: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier closed MANTRUN-51.
----------------------------

    Resolution: Fixed
      Assignee: Paul Gier

Documentation about this issue was added to the site FAQ in [r790402|http://svn.apache.org/viewvc?view=rev&revision=790402].
A note about it has also been added to the plugin [wiki page|http://docs.codehaus.org/display/MAVENUSER/Antrun+Plugin] 

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>            Assignee: Paul Gier
>             Fix For: 1.4
>
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Bas van der Bent (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162651#action_162651 ] 

Bas van der Bent edited comment on MANTRUN-51 at 1/27/09 5:18 AM:
------------------------------------------------------------------

Thanks Aaron! that really helped me out.

As I run it:

<project>
    <parent>
...
    </parent>

    <!-- Dependencies. -->
   <dependencies>
      <dependency>
      ....
      </dependency>
      <!-- http://jira.codehaus.org/browse/MANTRUN-51 --> 
      <dependency>
         <groupId>ant-contrib</groupId>
         <artifactId>ant-contrib</artifactId>
         <version>1.0b3</version>
         <!-- antrun uses a different version of ant --> 
         <exclusions>
            <exclusion>
               <groupId>ant</groupId>
               <artifactId>ant</artifactId>
            </exclusion>
         </exclusions>
         <scope>provided</scope>
      </dependency>
    </dependencies>
 <profiles>
...
etc				


      was (Author: bvdbent):
    Thanks Aaron! that really helped me out.
  
> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Alexey Kharlamov (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=comments#action_75458 ] 
            
Alexey Kharlamov commented on MANTRUN-51:
-----------------------------------------

I have the same problem. Any progress since 06/May?

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "bastian kaempfe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133654#action_133654 ] 

bastian kaempfe commented on MANTRUN-51:
----------------------------------------

My guess is that the problem is caused ANT.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the maven-antrun-plugins tries to set several properties, for example: "maven.plugin.classpath".
so the first project wins. every property this antrun-plugin sets will be available in every other projet, running after this one.
and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the "fork" of the "maven-compiler-plugin".
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a "maven-antrun-plugin"-block.
could be: prefix="srcgen" -> maven property : "maven.plugin.classpath.srcgen" instead of only "maven.plugin.classpath"
or one could use the "maven-antrun-plugin"-"id", if one is provided.
so if my execution-id is "backend-wsdl2java" the maven-set properties could be "maven.plugin.classpath.backend-wsdl2java"

i hope, this helps in understanding and solving...


> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Brian Topping (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101098 ] 

Brian Topping edited comment on MANTRUN-51 at 7/3/07 2:10 PM:
--------------------------------------------------------------

I'm looking at my build and think I have found a lead.  I don't know the solution yet.  Can others look at their build and see if this sounds right?

The build I am having problems with this on has a parent POM.  Both the child and parent POMs have separate antrun executions.  Initially, when I would execute the child build, everything would work fine, including the parent executions.  But in reactor, the child fails.  

Then I took the dependency that seems to be getting lost in the child build and duplicated it to the (seemingly) unrelated antrun plugin configuration in the parent.  Problem solved.

I think this configuration creates a circular dependency in my case, but it did solve the problem.  Now, on to seeing what I can do with it.  Maybe move the dependencies into the executions instead of at the global level.

UPDATE:  For some reason, comments were not showing up when I posted this.  Seems this is old news.


 was:
I'm looking at my build and think I have found a lead.  I don't know the solution yet.  Can others look at their build and see if this sounds right?

The build I am having problems with this on has a parent POM.  Both the child and parent POMs have separate antrun executions.  Initially, when I would execute the child build, everything would work fine, including the parent executions.  But in reactor, the child fails.  

Then I took the dependency that seems to be getting lost in the child build and duplicated it to the (seemingly) unrelated antrun plugin configuration in the parent.  Problem solved.

I think this configuration creates a circular dependency in my case, but it did solve the problem.  Now, on to seeing what I can do with it.  Maybe move the dependencies into the executions instead of at the global level.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "bastian kaempfe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133654#action_133654 ] 

seafoxx edited comment on MANTRUN-51 at 5/6/08 5:42 AM:
----------------------------------------------------------------

still got the same problem.

      was (Author: seafoxx):
    My guess is that the problem is caused ANT.
description of the ant-property-task:
*Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.*

i think, this might be the root cause of these problems.
ANT simply can set properties only ONE TIME. if you try to set a named property severeal times, you succeed only the first time.
every next try does not overwrite the first value, thus when using the property, you will always get the first value.

the {{maven-antrun-plugins}} tries to set several properties, for example: {{maven.plugin.classpath}}.
so the first project wins. every property this {{maven-antrun-plugin}} sets will be available in every other projet, running after this one. and no other project can overwrite properties, the first project has set.

maybe the solution could be to start the ant-task in an own java-process, like the {{fork}} of the {{maven-compiler-plugin}}.
another way could be to define a "prefix" or "suffix" for every property that will be set by maven within a {{maven-antrun-plugin}}-block.
could be: prefix={{srcgen}} -> maven property : {{maven.plugin.classpath.srcgen}} instead of only {{maven.plugin.classpath}}
or one could use the {{maven-antrun-plugin}}-{{id}}, if one is provided.
so if my execution-id is {{backend-wsdl2java}} the maven-set properties could be {{maven.plugin.classpath.backend-wsdl2java}}

i hope, this helps in understanding and solving...

  
> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Filippos Slavik (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_93981 ] 

Filippos Slavik commented on MANTRUN-51:
----------------------------------------

Give an unique <id> for each "execution" section of the antrun plugin  in your pom's and let us know if this fixes the issue.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Florian Kolbe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166900#action_166900 ] 

Florian Kolbe edited comment on MANTRUN-51 at 2/24/09 11:58 AM:
----------------------------------------------------------------

Moving the dependency snippet to the build tag of the module did not help for me (mvn 2.0.9) but moving it to this snippet of the parent pom:

{code:xml} 
  <build>
    <pluginManagement>
      <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
          <dependencies>
            <dependency>
              <groupId>ant</groupId>
              <artifactId>ant-optional</artifactId>
              <version>1.5.3-1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
{code} 


      was (Author: in-fke):
    Moving the dependency snippet to the build tag of the module did not help for me (mvn 2.0.9) but moving it to this snippet of the parent pom:

  <build>
    <pluginManagement>
      <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
          <dependencies>
            <dependency>
              <groupId>ant</groupId>
              <artifactId>ant-optional</artifactId>
              <version>1.5.3-1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>


  
> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Issue Comment Edited: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Bas van der Bent (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162651#action_162651 ] 

Bas van der Bent edited comment on MANTRUN-51 at 1/27/09 5:21 AM:
------------------------------------------------------------------

Thanks Aaron! that really helped me out.

As I run it:

<project>
    <parent>
...
    </parent>

    <!-- Dependencies. -->
   <dependencies>
      <dependency>
      ....
      </dependency>
      <!-- http://jira.codehaus.org/browse/MANTRUN-51 --> 
      <dependency>
         <groupId>ant-contrib</groupId>
         <artifactId>ant-contrib</artifactId>
         <version>1.0b3</version>
         <!-- antrun uses a different version of ant --> 
         <exclusions>
            <exclusion>
               <groupId>ant</groupId>
               <artifactId>ant</artifactId>
            </exclusion>
         </exclusions>
         <scope>provided</scope>
      </dependency>
    </dependencies>
 <profiles>

    <build>
      <plugins> 
		<plugin>
            <artifactId>maven-antrun-plugin</artifactId>
			<executions>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
<!-- adds the ant-contrib tasks (if/then/else used below) -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"  classpathref="maven.compile.classpath" />
...
etc				


      was (Author: bvdbent):
    Thanks Aaron! that really helped me out.

As I run it:

<project>
    <parent>
...
    </parent>

    <!-- Dependencies. -->
   <dependencies>
      <dependency>
      ....
      </dependency>
      <!-- http://jira.codehaus.org/browse/MANTRUN-51 --> 
      <dependency>
         <groupId>ant-contrib</groupId>
         <artifactId>ant-contrib</artifactId>
         <version>1.0b3</version>
         <!-- antrun uses a different version of ant --> 
         <exclusions>
            <exclusion>
               <groupId>ant</groupId>
               <artifactId>ant</artifactId>
            </exclusion>
         </exclusions>
         <scope>provided</scope>
      </dependency>
    </dependencies>
 <profiles>
...
etc				

  
> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Steinar Bang (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116302 ] 

Steinar Bang commented on MANTRUN-51:
-------------------------------------

I encountered this issue when using the replaceregexp task.  To make it work I had to put the following inside the <plugin> def for maven-antrun-plugin:
     <dependencies>
      <dependency>
       <!-- Pulls in a JAR used by the replaceregexp optional Ant task -->
       <groupId>ant</groupId>
       <artifactId>ant-nodeps</artifactId>
       <version>1.6.5</version>
      </dependency>
     </dependencies>
(put it between the <executions> end tag and the <plugin> end tag).

When I tried running this project as a module in a multi-module product the use of replaceregexp failed because it could not be found on the classpath.

The workaround I did was (as indicated in a different comment) to add the <dependency> setting to the maven-antrun-plugin config of a module that was built before the failing module (even though that maven-antrun-plugin config didn't have any tasks needing it).  Then I could build from the top pom without failure.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Bas van der Bent (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162651#action_162651 ] 

Bas van der Bent commented on MANTRUN-51:
-----------------------------------------

Thanks Aaron! that really helped me out.

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Elid OR (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_93980 ] 

Elid OR commented on MANTRUN-51:
--------------------------------

Near one year later this bug isn't not fixed yet ...

A solution (not elegant) is to add your dependencies (in the dependencies of the antrun plugin section)  in the pom.xml of the first module launched in the build order.
This allow all other projects to benefit of these dependencies.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Patrick Vinograd (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106673 ] 

Patrick Vinograd commented on MANTRUN-51:
-----------------------------------------

Just ran into this issue.  For those encountering the same problem, Filippos's suggestion does NOT work.  All of my executions have unique id elements and this behavior still occurs.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Oscar Hierro (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194162#action_194162 ] 

Oscar Hierro commented on MANTRUN-51:
-------------------------------------

I just run into this issue and used Anders Li's workaround as it's the best solution IMO.

Shouldn't this have been fixed already after 3 years?

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Aaron Pieper (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154983#action_154983 ] 

Aaron Pieper commented on MANTRUN-51:
-------------------------------------

I was able to work around this issue by moving the antrun plugin dependencies out to the project level, and scoping them as "provided". It's kind of a messy fix, but it at least keeps the dependencies in the correct pom.xml

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "gotama (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126760 ] 

gotama commented on MANTRUN-51:
-------------------------------

Steinar - THANK YOU for the workaround! OMG I was going nuts for 2 days trying to figure this out. I figured it was a bug. I was simply trying to use Ant to scp some files and discovered the same - that on the module itself, it works but when exec from a parent POM on a multi-module project, the 'scp' fails. I added:

                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-optional</artifactId>
                        <version>1.5.3-1</version>
                    </dependency>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-jsch</artifactId>
                        <version>1.6.5</version>
                    </dependency>
                </dependencies>

to the ant plugin for the first executing module in the multi-module project and when the last module was exec'd w/ the 'scp' command, all worked ok.

OK, so this bug is 2 years old and still causing pain.  Whats the status on getting this fixed? Any interest? Thanks.




> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Updated: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTRUN-51?page=all ]

Kenney Westerhof updated MANTRUN-51:
------------------------------------

    Description: 
I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  

When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.

{noformat}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-antrun-plugin</artifactId>
	<executions>
		<execution>
			<phase>package</phase>
			<configuration>
				<tasks>
					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
				</tasks>
			</configuration>
			<goals>
				<goal>run</goal>
			</goals>
		</execution>
	</executions>
	<dependencies>
		<dependency>
			<groupId>izpack</groupId>
			<artifactId>standalone-compiler</artifactId>
			<version>3.8.0</version>
		</dependency>
	</dependencies>
</plugin>

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        ... 24 more
{noformat}

  was:
I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  

When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.

{{<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-antrun-plugin</artifactId>
	<executions>
		<execution>
			<phase>package</phase>
			<configuration>
				<tasks>
					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
				</tasks>
			</configuration>
			<goals>
				<goal>run</goal>
			</goals>
		</execution>
	</executions>
	<dependencies>
		<dependency>
			<groupId>izpack</groupId>
			<artifactId>standalone-compiler</artifactId>
			<version>3.8.0</version>
		</dependency>
	</dependencies>
</plugin>}}

{{[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        ... 24 more}}


> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>          Key: MANTRUN-51
>          URL: http://jira.codehaus.org/browse/MANTRUN-51
>      Project: Maven 2.x Antrun Plugin
>         Type: Bug

>     Versions: 1.0, 1.1
>  Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>     Reporter: Fredrik Vraalsen

>
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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


[jira] Commented: (MANTRUN-51) Can't find plugin dependency in multiproject

Posted by "Elid OR (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94071 ] 

Elid OR commented on MANTRUN-51:
--------------------------------

There are multiple poms, one per module. And in each pom there is a antrun section. In each antrun section there could be multiple execution section, for me there is only one exection section in each antrun declaration. And I have set a unique Id for each execution but it doesn't now work. Only  plugin classpath of the first antrun section of the first pom is used in all module of a multi project.

> Can't find plugin dependency in multiproject
> --------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Updated: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Sanchez updated MANTRUN-51:
----------------------------------

    Summary: Problems with multiple antrun declarations in multiproject  (was: Can't find plugin dependency in multiproject)

> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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

        

[jira] Commented: (MANTRUN-51) Problems with multiple antrun declarations in multiproject

Posted by "Florian Kolbe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTRUN-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166900#action_166900 ] 

Florian Kolbe commented on MANTRUN-51:
--------------------------------------

Moving the dependency snippet to the build tag of the module did not help for me (mvn 2.0.9) but moving it to this snippet of the parent pom:

  <build>
    <pluginManagement>
      <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
          <dependencies>
            <dependency>
              <groupId>ant</groupId>
              <artifactId>ant-optional</artifactId>
              <version>1.5.3-1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>



> Problems with multiple antrun declarations in multiproject
> ----------------------------------------------------------
>
>                 Key: MANTRUN-51
>                 URL: http://jira.codehaus.org/browse/MANTRUN-51
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1
>         Environment: maven 2.0.4, antrun 1.0 & 1.1, jdk 1.5.0_06, windows xp
>            Reporter: Fredrik Vraalsen
>
> I'm using antrun in my project to create an IzPack installation.  The plugin configuration is below.  
> When maven is run from the top-level project, the ant taskdef fails because it cannot find the IzPackTask class.  However, when I run maven from the subproject itself, it works fine.  Not sure if this is related to http://jira.codehaus.org/browse/MANTRUN-49.  The error message from maven is at the bottom.
> {noformat}
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-antrun-plugin</artifactId>
> 	<executions>
> 		<execution>
> 			<phase>package</phase>
> 			<configuration>
> 				<tasks>
> 					<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask"/>
> 					<izpack input="${project.build.directory}/classes/izPack.xml" output="${project.build.directory}/CorasTool-${coras.version}-installer.jar" basedir="${project.build.directory}"/>
> 				</tasks>
> 			</configuration>
> 			<goals>
> 				<goal>run</goal>
> 			</goals>
> 		</execution>
> 	</executions>
> 	<dependencies>
> 		<dependency>
> 			<groupId>izpack</groupId>
> 			<artifactId>standalone-compiler</artifactId>
> 			<version>3.8.0</version>
> 		</dependency>
> 	</dependencies>
> </plugin>
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> Embedded error: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:77)
>         at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:72)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: taskdef class com.izforge.izpack.ant.IzPackTask cannot be found
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:483)
>         at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:71)
>         ... 19 more
> Caused by: java.lang.ClassNotFoundException: com.izforge.izpack.ant.IzPackTask
>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
>         at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
>         at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
>         ... 24 more
> {noformat}

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