oops, sorry I miss read it On 9/28/06, Alexandre Touret <[EMAIL PROTECTED]> wrote:
Hello Dan First, thanks for your response. I dont want to run an ant task described in the pom.xml but I d like to run a javascript inside an ant plugin? I dont think your answer will solve my problem. Alexandre dan tran wrote: > what you need is to have your supported jars loading up with antrun > correctly. > Take a look at antrun integration tests suite, I think it has example > on how to do that > > http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin/src/it > > > ongoing doc review is at > > http://people.apache.org/~aramirez/maven-antrun-plugin/ > > > -D > > On 9/28/06, Alexandre Touret <[EMAIL PROTECTED]> wrote: >> >> Hello, >> I programming an ant plugin in maven2. I d like to use a scripting >> language like javascript inside a <script> tag. Unfortunately, when I >> run the task I have the following error: >> >> bottomup-assemble-annotations: >> [INFO] >> ------------------------------------------------------------------------ >> [ERROR] BUILD ERROR >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Failed to execute: Executing Ant script: >> /net/java/dev/maven/oasplugin/oa >> s.build.xml [bottomup-assemble-annotations]: Failed to execute. >> >> Could not create task or type of type: script. >> >> Ant could not find the task or a class this task relies upon. >> >> This is common and has a number of causes; the usual >> solutions are to read the manual pages then download and >> install needed JAR files, or fix the build file: >> - You have misspelt 'script'. >> Fix: check your spelling. >> - The task needs an external JAR file to execute >> and this is not found at the right place in the classpath. >> Fix: check the documentation for dependencies. >> Fix: declare the task. >> - The task is an Ant optional task and the JAR file and/or libraries >> implementing the functionality were not found at the time you >> yourself built your installation of Ant from the Ant sources. >> Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the >> task and make sure it contains more than merely a >> META-INF/MANIFEST.MF. >> If all it contains is the manifest, then rebuild Ant with the needed >> libraries present in ${ant.home}/lib/optional/ , or alternatively, >> download a pre-built release version from apache.org >> - The build file was written for a later version of Ant >> Fix: upgrade to at least the latest release version of Ant >> - The task is not an Ant core or optional task >> and needs to be declared using <taskdef>. >> - You are attempting to use a task defined using >> <presetdef> or <macrodef> but have spelt wrong or not >> defined it at the point of use >> >> Remember that for JAR files to be visible to Ant tasks implemented >> in ANT_HOME/lib, the files must be in the same directory or on the >> classpath >> >> Please neither file bug reports on this problem, nor email the >> Ant mailing lists, until all of these causes have been explored, >> as this is not an Ant bug. >> [INFO] >> ------------------------------------------------------------------------ >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to >> execute: Execu >> ting Ant script: /net/java/dev/maven/oasplugin/oas.build.xml >> [bottomup-assemble- >> annotations]: Failed to execute. >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >> ultLifecycleExecutor.java:559) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi >> fecycle(DefaultLifecycleExecutor.java:475) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >> ltLifecycleExecutor.java:454) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >> dleFailures(DefaultLifecycleExecutor.java:306) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >> ts(DefaultLifecycleExecutor.java:273) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >> fecycleExecutor.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(DelegatingMethodAcces >> sorImpl.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: Failed to >> execute: Ex >> ecuting Ant script: /net/java/dev/maven/oasplugin/oas.build.xml >> [bottomup-assemb >> le-annotations]: Failed to execute. >> at >> org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.jav >> a:37) >> at >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >> nManager.java:412) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >> ultLifecycleExecutor.java:534) >> ... 16 more >> Caused by: >> org.codehaus.plexus.component.factory.ant.AntComponentExecutionExcept >> ion: Executing Ant script: /net/java/dev/maven/oasplugin/oas.build.xml >> [bottomup >> -assemble-annotations]: Failed to execute. >> at >> org.codehaus.plexus.component.factory.ant.AntScriptInvoker.invoke(Ant >> ScriptInvoker.java:227) >> at >> org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.jav >> a:33) >> ... 18 more >> Caused by: C:\Temp\plexus-ant-component39849.build.xml:50: Could not >> create task >> or type of type: script. >> >> >> >> I 've tried to include rhino dependencies in the plugin's pom.xml but I >> still have the same error. >> >> How may I use the script task ? >> >> Thanks >> >> Regards, >> Alexandre Touret >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
