简体   繁体   English

eclipse插件项目取决于java项目

[英]can eclipse plugin project depend on java project

I have an eclipse plugin project which dependes on java project in my eclipse. 我有一个eclipse插件项目,它依赖于我的eclipse中的java项目。 usually what I did is export the project as jar and use it as-is in the plugin. 通常我所做的是将项目导出为jar并在插件中按原样使用它。 but this requires manual work. 但这需要手工操作。 can I have a reference from my plugin projct to a java project that will be both compile-time and run-time dependency ? 我可以从我的插件项目中引用一个兼具编译时和运行时依赖性的java项目吗?
I saw a similar question , but not exactly the same. 我看到了类似的问题 ,但不完全一样。

I think, the closest thing to this is to create a jar file from the referenced project, and import it to the projects repository. 我认为,最接近这一点的是从引用的项目创建一个jar文件,并将其导入项目存储库。 But thats quite hard to manage for a currently developed project. 但对于目前开发的项目而言,这很难管理。

On the other hand, isn't it possible to simply convert the Java project into a plug-in permanently? 另一方面,是不是可以简单地将Java项目永久地转换为插件? If the other user does not use OSGi/Eclipse, he/she will see only a manifest/manifest.mf file (and possibly a plugin.xml) next to the java project specific stuff, so this would not disturb them, but would help you. 如果其他用户不使用OSGi / Eclipse,他/她将只看到java项目特定内容旁边的manifest / manifest.mf文件(可能还有一个plugin.xml),所以这不会打扰他们,但会有所帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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