问题描述
我有一个由多个maven项目组成的应用程序。我在Eclipse中工作。一些项目使用Maven插件为Web服务等生成存根类。当我将项目导入新的工作区时,我必须发出一个maven 生成来源命令,后跟附加源文件夹以在每个项目上构建路径。我的应用程序有超过5-6个项目需要这些步骤。
是否有一个插件,我可以在Eclipse中安装来接收生成的源,甚至一个生成源代码并更新构建路径以保存手动步骤?
嗯,这取决于确切的maven插件正在使用。
生成源
在我认为任何非常见的插件需要m2e连接器之前,发电机。但是我最近来了一些插件(),没有特别的m2e连接器。
附加源文件夹以构建路径
对于此部分,请检查 helper-maven-plugin
并回答
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
这篇关于在Eclipse中使用maven生成的源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!