1
Vote

Support additional source paths - code generation tools

description

Using the build-helper you can add additional sources
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>add-source</goal>
                    </goals>
                    <configuration>
                        <sources>
                            <source>${project.build.directory}/generated-sources/XSDObjectGen</source>
                        </sources>
                        <resources>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
The compile:process-sources step however appears to ignore anything but the one set directly

[INFO] [compile:process-sources {execution: default-process-sources}]
[INFO] NPANDAY-904-002: Copying source files: From = E:\project\src\main\csharp, To = E:\project\target/build-sources, File Count = 1


It appears that if source files are copied directly during source generation to ${project.build.dir}/target/build-sources that they get included in the compilation, but it is unclear if this will continue to be supported.

comments

LarsCorneliussen wrote May 7, 2014 at 9:03 AM