Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.0.0RC3
-
Component/s: Miscellaneous
-
Labels:None
-
Environment:SVN Version of JRuby, Windows XP, Ant 1.7, Java 6
Repeatable w/ Ant 1.6.5. Also repeatable on Mac OS X with Java 5 and Ant 1.6.5 and Ant 1.7
-
Number of attachments :
Description
When attempting to build Jruby from source following the installation instructions the following error occurs:
----------------------------------------------
run-junit:
[junit] Testsuite: org.jruby.test.MainTestSuite
[junit] Exception in thread "main" java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close(Ljava/io/Writer;)V
[junit] at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.endTestSuite(XMLJUnitResultFormatter.java:174)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireEndTestSuite(JUnitTestRunner.java:620)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:453)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
BUILD FAILED
C:\temp\jruby\build.xml:311: Test org.jruby.test.MainTestSuite failed (crashed)
----------------------------------------------
It appears that the ant.jar in the lib directory is included in the build.classpath of the build.xml file. This ant.jar is version 1.5.
I was able to workaround this problem by doing either of the following:
a) removing ant.jar from the lib directory
b) modifying the build.xml file to exclude the ant.jar file from the build.classpath
<path id="build.classpath">
<fileset dir="${lib.dir}" includes="*.jar" excludes="jruby.jar,ant.jar"/>
</path>
This worked on both Windows XP and Mac OS X.
Perhaps the ant.jar in the lib directory should be removed or updated. Or perhaps the build.xml file should be tweaked as noted.
Just did an update from subversion and noticed that I no longer needed to make any changes to successfully build JRuby. Thanks!