trivago/cucable-plugin

Move configuration to execution level in build-helper-maven-plugin instead of plugin level to be more compatible for multi modules project

Closed this issue · 1 comments

Describe the bug
It is a suggestion to improve the configuration section in build-helper-maven-plugin
regarding description here
https://github.com/trivago/cucable-plugin#generating-runners-and-features-inside-target-directory

To Reproduce
It suggests configuration on the plugin level

        <configuration>
            <sources>
                <source>${project.build.directory}/parallel/runners</source>
            </sources>
        </configuration>  

And It works actually.

But in a real multi-modules project, the plugin will be defined in plugin management in the parent pom and shared with children modules.
But the plugin-level source configuration expects a parallel folder which doesn't exist on the other modules. So the build will get complaints from children modules which don't do cucable execution.

Expected behavior
Since this configuration only targets the cucable scenario, Would suggest moving it to the execution level. So it will not be complained about by other modules.

Attachments
It should look like following

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<executions>
						<execution>
							<id>add-test-source</id>
							<phase>generate-test-sources</phase>
							<goals>
								<goal>add-test-source</goal>
							</goals>
							<configuration>
								<sources>
									<source>${project.build.directory}/parallel/runners</source>
								</sources>
							</configuration>
						</execution>
					</executions>
				</plugin>

Additional context
BTW, Thanks for your guys creating a so amazing tool. appreciate that.

Thanks a lot for your message. I changed the section in the documentation now.