continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gautham Pamu" <gautham.p...@gmail.com>
Subject Classloader problem with antrun with run from continuum
Date Mon, 12 Jun 2006 21:46:17 GMT
Hi Everyone,

I am using antrun plugin to run ant task during generate-resources
phase. I was able to run the task
outside continuum but when I run from continuum. I am getting
classnotfound errors.. Is this bug in maven
or the plugin or continuum.

mvn version 2.0.3
continuum version 1.0.3
plugin version: antrun version 1.1

pom file details

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <!-- <id>compile</id> -->
            <phase>generate-resources</phase>
            <configuration>
              <tasks>
                <ant antfile="./src/build1.xml" inheritRefs="true">
                  <target name="main"/>
                </ant>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant-antlr</artifactId>
            <version>1.6.5</version>
          </dependency>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>antlrall</artifactId>
            <version>2.7.4</version>
          </dependency>

This is the output of mvn with -X option. when I run it outside
continuum, I clearly see the dependencies in
the artifacts list... from continuum I get following output.. you can
see from the artifacts list..that the dependencies
are missing..

[DEBUG] Found deletable paths: []
[DEBUG] com.sample:sample:jar:1.0 (selected for null)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' -->
[DEBUG]   (f) artifacts = [ant:ant:jar:1.6.5:runtime,
ant:ant-launcher:jar:1.6.5:runtime,
org.apache.maven:maven-project:jar:2.0.1:runtime,
org.apache.maven:maven-plugin-api:jar:2.0.1:runtime]
[DEBUG]   (f) project = org.apache.maven.project.MavenProject@11b1168d
[DEBUG]   (f) tasks =
[DEBUG] -- end configuration --
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
[DEBUG] rpm-maven-plugin: resolved to version
1.0-alpha-2-20060116.043106-1 from repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-sandbox::1 for
project: null:rpm-maven-plugin:maven-plugin:1.0-alpha-2-20060116.043106-1
from the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::6 for project:
null:mojo-sandbox:pom:1 from the repository.
[DEBUG] rpm-maven-plugin: resolved to version
1.0-alpha-2-20060116.043106-1 from repository Maven Snapshots
[DEBUG] changelog-maven-plugin: resolved to version
2.0-beta-2-20060307.142230-7 from repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::7 for project:
null:changelog-maven-plugin:maven-plugin:2.0-beta-2-20060307.142230-7
from the repository.
[DEBUG] changelog-maven-plugin: resolved to version
2.0-beta-2-20060307.142230-7 from repository Maven Snapshots
[DEBUG] com.ibm.csdp.resources:csdp.resources:jar:1.0 (selected for null)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' -->
[DEBUG]   (f) artifacts = [ant:ant:jar:1.6.5:runtime,
ant:ant-launcher:jar:1.6.5:runtime,
org.apache.maven:maven-project:jar:2.0.1:runtime,
org.apache.maven:maven-plugin-api:jar:2.0.1:runtime]
[DEBUG]   (f) project = org.apache.maven.project.MavenProject@11b1168d
[DEBUG]   (f) tasks =
[DEBUG] -- end configuration --
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
[DEBUG] getProperty(ns=null, name=ant.executor.class, user=false)
[DEBUG] getProperty(ns=null, name=ant.file, user=false)
[INFO] -----------------------------------------------



Embedded error: The following error occurred while executing this line:
/opt/continuum/apps/working-directory/2/com.sample/src/build1.xml:4:
taskdef class com.sample.SampleTask cannot be found
[INFO] ------------------------------------------------------------------------
[DEBUG] 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:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	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:114)
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
	... 17 more
Caused by: The following error occurred while executing this line:
/opt/continuum/apps/working-directory/2/com.sample/src/build1.xml:4:
taskdef class com.sample.SampleTask cannot be found
	at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:336)
	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:108)
	... 20 more
Caused by: /opt/continuum/apps/working-directory/2/com.sample/src/build1.xml:4:
taskdef class com.sample.SampleTask
 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.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:334)
	... 24 more
Caused by: java.lang.ClassNotFoundException: com.sample.SampleTask
	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(Compiled Code))
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:260)
	at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
	... 31 more



-- 
-Gautham Pamu

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message