Hi Robert, I have opened https://issues.apache.org/jira/browse/SLING-9656 for tracking the problem.
Regards, Eric On Mon, Aug 10, 2020 at 1:06 AM Robert Munteanu <[email protected]> wrote: > Hi Eric, > > On Fri, 2020-08-07 at 10:10 -0700, Eric Norman wrote: > > Hi Robert, > > > > I think I stumbled upon a regression with the changes done to the > > build of > > the org-apache-sling-launchpad-testing project. Specifically, if I > > combine > > the "eclipse:eclipse" goal with the "install" or "verify" goal in the > > same > > mvn command line, it results in an error about a duplicate feature > > file. > > This command worked in the past, so maybe you might know what the > > problem > > is? It appears that the "aggregate-features" goal is getting called > > twice > > during this build scenario and not handling it well. > > > > For example: > > > > *org-apache-sling-launchpad-testing $ **mvn clean eclipse:eclipse > > verify* > > I think I know why this happens: > > - the eclipse:eclipse invocation invokes the lifecycle phase generate- > resources [5] > - the AggregateFeaturesMojo is bound to the generate-resources phase as > well [6] > - when running `mvn clean eclipse:eclipse install` the generate- > resources phase is invoked twice, and it seems that the features are > aggregated twice > > I think the most reasonable solution would be for the slingfeature- > maven-plugin to handle this gracefully, as it fails also when executing > > $ mvn generate-resources generate-resources > > Can you please file a bug against the slingfeature-maven-plugin? > > Thanks, > Robert > > > > > > > Results in this error: > > > > [ERROR] Failed to execute goal > > org.apache.sling:slingfeature-maven-plugin:1.3.6:aggregate-features > > (aggregate-features) on project org.apache.sling.launchpad.testing: > > Execution aggregate-features of goal > > org.apache.sling:slingfeature-maven-plugin:1.3.6:aggregate-features > > failed: > > More than one feature file for classifier testing-oak_tar in project > > org.apache.sling:org.apache.sling.launchpad.testing:jar:12-SNAPSHOT : > > [aggregate testing-oak_tar, aggregate testing-oak_tar] -> [Help 1] > > > > > > > > A workaround is to run the "eclipse:eclipse" goal and the "install" > > or > > "verify goal in separate runs. > > > > Regards, > > -Eric > > [5]: > https://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html > [6]: > https://github.com/apache/sling-slingfeature-maven-plugin/blob/6d2918f1c0e8b3162a826149e9ba4bfd475c9216/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java#L47-L51 > >
