You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2016/11/08 07:59:05 UTC

svn commit: r1768640 - /sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java

Author: cziegeler
Date: Tue Nov  8 07:59:05 2016
New Revision: 1768640

URL: http://svn.apache.org/viewvc?rev=1768640&view=rev
Log:
SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings

Modified:
    sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java

Modified: sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java?rev=1768640&r1=1768639&r2=1768640&view=diff
==============================================================================
--- sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java (original)
+++ sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java Tue Nov  8 07:59:05 2016
@@ -76,7 +76,12 @@ public class PackageMojo extends Abstrac
             final Manifest mf = new Manifest(fis);
 
             // make sure this filename does not conflict with any other project artifacts (primary or secondary)
-            final File outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".standalonelaunchpad.jar");
+            final File outputFile;
+            if ( BuildConstants.PACKAGING_SLINGSTART.equals(project.getPackaging()) ) {
+                outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".jar");
+            } else {
+                outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".standalonelaunchpad.jar");
+            }
 
             final JarArchiverHelper helper = new JarArchiverHelper(jarArchiver, this.project, outputFile, mf);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);
@@ -107,7 +112,12 @@ public class PackageMojo extends Abstrac
 
             final File buildOutputDirectory = new File(buildDirectory, BuildConstants.WEBAPP_OUTDIR);
             // make sure this filename does not conflict with any other project artifacts (primary or secondary)
-            final File outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".webapplaunchpad.war");
+            final File outputFile;
+            if ( BuildConstants.PACKAGING_SLINGSTART.equals(project.getPackaging()) ) {
+                outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".war");
+            } else {
+                outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".webapplaunchpad.war");
+            }
 
             final JarArchiverHelper helper = new JarArchiverHelper(this.jarArchiver, this.project, outputFile);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);