sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SLING-7662) Cannot use slingstart-maven-plugin for starting a server only with referencing a launchpad by dependency due to the DependencyLifecycleParticipant
Date Wed, 23 May 2018 08:28:00 GMT

     [ https://issues.apache.org/jira/browse/SLING-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Bosschaert resolved SLING-7662.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: Slingstart Maven Plugin 1.8.0

Fixed with https://gitbox.apache.org/repos/asf?p=sling-slingstart-maven-plugin.git;a=commitdiff;h=611d0014015cbd0f4ee252ef86b0be00621719e7


[~kwin] I wasn't able to test this in exactly your context, please reopen if you are still
seeing this problem.

> Cannot use slingstart-maven-plugin for starting a server only with referencing a launchpad
by dependency due to the DependencyLifecycleParticipant
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-7662
>                 URL: https://issues.apache.org/jira/browse/SLING-7662
>             Project: Sling
>          Issue Type: Bug
>          Components: Maven Plugins and Archetypes
>    Affects Versions: Slingstart Maven Plugin 1.7.16
>            Reporter: Konrad Windszus
>            Assignee: David Bosschaert
>            Priority: Major
>             Fix For: Slingstart Maven Plugin 1.8.0
>
>
> Whenever the slingstart-maven-plugin is only used to start a server which is referenced
via the parameter {{launchpadDependency}} the following error is being emitted from Maven.
> {code}
> ...
> [ERROR] No model files found in /Users/konradwindszus/workspaces/sling/sling-org-apache-sling-servlets-annotations/src/test/provisioning,
and no model inlined in POM. -> [Help 1]
> org.apache.maven.MavenExecutionException: No model files found in /Users/konradwindszus/workspaces/sling/sling-org-apache-sling-servlets-annotations/src/test/provisioning,
and no model inlined in POM.
>     at org.apache.sling.maven.slingstart.ModelPreprocessor.readLocalModel (ModelPreprocessor.java:552)
>     at org.apache.sling.maven.slingstart.ModelPreprocessor.addDependencies (ModelPreprocessor.java:131)
>     at org.apache.sling.maven.slingstart.ModelPreprocessor.addDependencies (ModelPreprocessor.java:89)
>     at org.apache.sling.maven.slingstart.DependencyLifecycleParticipant.afterProjectsRead
(DependencyLifecycleParticipant.java:100)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:267)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:498)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please read the
following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
> {code}
> The pom.xml looks like this
> {code}
> ...
> <build>
> <plugins>
> <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>slingstart-maven-plugin</artifactId>
>                 <extensions>true</extensions>
>                 <executions>
>                     <execution>
>                         <id>start-container-before-IT</id>
>                         <goals>
>                             <goal>start</goal>
>                         </goals>
>                         <configuration>
>                             <launchpadDependency>
>                                 <artifactId>org.apache.sling.launchpad</artifactId>
>                                 <groupId>org.apache.sling</groupId>
>                                 <version>9</version>
>                             </launchpadDependency>
>                         </configuration>
>                     </execution>
>                     <execution>
>                         <id>stop-container-after-IT</id>
>                         <goals>
>                             <goal>stop</goal>
>                         </goals>
>                         <configuration>
>                             <shouldBlockUntilKeyIsPressed>${keepITServerRunning}</shouldBlockUntilKeyIsPressed>
>                         </configuration>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <servers>
>                         <!-- this configuration applies to both 'start' and 'stop'
-->
>                         <server>
>                             <id>singleinstance</id>
>                             <port>${http.port}</port>
>                             <vmOpts>${sling.vm.options}</vmOpts>
>                             <stdOutFile>sling/logs/stdout.log</stdOutFile>
>                         </server>
>                     </servers>
>                     <!-- this configuration only applies to 'prepare-package' and
'package' -->
>                     <!-- <disableExtendingMavenClasspath>true</disableExtendingMavenClasspath>
 -->
>                 </configuration>
>             </plugin>
> ...
> {code}
> Actually the DependencyLifecycleParticipant is only relevant for the goals {{prepare-package}}
and {{package}}. When the slingstart-maven-plugin is exclusively used to run some tests on
a freshly provisioned server leveraging an already existing launchpad/starter the DependencyLifecycleParticipant
should not be triggered at all!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message