Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven: dependency not added to the classpath during runtime

 
Ludovik Lax
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In order to use python in java project, i've added the jython following dependency :


But , when i call engine factories :



i get the following engines , but not jython ...


ScriptEngineFactory Info
Script Engine: Mozilla Rhino (1.6 release 2)
Engine Alias: js
Engine Alias: rhino
Engine Alias: JavaScript
Engine Alias: javascript
Engine Alias: ECMAScript
Engine Alias: ecmascript
Language: ECMAScript (1.6)
ScriptEngineFactory Info
Script Engine: AppleScriptEngine (1.0)
Engine Alias: AppleScriptEngine
Engine Alias: AppleScript
Engine Alias: OSA
Language: AppleScript (2.0.1)


regards;



 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I edited the subject to make it clear what the problem is: it has nothing to do with Jython or scripting per se - it's that the jar dependency is not part of the classpath at runtime.
 
Ludovik Lax
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the jython jar v2.5.0 downloaded from central repository is not complete, it doesn't embed ScriptManager factories, so jython with maven works provided that a manual setup is done:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic