Build issue

Hi all,
I tried to build Cesium but as soon as ant starts I get the following error:

cesium/build.xml:4: java.lang.ClassNotFoundException: org.apache.tools.ant.util.optional.ScriptRunner
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1383)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1076)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:266)
        at org.apache.tools.ant.util.ScriptRunnerCreator.createRunner(ScriptRunnerCreator.java:123)
        at org.apache.tools.ant.util.ScriptRunnerCreator.createRunner(ScriptRunnerCreator.java:80)
        at org.apache.tools.ant.util.ScriptRunnerHelper.getRunner(ScriptRunnerHelper.java:190)
        at org.apache.tools.ant.util.ScriptRunnerHelper.getScriptRunner(ScriptRunnerHelper.java:55)
        at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:343)
        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.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

I work on a OpenSuse 12.2 machine with a JDK 7 installed.
Any help is appreciated.

Regards,
-- Marco

Looks like the version of Ant that you have installed is incomplete, and doesn’t have all the standard set of tasks. Try running using the version of Ant in the Tools directory:

Tools/apache-ant-1.8.2/bin/ant

I tried both distribution ant and ./Tools/apache-ant-1.8.2/bin/ant . The result is the same.

Do you have an ANT_HOME environment variable set? From a terminal, try running “echo $ANT_HOME” I suspect that the script in Tools is still using your distribution’s version of Ant.

Does it work if you try overriding the environment variable when running from the Cesium directory:

ANT_HOME=Tools/apache-ant-1.8.2 Tools/apache-ant-1.8.2/bin/ant build

I don’t have OpenSuse to test, but from searching, it looks like there’s a “ant-apache-bsf” package you can install to restore the missing scripting functionality in your distribution’s version of Ant.

Scott

Thanks! Finally it works! Installing the "ant-apache-bsf" solved the problem.

Build task went smoothly. I run tests. All passed but 13 based on webGL:
I am using Firefox 20.0, I pasted the report: