AnsweredAssumed Answered

Build fails because ant script tag not setup correctly in al

Question asked by binduwavell on Sep 16, 2011
Latest reply on Sep 17, 2011 by binduwavell
I created a JIRA ticket at: http://issues.alfresco.com/jira/browse/ALF-10344

I have had this issue with community svn/trunk for the last couple of weeks.

On line 146 of the root build.xml file there is a <script> target that attempts to run some javascript. On my dev image which is centos 6 with tomcat 6 and java 6 the build fails as follows:

—-
ant incremental-tomcat
Buildfile: build.xml

init:
     [echo] user.home = /home/binduwavell
     [echo] version.number = 4.0.a

BUILD FAILED
java.lang.ClassNotFoundException: org.apache.bsf.engines.javascript.JavaScriptEngine
   at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
   at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
   at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:696)
   at org.apache.bsf.BSFManager.exec(BSFManager.java:485)
   at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:100)
   at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   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:357)
   at org.apache.tools.ant.Target.performTasks(Target.java:385)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
   at org.apache.tools.ant.Main.runBuild(Main.java:758)
   at org.apache.tools.ant.Main.startAnt(Main.java:217)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds
—-

This failure is because ant can't find the script execution engine if I add the attribute declaration manager="javax" to this target the build completes without issue.

I'm certain there are other ways of resolving this issue, however I believe that this is a bug.

My issue was marked as not a bug.

Is this a known configuration problem?

Have others had this issue?

What would the rational be for not attempting to resolve this?

Thanks in advance!

Outcomes