简体   繁体   中英

Using Jython with M2Eclipse

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM