Message5218

Author heuermh
Recipients heuermh
Date 2009-10-05.21:00:05
SpamBayes Score 7.2388923e-07
Marked as misclassified No
Message-id <1254776408.25.0.870758156245.issue1485@psf.upfronthosting.co.za>
In-reply-to
Content
See attached example maven project.

If both jruby and jython are enabled using runtime dependencies*

pom.xml:
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>1.4.0RC1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython</artifactId>
<version>2.5.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>

then the jar-with-dependencies assembly jar will fail to register both
ScriptEngine implementations

$ mvn assembly:assembly
$ java -jar target/example-1.0-SNAPSHOT-jar-with-dependencies.jar
could not find jruby engine

whereas creating an explicit classpath works fine

$ java -classpath
"jython-2.5.1.jar;jruby-1.4.0RC1.jar;target/example-1.0-SNAPSHOT.jar"
example.Jsr223Example
ok

It appears the JSR223 mechanism cannot handle multiple copies of its
metadata in example-1.0-SNAPSHOT-jar-with-dependencies.jar.

$ jar tvf target/example-1.0-SNAPSHOT-jar-with-dependencies.jar | grep
javax.script.ScriptEngineFactory
42 Wed Sep 16 13:39:46 CDT 2009
META-INF/services/javax.script.ScriptEngineFactory
40 Sat Sep 26 13:48:04 CDT 2009
META-INF/services/javax.script.ScriptEngineFactory

    * - please note a jython-2.5.1.jar artifact is not yet available on
maven central repo, will have to be installed manually


This issue has also been posted to the JRuby issue tracker at:

http://jira.codehaus.org/browse/JRUBY-4057
History
Date User Action Args
2009-10-05 21:00:08heuermhsetrecipients: + heuermh
2009-10-05 21:00:08heuermhsetmessageid: <1254776408.25.0.870758156245.issue1485@psf.upfronthosting.co.za>
2009-10-05 21:00:07heuermhlinkissue1485 messages
2009-10-05 21:00:05heuermhcreate