Using Jython with M2Eclipse

泪湿孤枕 提交于 2019-12-23 09:38:16

问题


I currntly use M2Eclipse for the majority of my Java development and Pydev for Python/Jython development within Eclipse. I would like to use Jython to prototype and test classes within my Java projects. The M2Eclipse plugin manages all the dependencies defined in the Maven pom.xml file automatically.

Is there anyway for Pydev to utilise these dependencies without having to import each jar separately?


回答1:


Actually, I didn't get how you are working with Jython under Eclipse and where you need to import jars separately. Is this related to Pydev? Something else? Anyway, even if I'm not sure it will solve all your issues, maybe the maven-jython-plugin can help. It offers the following features:

  • Easily fire up an interactive Jython shell
  • Compile main Jython source files to Java classes
  • Compile test Jython source files to Java classes
  • Inferred package structure to make life simpler



回答2:


Have a look at the maven-jython-compile-plugin and maven-python-test-plugin. The former allows you to deploy a standalone project that includes jython with libraries. The latter allows you to run your python tests with the maven java tests.

The sourceforge umbrella project is http://mavenjython.sourceforge.net/

Unlike maven-jython-plugin, they don't use the outdated jythonc compiler.



来源:https://stackoverflow.com/questions/1602427/using-jython-with-m2eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!