ant-to-rake: <rake> task does not work when classpath is defined via taskdef's attribute ----------------------------------------------------------------------------------------
Key: JRUBY-4750 URL: http://jira.codehaus.org/browse/JRUBY-4750 Project: JRuby Issue Type: Bug Components: Miscellaneous Affects Versions: JRuby 1.5.0.RC1 Environment: jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-04-24 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_17) [x86_64-java] Reporter: Daniel Luz When using a taskdef like the following <taskdef name="rake" classname="org.jruby.ant.Rake" classpath="lib/jruby-complete.jar"/> invoking the rake task fails: $ ant BUILD FAILED /Users/daniel/testproject/build.xml:7: Could not create type rake due to java.lang.NullPointerException The problem comes from this classloader, which is not the one where the JRuby jar is located: http://github.com/jruby/jruby/blob/fb5ae1b25a/src/org/jruby/embed/util/PropertyReader.java#L51 As such, the getResourceAsStream() call on line 53 returns null, which goes around for a while until it blows everything. When the task class is found via the environment CLASSPATH variable: $ CLASSPATH=lib/jruby-complete.jar ant everything works fine (even using the exact same build.xml, because CLASSPATH takes precedence when searching). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email