我正在尝试使用maven插件将maven java项目的源文件夹添加到Eclipse.
尝试使用org.codehaus.mojo插件时,我收到以下错误
未能执行目标org.codehaus.mojo:建立辅助性Maven的插件:1.7:添加源(默认CLI)项目应用程序框架:参数"来源"为目标org.codehaus.mojo:建立辅助-maven-plugin:1.7:add-source缺失或无效 - > [帮助1]
通过阅读http://mojo.codehaus.org/build-helper-maven-plugin/usage.html上的文档,这应该是正确的吗?文件夹target/sources/mygeneratedfiles on存在.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/sources/mygeneratedfiles</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)