Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.0.9
-
Fix Version/s: 0.0.10
-
Component/s: None
-
Labels:None
Description
Source code is sometimes generated automatically during build. We place it under ${project.build.directory}/generated-sources for Maven to use (see below).
Would be nice if the plugin found these additional source folder and added them to the Eclipse project. An Update Source Folder might be necessary.
<!-- required since Maven only allows one source directory --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.0</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>$\{project.build.directory}/generated-sources</source> </sources> </configuration> </execution> </executions> </plugin>
Issue Links
- depends upon
-
MNG-2333
Plugins need to offer up all information without executing
-
- is related to
-
MNGECLIPSE-571
Include support for executing plugins attached to the generated-sources lifecycle phase
-
I agree.
What might work is to add a dynamic classpath that you configure in the project properties (and may default to including known sources default locations such as target/generated-sources/*/) which would ignore non-existant listed sources, but pick it all up when it found sources.
Since we're interrupting the incremental build anyway, we could always run the pom.xml agianst the generated-sources phase before the incremental build was run, if any files changed, and then incrementally build any generated source files that changed (presumably working with a checksum rather than a datestamp, since generate-sources is likely to update all files.)
Frankly, even if the plugin just added the dynamic classpath above, and left the rest to manual tinkering, it would be helpful in the extreme.