You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2019/08/22 13:22:00 UTC
[jira] [Created] (SLING-8652) Prototypes are not supported in
multi-module builds
Radu Cotescu created SLING-8652:
-----------------------------------
Summary: Prototypes are not supported in multi-module builds
Key: SLING-8652
URL: https://issues.apache.org/jira/browse/SLING-8652
Project: Sling
Issue Type: Bug
Components: Feature Model
Affects Versions: slingfeature-maven-plugin 1.1.0, slingfeature-maven-plugin 1.0.6
Reporter: Radu Cotescu
In a multi-module build, if a module A represents the prototype for a second module B, the reactor build will fail with an error similar to:
{noformat}
[INFO] Scanning for projects...
[ERROR] Unable to get feature A:slingosgifeature:0.0.1-SNAPSHOT : Recursive feature dependency list including project MavenProject: B:0.0.1-SNAPSHOT @ ~/workspace/reactor/B/pom.xml
[ERROR] Internal error: java.lang.IllegalStateException: Unable to find prototype feature A:slingosgifeature:0.0.1-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalStateException: Unable to find prototype feature A:slingosgifeature:0.0.1-SNAPSHOT
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:120)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalStateException: Unable to find prototype feature A:slingosgifeature:0.0.1-SNAPSHOT
at org.apache.sling.feature.builder.FeatureBuilder.internalAssemble (FeatureBuilder.java:314)
at org.apache.sling.feature.builder.FeatureBuilder.assemble (FeatureBuilder.java:59)
at org.apache.sling.feature.maven.Preprocessor.process (Preprocessor.java:216)
at org.apache.sling.feature.maven.Preprocessor.process (Preprocessor.java:118)
at org.apache.sling.feature.maven.mojos.DependencyLifecycleParticipant.afterProjectsRead (DependencyLifecycleParticipant.java:79)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
{noformat}
The workaround, when one wants to work with a multi-module setup, is to use aggregates to compose feature B, instead of relying on A as a prototype.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)