The URL shows library dependencies. Apache-BSF ebuild depends on Apache-BSF 2.3.x, if one uses Rhino as JavaScript interpreter the oldest eBuild is 1.5.5-r4 which forces usage of Apache-BSF>=2.4.0. Also it's impossible (for me with normal portage usage) to return to rhino 1.5.5-r3. Using <script>-task in build.xml-s (with language="javascript") raises strange exceptions like NoSuchMethodException or (Ant-)internal messages complaining about misconfiguration. Reproducible: Always
For example (with bsf-2.4.0 emerged): main: [script] 23.05.2007 19:14:27 org.apache.bsf.BSFManager loadScriptingEngine [script] SCHWERWIEGEND: Exception : [script] java.lang.ClassNotFoundException: org.apache.bsf.engines.javascript.JavaScriptEngine With (bsf-2.3.x) it's some NoSuchMethodException...and I mean dev-java/bsf, not dev-java/ant-apache-bsf...
(In reply to comment #0) > > Using <script>-task in build.xml-s (with language="javascript") raises strange > exceptions like NoSuchMethodException or (Ant-)internal messages complaining > about misconfiguration. > Can you please attach a build.xml for us to test with. Then I can also add it to our test cases repository in http://overlays.gentoo.org/proj/java/browser/testcases/dev-java to make sure it doesn't break with version bumps.
(In reply to comment #1) > For example (with bsf-2.4.0 emerged): > main: > [script] 23.05.2007 19:14:27 org.apache.bsf.BSFManager loadScriptingEngine > [script] SCHWERWIEGEND: Exception : > [script] java.lang.ClassNotFoundException: > org.apache.bsf.engines.javascript.JavaScriptEngine > > With (bsf-2.3.x) it's some NoSuchMethodException...and I mean dev-java/bsf, not > dev-java/ant-apache-bsf... You need to build dev-java/bsf with USE=rhino. Just having rhino installed is not enough. Maybe we should add some einfo or something... Reproduced this error with USE=-rhino so please rebuild with rhino and report back. > Can you please attach a build.xml for us to test with. Then I can also add it > to our test cases repository in > http://overlays.gentoo.org/proj/java/browser/testcases/dev-java to make sure it > doesn't break with version bumps. I've added build.xml with two examples from ant manual. If you post your build.xml we can add it too. Tested with both bsf-2.3 and 2.4 and it worked. Although we don't comply with what Ant's manual says, by using bsf-2.3 with rhino 1.5R5 (that's 1.5.5-rX in portage) and not 1.5R3 (which would be 1.5.3, not 1.5.5-r3 BTW). This potential problem can be solved when we get bsf-2.4 stable (too early for this atm). Let's see if your build.xml works with 2.3 after you merge it with rhino flag...
(In reply to comment #3) > I've added build.xml with two examples from ant manual. If you post your > build.xml we can add it too. It'd be just something like: <task name="sometarget"> <echo message="task sometarget" /> </task> <task name="scripttag"> <script language="javascript"> sometarget.execute(); </script> </task> Called with 'ant scripttag' it should execute via JavaScript the target 'sometarget'. It works with USE=rhino. Maybe this should be mentioned somewhere in the emerge-log, when installing bsf and ant-apache-bsf. </task>
(In reply to comment #4) > It'd be just something like: > ... OK, that's already covered by what I added, nothing more complex, but thanks :) > 'sometarget'. It works with USE=rhino. Maybe this should be mentioned somewhere > in the emerge-log, when installing bsf and ant-apache-bsf. > </task>> I've made ant-apache-bsf to check flags of bsf and warn on not being able to run certain <script> tasks accordingly, in ant-apache-bsf-1.7.0-r1