且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Eclipse中使用maven生成的源

更新时间:2022-10-14 23:09:01

嗯,这取决于确切的maven插件正在使用。



生成源

在我认为任何非常见的插件需要m2e连接器之前,发电机。但是我最近来了一些插件( 1 ),没有特别的m2e连接器。



附加源文件夹以构建路径

对于此部分,请检查 helper-maven-plugin 并回答 M2E并将maven生成源文件夹作为eclipse源文件夹


I have an application made up of a number of maven projects. I work on it in Eclipse. Some of the projects use Maven plugins to generate stub classes for web services etc.

When i import the projects into a new workspace I have to issue a maven generate sources command followed by attach source folders to build path on each project. The application i work on has more than 5-6 projects which require these steps.

Is there a plugin I can install in Eclipse to pick up the generated sources, or even one that generates the sources and updates the build path to save the manual steps?

Well, it depends on exact maven plugin you are using.

generate sources
Before I considered that m2e connector would be needed for any non common plugin, like generator. But I came recently on some plugins (1), that do it without special m2e connector.

attach source folders to build path
For this part check build-helper-maven-plugin and answer to M2E and having maven generated source folders as eclipse source folders