I'm attempting to add a source folder for maven java project to Eclipse using a maven plugin.
When trying to use the org.codehaus.mojo plugin I receive the following error
Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (default-cli) on project application-framework: The parameters 'sources' for goal org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source are missing or invalid -> [Help 1]
From reading the docs on http://mojo.codehaus.org/build-helper-maven-plugin/usage.html this should be correct ? The folder target/sources/mygeneratedfiles on exists.
<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>
-X
and look at the output, does the plugin execution that generates the source files run before thebuild-helper-maven-plugin
execution or after? If the build helper is running before the code generation that is likely the problem. – Gypsum