You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:28:14 UTC
[sling-slingstart-maven-plugin] 05/09: SLING-6370 slingstart: start
goal failes if not executed together with install
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit e09af724412d7c83bb631a3cc2a891826a7597ba
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Dec 6 22:33:24 2016 +0000
SLING-6370 slingstart: start goal failes if not executed together with install
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1772982 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/maven/slingstart/run/StartMojo.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java b/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
index c74939d..af15111 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
@@ -402,11 +402,18 @@ public class StartMojo extends AbstractMojo {
// If the current project is a slingstart project, use its JAR artifact
if (this.project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART)) {
- final File jarFile = project.getArtifact().getFile();
- if (jarFile.exists()) {
+ File jarFile = project.getArtifact().getFile();
+ if (jarFile != null && jarFile.exists()) {
getLog().info("Using launchpad jar being generated as this project's primary artifact: '" + jarFile + "'!");
return jarFile;
}
+ else {
+ jarFile = new File(project.getBuild().getDirectory(), project.getBuild().getFinalName() + ".jar");
+ if (jarFile.exists()) {
+ getLog().info("Using launchpad jar being generated as this project's primary artifact: '" + jarFile + "'!");
+ return jarFile;
+ }
+ }
}
// In case there was a provisioning model found but this is not a slingstart project, the JAR might be attached already through goal "package"
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.