Hi, I am trying to do a custom build of Dojo using Maven and the Dojo supplied build.xml file. I have managed to get most of the pieces that I need into the pom.xml file to where the ant clean task works and the default task starts. Unfortunately the default task depends on the value of basedir which is set to "." at the top of the build.xml file (<project name="dojo" default="cldr" basedir=".">). Since Maven is not running from the directory where the build.xml file is at, all the paths are wrong. In my pom.xml file I have tried to override this value by adding, <property name="basedir" value="${dojo.cldr.location}"/>, <property name="basedir" location="${dojo.cldr.location}"/>, and <ant antfile="${dojo.cldr.build.xml}" dir="${dojo.cldr.location}" target="cldr"/>. Setting basedir using a value or location does not seem to make any difference when I run the task. When I set the dir attribute in the ant task I get the error below.
So my questions are: 1) Does anybody know how to correctly override the Ant basedir value from Maven? 2) Is there a good tutorial/documentation out there on the maven-antrun-plugin? [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project dojo-assembly: An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:248: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: [ERROR] C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: [ERROR] C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 [ERROR] around Ant part ...<ant target="cldr" antfile="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr/build.xml" dir="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr"/>... @ 9:259 in C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\antrun\build-main.xml [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project dojo-assembly: An Ant BuildException has occured: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:248: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 around Ant part ...<ant target="cldr" antfile="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr/build.xml" dir="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr"/>... @ 9:259 in C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\antrun\build-main.xml at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:248: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 around Ant part ...<ant target="cldr" antfile="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr/build.xml" dir="C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly/target/temp/dojo-release-1.8.1-src/util/buildscripts/cldr"/>... @ 9:259 in C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\antrun\build-main.xml at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\antrun\build-main.xml:9: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:248: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327) ... 21 more Caused by: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:248: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183) at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166) at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110) at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81) at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103) at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67) at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350) at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) ... 32 more Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:165: The following error occurred while executing this line: C:\appliocationDev\appliocation-1.0.0\xc.ui\dojo-assembly\target\temp\dojo-release-1.8.1-src\util\buildscripts\cldr\build.xml:178: java.lang.ClassNotFoundException: net.sf.saxon.TransformerFactoryImpl (<Unknown source>#52) in <Unknown source> at line number 52 at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110) at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:124) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108) ... 49 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :dojo-assembly Regards, Luis F. López