You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ra...@jpmchase.com on 2006/07/26 23:35:19 UTC

classpath problem with ant plugin

Hi All,

I'm trying to use antrun plugin to call build.xml 

but when i call it eventhough i have defined jar as dependency in ant 
plugin execution i'm still getting  "java.lang.NoClassDefFoundError" can 
any one pls help me with this,

This iswhat i'm doing, i have build.xml generated from weblogic workshop, 
and calling that build.xml as follows in my pom

                        <plugin>
 <artifactId>maven-antrun-plugin</artifactId>
                                <executions>
                                        <execution>
 <id>WORKSHOP-WEBAPPBUILD</id>
                                                <goals>
                                                        <goal>run</goal>
                                                </goals>
 <phase>generate-sources</phase>
                                                <configuration>
                                                        <tasks>
                                                                <ant 
antfile="${basedir}/jpf_build.xml" inheritRefs="true">
 <target name="build"/>
                                                                </ant>
                                                        </tasks>
                                                </configuration>
                                        </execution>
                                </executions>
                                <dependencies>
                                        <dependency>
 <groupId>weblogic</groupId>
 <artifactId>javelin</artifactId>
                                                <version>8.1</version>
                                        </dependency>
                                </dependencies>
                        </plugin>
                </plugins>
        </build>
        <dependencies>
                <dependency>
                        <groupId>weblogic</groupId>
                        <artifactId>javelin</artifactId>
                </dependency>
        </dependencies>

The class "com/bea/compiler/enterprise/IEntProject" available in javelin 
jar, and this javelin jar is in my repository and it is being downloaded 
into my local repository also,

but when i ran mvn clean deploy i get the following error, which shows, 
somehow this jar is missing from classpath

java.lang.NoClassDefFoundError: com/bea/compiler/enterprise/IEntProject
[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:324)
        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)
        ... 16 more
Caused by: The following error occurred while executing this line:


any help would be appreciated

Thanks,



-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.