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:27:47 UTC

[sling-slingstart-maven-plugin] annotated tag slingstart-maven-plugin-1.5.0 created (now 0c156b4)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git.


      at 0c156b4  (tag)
 tagging 71da2a97c99158596fb8837f0f3db5e60782afe7 (commit)
      by Carsten Ziegeler
      on Tue Nov 8 12:09:12 2016 +0000

- Log -----------------------------------------------------------------
slingstart-maven-plugin-1.5.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 87744a4  Add slingstart maven plugin
     new d0a48e9  Add slingstart maven plugin
     new 9544826  Update javadocs and rename subsystem to deliverable and run mode to feature
     new 869228d  Rename classes
     new 5758009  Fully support Apach Felix config file format. Move from properties to getter and setter methods
     new 42e2fe7  Implement txt format for reading and writing
     new c348dc3  Implement txt format for reading and writing
     new cb34728  Add merger utility and variable replacement
     new c360a20  Cache raw and effective model and provide separate methods
     new 08649e0  Adjust to new model
     new 46b2387  Update to Sling Parent POM 22 with baselining enabled
     new 799c129  Move io methods to helper class
     new 6fa67eb  Move io methods to helper class
     new 9292c9f  Use provisioning model
     new 68bc095  Correct model caching
     new 22e62c6  Rename constants
     new 2b243e6  Rename artifact handlers and components
     new b4cf460  Get artifacts from repositor if overlayed with a different version
     new 84605ad  Fix special configuration handling and effective model retrival
     new 8fb99d7  Make prepare mojo subclassable
     new 3aaf03c  Correct extension for config files
     new 85bf931  SLING-4081 - SlingStart Maven Plugin fails if the organization is not defined in pom.xml
     new 3116925  Moved invocation of org.apache.sling:slingstart-maven-plugin:prepare-package to prepare-package lifecycle phase
     new 90e5c8f  Rename directory to use from models to provisioning
     new c0ef68c  Use released provisioning model
     new dfabbb8  [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.0
     new 6c8eeeb  [maven-release-plugin] prepare for next development iteration
     new 968d118  Switch to snapshot until release vote is done
     new 1f80af8  Use released provisioning model
     new bbd3ef7  SLING-4121 : Bootstrap file is created in wrong directory for webapp
     new ef15cd3  SLING-4123 : Wrong packaging used for feature
     new 38be5ce  [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.2
     new 71a346e  [maven-release-plugin] prepare for next development iteration
     new 194cbd8  SLING-4479 : Inherited models are processed in the wrong order
     new f83d1b7  SLING-4479 : Inherited models are processed in the wrong order
     new 3272ecb  [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.4
     new 806532a  [maven-release-plugin] prepare for next development iteration
     new 037927e  fix build (use 1.1.1-SNAPSHOT of org.apache.sling.provisioning.model)
     new 8668df1  Use released provisioning model
     new b0c766a  SLING-4474 : Provide a way to start/stop an instance through maven mojos
     new 5a664a1  SLING-4600 : Migrate launchpad/test-bundles to provisioning model
     new 4e5f8e1  SLING-4598 : Migrate launchpad testing to provisioning model
     new 01ce90b  Remove unused code and add failing project to exception
     new 7861695  Delay resolving of reactor projects until project is built
     new 2cfdf79  Correct type/language of slingstart packaging
     new 350917d  Get dependent projects from build if build in the same build
     new 93c268f  Check main artifact and attached artifacts for artifacts from the same build
     new e2fb051  Refactor slingstart maven plugin: resolve slingstart/slingfeature projects during setup of maven (reactor) project
     new 5e423dd  Implement control port option
     new fd065be  SLING-4620 : Slingstart plugin start goal exits even if launchpad.keep.running is set to true
     new d5508d2  Use maven.skip.test as the property for skipping the start/stop goals
     new 8e24720  SLING-4620 : Slingstart plugin start goal exits even if launchpad.keep.running is set to true
     new a55291e  [maven-release-plugin] prepare release slingstart-maven-plugin-1.1.0
     new 5664925  [maven-release-plugin] prepare for next development iteration
     new 265f5f4  SLING-4677 allow to start Sling in debug mode with a simple mojo parameter
     new 89d49b0  SLING-4677 allow to override debug settings of all controlled Sling servers through Mojo parameter
     new fbb9c15  SLING-4698 - Set parent.relativePath to empty for all modules
     new 320de8f  SLING-4766 Provisioning Model does not support adding variables to Sling Settings - allow escaping with \${var}
     new f2865de  SLING-4790 : Removal of artifacts from inherited model is not possible
     new ddd4ba0  SLING-4790 : Removal of artifacts from inherited model is not possible
     new 3982e2e  Prepare for release
     new 6cd730f  [maven-release-plugin] prepare release slingstart-maven-plugin-1.2.0
     new 29b2e20  [maven-release-plugin] prepare for next development iteration
     new 2aa3b8f  slingstart-maven-plugin: temporarily depend on SNAPSHOT version for provisioning.model
     new ab60b2f  Update to Sling Parent 23
     new 858d446  set parent version to 24 and add empty relativePath where missing
     new 72dfaf3  SLING-4879 Allow to read variables from POM
     new cfa9a87  SLING-4880 Allow to get artifact versions from POM
     new ce4b2b5  SLING-4880 Fix potential NPEs when resolving artifacts
     new 51d72c9  SLING-4879 refactor model processing logic from ModelUtility#getEffectiveModel into separate class to make it reusable
     new 55bf1b1  SLING-4879 update variables section in feature for attached artifact instead of using effective model
     new f59b06d  SLING-4880 apply resolved dependencies to raw model instead of attaching effective model add new optional parameter "allowUnresolvedPomDependencies" (default: false)
     new b239b9c  SLING-4889 : Provide a mojo to create a maven like structure of the referenced artifacts
     new c2041da  SLING-4889 : Provide a mojo to create a maven like structure of the referenced artifacts
     new f93e40b  SLING-4912 : Support inlining the model in the pom
     new 34fac94  Use latest provisioning model
     new 567d94e  [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.0
     new 91768e0  [maven-release-plugin] prepare for next development iteration
     new eba7ffa  Switch to latest snapshot for the release vote time
     new c0d83a9  Use released prov model
     new 250f6a0  Use released prov model
     new 0acafe1  SLING-4945 : Model files are missing from created repository SLING-4946 : Model dependencies are not followed transitively
     new 9321ca4  [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.2
     new 0808f14  [maven-release-plugin] prepare for next development iteration
     new e3c6967  SLING-4969 : Store aggregated model as artifact
     new e52e8a2  SLING-4969 : Store aggregated model as artifact
     new b0ca3ad  [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.4
     new 9bd2b5e  [maven-release-plugin] prepare for next development iteration
     new 71a7942  SLING-4970 : Potential NPE with transitive models
     new 30c2bf7  [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.6
     new 60c436f  [maven-release-plugin] prepare for next development iteration
     new 49d48b5  Update the main reactor to parent 25
     new c3b709a  SLING-5170 : Make dependency handling code more reusable
     new b98555a  SLING-5149 - Generate OSGi subsystem intermediary file in slingstart-maven-plugin
     new f6075f8  SLING-5379 - support renaming of bundles in maven-slingstart-plugin. Contributed by David Bosschaert, thanks!
     new fcda963  SLING-5379 - use BundleFileProcessor
     new e8fd2c9  SLING-5379 - add BSNRenamer
     new b703b6b  Use latest prov model snapshot version
     new f2ac4d9  Use provisioning model 1.4.2
     new 9fb072d  Switch to parent pom 26
     new 16ca65a  Use latest commons osgi release
     new f679285  [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.0
     new 27b495b  [maven-release-plugin] prepare for next development iteration
     new 2e41a1d  Switch to commons osgi 2.4.1 snapshot
     new 590bd42  SLING-5414 - embed the full text of the provisioning model in the Sling jar, under /resources/provisioning/model.txt
     new 854f279  SLING-5476 : target/classes should not be used by the plugin
     new 80b5f02  SLING-5477 : Allow to add an artifact of the slingstart project to the model
     new ebae600  Use released commons osgi
     new 7ae1ea8  [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.2
     new aec1d36  [maven-release-plugin] prepare for next development iteration
     new ca0b9d0  SLING-4677 clarify javadoc on debugging options
     new af5befd  SLING-5738 : Add support for configuring a pattern for the model files to be read
     new d1ca2b2  Use provisioning model 1.4.4
     new f6bbec6  [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.4
     new 4cf08cc  [maven-release-plugin] prepare for next development iteration
     new 0804217  Switch to provisioning model 1.4.5-SNAPSHOT during release vote
     new 40ad7a7  SLING-6068 allow to build and start a quickstart even for non "slingstart" packaging projects.
     new 21e28cf  SLING-6212 : Create more meaningful exception if no model is found for attach goal
     new 93f9f38  SLING-6213 : Provide a way to add artifacts from the current project to the provisioning model
     new e017516  SLING-6219 : Provide configuration to add project version to feature
     new 7b6e3d0  Clean up code
     new 537fdb3  Use latest provisioning model snapshot
     new fec71fe  SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
     new e0e89f2  SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
     new 25c4c59  SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
     new fb3ba19  SLING-6068 fix javadoc
     new 6179279  Use latest provisioning model
     new 5d911a2  [maven-release-plugin] prepare release slingstart-maven-plugin-1.5.0
     new 71da2a9  [maven-release-plugin] copy for tag slingstart-maven-plugin-1.5.0

The 129 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-slingstart-maven-plugin] 03/15: SLING-6068 allow to build and start a quickstart even for non "slingstart" packaging projects.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 40ad7a7b829cf689851d26ffafcdd781e9d754b8
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Oct 6 15:19:32 2016 +0000

    SLING-6068 allow to build and start a quickstart even for non "slingstart" packaging projects.
    
    This closes #176
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1763607 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/slingstart/AbstractSlingStartMojo.java   | 24 +++++++---
 .../slingstart/DependencyLifecycleParticipant.java | 22 ++++-----
 .../sling/maven/slingstart/ModelPreprocessor.java  | 56 +++++++++++++++++-----
 .../apache/sling/maven/slingstart/PackageMojo.java |  6 ++-
 .../sling/maven/slingstart/run/StartMojo.java      | 13 +++++
 5 files changed, 87 insertions(+), 34 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/AbstractSlingStartMojo.java b/src/main/java/org/apache/sling/maven/slingstart/AbstractSlingStartMojo.java
index f880a26..056b969 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/AbstractSlingStartMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/AbstractSlingStartMojo.java
@@ -32,22 +32,29 @@ import org.apache.sling.provisioning.model.ModelUtility.ResolverOptions;
 public abstract class AbstractSlingStartMojo extends AbstractMojo {
 
     /**
-     * The model directory
-     * This parameter is evaluated in the DependencyLifecycleParticipant
+     * The model directory containing the provision models.
+     * This parameter is evaluated in the {@link DependencyLifecycleParticipant}.
+     * As default first <code>${basedir}/src/main/provisioning</code> and then
+     * <code>${basedir}/src/test/provisioning</code> is used 
+     * (in case the former does not exist).
      */
     @Parameter(defaultValue="${basedir}/src/main/provisioning")
     private File modelDirectory;
 
     /**
-     * The model file name pattern
-     * This parameter is evaluated in the DependencyLifecycleParticipant
+     * The model file name pattern to consider.
+     * This parameter is evaluated in the {@link DependencyLifecycleParticipant}.
      */
-    @Parameter
+    @Parameter(defaultValue=DEFAULT_MODEL_PATTERN)
     private String modelPattern;
+    
+    public static final String DEFAULT_MODEL_PATTERN = "((.*)\\.txt|(.*)\\.model)";
 
     /**
-     * Inlined model, supported since version 1.3.
-     * This parameter is evaluated in the DependencyLifecycleParticipant
+     * Inlined model. Is processed first and afterwards merged with any model found in {@link #modelDirectory}.
+     * This parameter is evaluated in the {@link DependencyLifecycleParticipant}.
+     * @since 1.3
+     * @see <a href="https://issues.apache.org/jira/browse/SLING-4912">SLING-4912</a>
      */
     @Parameter
     private String model;
@@ -61,6 +68,9 @@ public abstract class AbstractSlingStartMojo extends AbstractMojo {
     @Parameter(property = "session", readonly = true, required = true)
     protected MavenSession mavenSession;
 
+    /**
+     * If set to {@code true} creates a WAR artifact in addition to the standalone JAR from the model.
+     */
     @Parameter(defaultValue="false")
     protected boolean createWebapp;
 
diff --git a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
index f6993b3..7335f9f 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
@@ -35,7 +35,10 @@ import org.codehaus.plexus.logging.Logger;
 @Component(role = AbstractMavenLifecycleParticipant.class)
 public class DependencyLifecycleParticipant extends AbstractMavenLifecycleParticipant {
 
-    private static final String PLUGIN_ID = "slingstart-maven-plugin";
+    /**
+     *  the plugin ID consists of <code>groupId:artifactId</code>, see {@link Plugin#constructKey(String, String)}
+     */
+    private static final String PLUGIN_ID = "org.apache.sling:slingstart-maven-plugin";
 
     @Requirement
     private Logger logger;
@@ -58,20 +61,15 @@ public class DependencyLifecycleParticipant extends AbstractMavenLifecyclePartic
         env.logger = logger;
         env.session = session;
 
-        logger.debug("Searching for " + BuildConstants.PACKAGING_SLINGSTART + "/" + BuildConstants.PACKAGING_PARTIAL_SYSTEM + " projects...");
+        logger.debug("Searching for project leveraging plugin '" + PLUGIN_ID + "'...");
 
         for (final MavenProject project : session.getProjects()) {
-            if ( project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART)
-                 || project.getPackaging().equals(BuildConstants.PACKAGING_PARTIAL_SYSTEM)) {
-                logger.debug("Found " + project.getPackaging() + " project: " + project);
-                // search plugin configuration (optional)
+            // consider all projects where this plugin is configured
+            Plugin plugin = project.getPlugin(PLUGIN_ID);
+            if (plugin != null) {
+                logger.debug("Found project " + project + " leveraging " + PLUGIN_ID +".");
                 final ProjectInfo info = new ProjectInfo();
-                for (Plugin plugin : project.getBuild().getPlugins()) {
-                    if (plugin.getArtifactId().equals(PLUGIN_ID)) {
-                        info.plugin = plugin;
-                        break;
-                    }
-                }
+                info.plugin = plugin;
                 info.project = project;
                 env.modelProjects.put(project.getGroupId() + ":" + project.getArtifactId(), info);
             }
diff --git a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
index cc2853c..ea74433 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
@@ -91,16 +91,31 @@ public class ModelPreprocessor {
         env.logger.debug("Processing project " + info.project);
 
         // read local model
-        final String directory = nodeValue(info.plugin,
-                "modelDirectory",
-                new File(info.project.getBasedir(), "src/main/provisioning").getAbsolutePath());
         final String pattern = nodeValue(info.plugin,
-                "modelPattern", "((.*)\\.txt|(.*)\\.model)");
-
+                "modelPattern", AbstractSlingStartMojo.DEFAULT_MODEL_PATTERN);
+        
         final String inlinedModel = nodeValue(info.plugin,
                 "model", null);
+        
+        String scope = Artifact.SCOPE_PROVIDED;
         try {
-            info.localModel = readLocalModel(info.project, inlinedModel, new File(directory), pattern, env.logger);
+            if (hasNodeValue(info.plugin, "modelDirectory")) {
+                final String directory = nodeValue(info.plugin,
+                        "modelDirectory", null);
+                info.localModel = readLocalModel(info.project, inlinedModel, new File(directory), pattern, env.logger);
+            } else {
+                // use multiple fallbacks here only in case the default model directory is not explicitly set
+                File defaultModelDirectory = new File(info.project.getBasedir(), "src/main/provisioning");
+                if (defaultModelDirectory.exists()) {
+                    env.logger.debug("Try to extract model from default provisioning directory " + defaultModelDirectory.getAbsolutePath());
+                    info.localModel = readLocalModel(info.project, inlinedModel, defaultModelDirectory, pattern, env.logger);
+                } else {
+                    File defaultModelDirectoryInTest = new File(info.project.getBasedir(), "src/test/provisioning");
+                    env.logger.debug("Try to extract model from default test provisioning directory " + defaultModelDirectoryInTest.getAbsolutePath());
+                    info.localModel = readLocalModel(info.project, inlinedModel, defaultModelDirectoryInTest, pattern, env.logger);
+                    scope = Artifact.SCOPE_TEST;
+                }
+            }
         } catch ( final IOException ioe) {
             throw new MavenExecutionException(ioe.getMessage(), ioe);
         }
@@ -132,7 +147,7 @@ public class ModelPreprocessor {
             throw new MavenExecutionException("Unable to create model file for " + info.project + " : " + errors, (File)null);
         }
 
-        addDependenciesFromModel(env, info);
+        addDependenciesFromModel(env, info, scope);
 
         try {
            ProjectHelper.storeProjectInfo(info);
@@ -144,14 +159,15 @@ public class ModelPreprocessor {
 
     /**
      * Add all dependencies from the model
-     * @param project The project
-     * @param model The model
-     * @param log The logger
+     * @param env The environment
+     * @param info The project info
+     * @param scope The scope which the new dependencies should have
      * @throws MavenExecutionException
      */
     private void addDependenciesFromModel(
             final Environment env,
-            final ProjectInfo info)
+            final ProjectInfo info,
+            final String scope)
     throws MavenExecutionException {
         if ( info.project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART ) ) {
             // add base artifact if defined in current model
@@ -168,7 +184,7 @@ public class ModelPreprocessor {
                 if ( BuildConstants.CLASSIFIER_WEBAPP.equals(c) ) {
                     dep.setType(BuildConstants.TYPE_WAR);
                 }
-                dep.setScope(Artifact.SCOPE_PROVIDED);
+                dep.setScope(scope);
 
                 info.project.getDependencies().add(dep);
                 env.logger.debug("- adding base dependency " + ModelUtils.toString(dep));
@@ -197,7 +213,7 @@ public class ModelPreprocessor {
                         dep.setType(a.getType());
                         dep.setClassifier(a.getClassifier());
 
-                        dep.setScope(Artifact.SCOPE_PROVIDED);
+                        dep.setScope(scope);
 
                         env.logger.debug("- adding dependency " + ModelUtils.toString(dep));
                         info.project.getDependencies().add(dep);
@@ -348,6 +364,18 @@ public class ModelPreprocessor {
             return defaultValue;
         }
     }
+    
+    /**
+     * Checks if plugin configuration value is set in POM for a specific configuration parameter.
+     * @param plugin Plugin
+     * @param name Configuration parameter.
+     * @return {@code true} in case the configuration has been set in the pom, otherwise {@code false}
+     */
+    private boolean hasNodeValue(final Plugin plugin, final String name) {
+        final Xpp3Dom config = plugin == null ? null : (Xpp3Dom)plugin.getConfiguration();
+        final Xpp3Dom node = (config == null ? null : config.getChild(name));
+        return (node != null);
+    }
 
     /**
      * Gets plugins configuration from POM (boolean parameter).
@@ -387,7 +415,9 @@ public class ModelPreprocessor {
      * Only files ending with .txt or .model are read.
      *
      * @param project The current maven project
+     * @param inlinedModel the inlined model to be merged with the models in modelDirectory (may be null)
      * @param modelDirectory The directory to scan for models
+     * @param pattern Pattern used to find the textual models within the modelDirectory
      * @param logger The logger
      */
     protected Model readLocalModel(
diff --git a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
index 8e19ecd..de1bb05 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
@@ -75,7 +75,8 @@ public class PackageMojo extends AbstractSlingStartMojo {
             fis = new FileInputStream(manifestFile);
             final Manifest mf = new Manifest(fis);
 
-            final File outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".jar");
+            // 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 JarArchiverHelper helper = new JarArchiverHelper(jarArchiver, this.project, outputFile, mf);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);
@@ -105,7 +106,8 @@ public class PackageMojo extends AbstractSlingStartMojo {
             final Map<String, File> contentsMap = (Map<String, File>) this.project.getContextValue(BuildConstants.CONTEXT_WEBAPP);
 
             final File buildOutputDirectory = new File(buildDirectory, BuildConstants.WEBAPP_OUTDIR);
-            final File outputFile = new File(buildDirectory, this.project.getArtifactId() + "-" + this.project.getVersion() + ".war");
+            // 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 JarArchiverHelper helper = new JarArchiverHelper(this.jarArchiver, this.project, outputFile);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);
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 928204f..ded1135 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
@@ -390,11 +390,13 @@ public class StartMojo extends AbstractMojo {
 
         // If a launchpad JAR is specified, use it
         if (launchpadJar != null) {
+            getLog().info("Using launchpad jar from '" +  launchpadJar + "' given as configuration parameter!");
             return launchpadJar;
         }
 
         // If a launchpad dependency is configured, resolve it
         if (launchpadDependency != null) {
+            getLog().info("Using launchpad dependency '" +  launchpadDependency + "' given as configuration parameter!");
             return getArtifact(launchpadDependency).getFile();
         }
 
@@ -402,10 +404,20 @@ public class StartMojo extends AbstractMojo {
         if (this.project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART)) {
             final File jarFile = new File(this.project.getBuild().getDirectory(), this.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"
+        for (Artifact attachedArtifact : project.getAttachedArtifacts()) {
+            // find the attached artifact with classifier "standalone"
+            if (BuildConstants.TYPE_JAR.equals(attachedArtifact.getType()) && BuildConstants.CLASSIFIER_APP.equals(attachedArtifact.getClassifier())) {
+                getLog().info("Using launchpad jar being attached as additional project artifact: '" +  attachedArtifact.getFile() + "'!");
+                return attachedArtifact.getFile();
+            }
+        }
+
         // Last chance: use the first declared dependency with type "slingstart"
         final Set<Artifact> dependencies = this.project.getDependencyArtifacts();
         for (final Artifact dep : dependencies) {
@@ -416,6 +428,7 @@ public class StartMojo extends AbstractMojo {
                 d.setVersion(dep.getVersion());
                 d.setScope(Artifact.SCOPE_RUNTIME);
                 d.setType(BuildConstants.TYPE_JAR);
+                getLog().info("Using launchpad jar from first dependency of type 'slingstart': '"+ d +"'!");
                 return getArtifact(d).getFile();
             }
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 15/15: [maven-release-plugin] copy for tag slingstart-maven-plugin-1.5.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 71da2a97c99158596fb8837f0f3db5e60782afe7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 12:09:12 2016 +0000

    [maven-release-plugin] copy for tag slingstart-maven-plugin-1.5.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.5.0@1768671 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 08/15: Use latest provisioning model snapshot

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 537fdb32d88338931f7ec6e4633a96c3241e7572
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Nov 7 17:05:36 2016 +0000

    Use latest provisioning model snapshot
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768557 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 5189bd6..1b63bb0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.provisioning.model</artifactId>
-           <version>1.5.1-SNAPSHOT</version>
+           <version>1.6.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 06/15: SLING-6219 : Provide configuration to add project version to feature

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit e0175165b2f3eced7c70f66397b03721b1344637
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Oct 30 11:25:17 2016 +0000

    SLING-6219 : Provide configuration to add project version to feature
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1767145 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/maven/slingstart/ModelPreprocessor.java     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
index 09adc4b..5c15cca 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
@@ -134,6 +134,15 @@ public class ModelPreprocessor {
         // process attachments
         processAttachments(env, info);
 
+        // check for setting version
+        if ( nodeBooleanValue(info.plugin, "setFeatureVersions", false) ) {
+            for(final Feature f : info.localModel.getFeatures() ) {
+                if ( f.getVersion() == null ) {
+                    f.setVersion(info.project.getVersion());
+                }
+            }
+        }
+
         // prepare resolver options
         ResolverOptions resolverOptions = new ResolverOptions();
         if (nodeBooleanValue(info.plugin, "usePomVariables", false)) {

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 14/15: [maven-release-plugin] prepare release slingstart-maven-plugin-1.5.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 5d911a2687b87a098a131bc19789bb923cb19d7f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 12:08:59 2016 +0000

    [maven-release-plugin] prepare release slingstart-maven-plugin-1.5.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768670 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6e8b4ca..b62c034 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     </parent>
 
     <artifactId>slingstart-maven-plugin</artifactId>
-    <version>1.4.5-SNAPSHOT</version>
+    <version>1.5.0</version>
     <packaging>maven-plugin</packaging>
 
     <name>Apache Sling SlingStart Maven Plugin</name>
@@ -35,9 +35,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.5.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.5.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/slingstart-maven-plugin-1.5.0</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 13/15: Use latest provisioning model

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 61792796659bef438c28f5ab2bba438fa4462119
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 12:08:23 2016 +0000

    Use latest provisioning model
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768669 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 1b63bb0..6e8b4ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.provisioning.model</artifactId>
-           <version>1.6.1-SNAPSHOT</version>
+           <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 05/15: SLING-6213 : Provide a way to add artifacts from the current project to the provisioning model

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 93f9f380a13438afa0ef90f326cc22eafe04ee73
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Oct 30 10:02:32 2016 +0000

    SLING-6213 : Provide a way to add artifacts from the current project to the provisioning model
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1767138 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/maven/slingstart/ModelPreprocessor.java  | 72 +++++++++++++++++++++-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
index ea74433..09adc4b 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
@@ -74,12 +74,23 @@ public class ModelPreprocessor {
         public final Map<String, ProjectInfo> modelProjects = new HashMap<String, ProjectInfo>();
     }
 
+    /**
+     * Add dependencies for all projects.
+     * @param env The environment with all maven settings and projects
+     * @throws MavenExecutionException If anything goes wrong.
+     */
     public void addDependencies(final Environment env) throws MavenExecutionException {
         for(final ProjectInfo info : env.modelProjects.values()) {
             addDependencies(env, info);
         }
     }
 
+    /**
+     * Add dependencies for a single project.
+     * @param env The environment with all maven settings and projects
+     * @param info The project to process.
+     * @throws MavenExecutionException If anything goes wrong.
+     */
     private Model addDependencies(final Environment env, final ProjectInfo info)
     throws MavenExecutionException {
         if ( info.done == true ) {
@@ -93,10 +104,10 @@ public class ModelPreprocessor {
         // read local model
         final String pattern = nodeValue(info.plugin,
                 "modelPattern", AbstractSlingStartMojo.DEFAULT_MODEL_PATTERN);
-        
+
         final String inlinedModel = nodeValue(info.plugin,
                 "model", null);
-        
+
         String scope = Artifact.SCOPE_PROVIDED;
         try {
             if (hasNodeValue(info.plugin, "modelDirectory")) {
@@ -120,6 +131,9 @@ public class ModelPreprocessor {
             throw new MavenExecutionException(ioe.getMessage(), ioe);
         }
 
+        // process attachments
+        processAttachments(env, info);
+
         // prepare resolver options
         ResolverOptions resolverOptions = new ResolverOptions();
         if (nodeBooleanValue(info.plugin, "usePomVariables", false)) {
@@ -357,6 +371,10 @@ public class ModelPreprocessor {
      */
     private String nodeValue(final Plugin plugin, final String name, final String defaultValue) {
         final Xpp3Dom config = plugin == null ? null : (Xpp3Dom)plugin.getConfiguration();
+        return nodeValue(config, name, defaultValue);
+    }
+
+    private String nodeValue(final Xpp3Dom config, final String name, final String defaultValue) {
         final Xpp3Dom node = (config == null ? null : config.getChild(name));
         if (node != null) {
             return node.getValue();
@@ -364,7 +382,7 @@ public class ModelPreprocessor {
             return defaultValue;
         }
     }
-    
+
     /**
      * Checks if plugin configuration value is set in POM for a specific configuration parameter.
      * @param plugin Plugin
@@ -377,6 +395,54 @@ public class ModelPreprocessor {
         return (node != null);
     }
 
+    private void processAttachments(final Environment env, final ProjectInfo info)
+    throws MavenExecutionException {
+        final Xpp3Dom config = info.plugin == null ? null : (Xpp3Dom)info.plugin.getConfiguration();
+        final Xpp3Dom[] nodes = (config == null ? null : config.getChildren("attach"));
+        if ( nodes != null ) {
+            for(final Xpp3Dom node : nodes) {
+                final String type = nodeValue(node, "type", null);
+                if ( type == null ) {
+                    throw new MavenExecutionException("Attachment for provisioning model has no type.", (File)null);
+                }
+                final String classifier = nodeValue(node, "classifier", null);
+                final String featureName = nodeValue(node, "feature", null);
+                int startLevel = 0;
+                final String level = nodeValue(node, "startLevel", null);
+                if ( level != null ) {
+                    startLevel = Integer.valueOf(level);
+                }
+
+                final Feature f;
+                if ( featureName != null ) {
+                    f = info.localModel.getFeature(featureName);
+                } else if ( info.localModel.getFeatures().isEmpty() ) {
+                    f = null;
+                } else {
+                    f = info.localModel.getFeatures().get(0);
+                }
+                if ( f == null ) {
+                    if ( featureName == null ) {
+                        throw new MavenExecutionException("No feature found in provisioning model for attachment.", (File)null);
+                    }
+                    throw new MavenExecutionException("Feature with name '" + featureName + "' not found in provisioning model for attachment.", (File)null);
+                }
+                final RunMode runMode = f.getOrCreateRunMode(null);
+                final ArtifactGroup group = runMode.getOrCreateArtifactGroup(startLevel);
+
+                final org.apache.sling.provisioning.model.Artifact artifact = new org.apache.sling.provisioning.model.Artifact(
+                        info.project.getGroupId(),
+                        info.project.getArtifactId(),
+                        info.project.getVersion(),
+                        classifier,
+                        type);
+
+                env.logger.debug("Attaching " + artifact + " to feature " + f.getName());
+                group.add(artifact);
+            }
+        }
+    }
+
     /**
      * Gets plugins configuration from POM (boolean parameter).
      * @param plugin Plugin

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 04/15: SLING-6212 : Create more meaningful exception if no model is found for attach goal

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 21e28cf42894243ec2778de278c3e01c486b5a41
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Oct 30 09:17:04 2016 +0000

    SLING-6212 : Create more meaningful exception if no model is found for attach goal
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1767135 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                            | 2 +-
 src/main/java/org/apache/sling/maven/slingstart/ProjectHelper.java | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index f79fe6f..a886865 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.provisioning.model</artifactId>
-           <version>1.4.5-SNAPSHOT</version>
+           <version>1.5.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
diff --git a/src/main/java/org/apache/sling/maven/slingstart/ProjectHelper.java b/src/main/java/org/apache/sling/maven/slingstart/ProjectHelper.java
index a454bd0..d03023b 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ProjectHelper.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ProjectHelper.java
@@ -102,7 +102,11 @@ public abstract class ProjectHelper {
         Model result = (Model) project.getContextValue(RAW_MODEL_CACHE);
         if ( result == null ) {
             try {
-                final StringReader r = new StringReader((String)project.getContextValue(RAW_MODEL_TXT));
+                final String text = (String)project.getContextValue(RAW_MODEL_TXT);
+                if ( text == null ) {
+                    throw new MojoExecutionException("No provisioning model found in project.");
+                }
+                final StringReader r = new StringReader(text);
                 result = ModelReader.read(r, project.getId());
                 project.setContextValue(RAW_MODEL_CACHE, result);
             } catch ( final IOException ioe) {

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 07/15: Clean up code

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 7b6e3d04251927bf99272ad74d54d42ff67cb1e6
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Oct 30 12:50:18 2016 +0000

    Clean up code
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1767154 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                           | 6 ++----
 .../java/org/apache/sling/maven/slingstart/ModelPreprocessor.java | 7 ++++---
 .../org/apache/sling/maven/slingstart/PreparePackageMojo.java     | 8 ++++----
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/pom.xml b/pom.xml
index a886865..5189bd6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>29</version>
         <relativePath />
     </parent>
 
@@ -31,7 +31,6 @@
     </description>
 
     <properties>
-        <sling.java.version>7</sling.java.version>
         <maven.version>3.0.5</maven.version>
     </properties>
 
@@ -59,7 +58,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-plugin-plugin</artifactId>
-                <version>3.4</version>
                 <executions>
                     <execution>
                         <id>mojo-descriptor</id>
@@ -118,7 +116,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.configadmin</artifactId>
-            <version>1.8.6</version>
+            <version>1.8.10</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
index 5c15cca..25d4e92 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
@@ -43,6 +43,7 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
 import org.apache.sling.provisioning.model.ArtifactGroup;
 import org.apache.sling.provisioning.model.Feature;
+import org.apache.sling.provisioning.model.MergeUtility;
 import org.apache.sling.provisioning.model.Model;
 import org.apache.sling.provisioning.model.ModelConstants;
 import org.apache.sling.provisioning.model.ModelUtility;
@@ -528,7 +529,7 @@ public class ModelPreprocessor {
                     if (errors != null ) {
                         throw new MavenExecutionException("Invalid inlined model : " + errors, (File)null);
                     }
-                    ModelUtility.merge(result, current, false);
+                    MergeUtility.merge(result, current, new MergeUtility.MergeOptions().setHandleRemoveRunMode(false));
                 } finally {
                     IOUtils.closeQuietly(reader);
                 }
@@ -547,7 +548,7 @@ public class ModelPreprocessor {
                     if (errors != null ) {
                         throw new MavenExecutionException("Invalid model at " + name + " : " + errors, (File)null);
                     }
-                    ModelUtility.merge(result, current, false);
+                    MergeUtility.merge(result, current, new MergeUtility.MergeOptions().setHandleRemoveRunMode(false));
                 } finally {
                     IOUtils.closeQuietly(reader);
                 }
@@ -579,6 +580,6 @@ public class ModelPreprocessor {
      * @param additional The additional model
      */
     protected void mergeModels(final Model base, final Model additional) throws MavenExecutionException {
-        ModelUtility.merge(base, additional);
+        MergeUtility.merge(base, additional);
     }
 }
diff --git a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
index f15863e..83689ec 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
@@ -184,7 +184,7 @@ public class PreparePackageMojo extends AbstractSlingStartMojo {
             // check for web.xml
             final Feature webappF = model.getFeature(ModelConstants.FEATURE_LAUNCHPAD);
             if ( webappF != null ) {
-                final RunMode webappRM = webappF.getRunMode(null);
+                final RunMode webappRM = webappF.getRunMode();
                 if ( webappRM != null ) {
                     final Configuration webConfig = webappRM.getConfiguration(ModelConstants.CFG_LAUNCHPAD_WEB_XML);
                     if ( webConfig != null ) {
@@ -479,7 +479,7 @@ public class PreparePackageMojo extends AbstractSlingStartMojo {
         final Properties settings = new Properties();
         final Feature launchpadFeature = model.getFeature(ModelConstants.FEATURE_LAUNCHPAD);
         if ( launchpadFeature != null ) {
-            final RunMode launchpadRunMode = launchpadFeature.getRunMode(null);
+            final RunMode launchpadRunMode = launchpadFeature.getRunMode();
             if ( launchpadRunMode != null ) {
                 for(final Map.Entry<String, String> entry : launchpadRunMode.getSettings()) {
                     settings.put(entry.getKey(), deescapeVariablePlaceholders(entry.getValue()));
@@ -488,7 +488,7 @@ public class PreparePackageMojo extends AbstractSlingStartMojo {
         }
         final Feature bootFeature = model.getFeature(ModelConstants.FEATURE_BOOT);
         if ( bootFeature != null ) {
-            final RunMode bootRunMode = bootFeature.getRunMode(null);
+            final RunMode bootRunMode = bootFeature.getRunMode();
             if ( bootRunMode != null ) {
                 for(final Map.Entry<String, String> entry : bootRunMode.getSettings()) {
                     settings.put(entry.getKey(), deescapeVariablePlaceholders(entry.getValue()));
@@ -528,7 +528,7 @@ public class PreparePackageMojo extends AbstractSlingStartMojo {
 
         final Feature launchpadFeature = model.getFeature(ModelConstants.FEATURE_LAUNCHPAD);
         if ( launchpadFeature != null ) {
-            final RunMode launchpadRunMode = launchpadFeature.getRunMode(null);
+            final RunMode launchpadRunMode = launchpadFeature.getRunMode();
             if ( launchpadRunMode != null ) {
                 final Configuration c = launchpadRunMode.getConfiguration(ModelConstants.CFG_LAUNCHPAD_BOOTSTRAP);
                 if ( c != null ) {

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 01/15: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 4cf08cc85d569e108c36d51e0cdea8e26010fafb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jun 6 14:00:54 2016 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1747008 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index b61c83a..b111b74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     </parent>
 
     <artifactId>slingstart-maven-plugin</artifactId>
-    <version>1.4.4</version>
+    <version>1.4.5-SNAPSHOT</version>
     <packaging>maven-plugin</packaging>
 
     <name>Apache Sling SlingStart Maven Plugin</name>
@@ -36,9 +36,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.4.4</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.4.4</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/slingstart-maven-plugin-1.4.4</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 09/15: SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit fec71fe71ad6d6796f7a08a0cf96f336d0436ccb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 06:01:12 2016 +0000

    SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768630 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java | 6 +++---
 1 file changed, 3 insertions(+), 3 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 ded1135..c74939d 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
@@ -74,10 +74,10 @@ public class StartMojo extends AbstractMojo {
      */
     @Parameter
     private List<ServerConfiguration> servers;
-    
+
     /**
      * Overwrites debug parameter of all server configurations (if set).
-     * Attaches a debugger to the forked JVM. If set to {@code "true"}, the process will allow a debugger to connect on port 8000. 
+     * Attaches a debugger to the forked JVM. If set to {@code "true"}, the process will allow a debugger to connect on port 8000.
      * If set to some other string, that string will be appended to the server's {@code vmOpts}, allowing you to configure arbitrary debugging options.
      */
     @Parameter(property = "launchpad.debug")
@@ -402,7 +402,7 @@ 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 = new File(this.project.getBuild().getDirectory(), this.project.getBuild().getFinalName() + ".jar");
+            final File jarFile = project.getArtifact().getFile();
             if (jarFile.exists()) {
                 getLog().info("Using launchpad jar being generated as this project's primary artifact: '" +  jarFile + "'!");
                 return jarFile;

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 11/15: SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 25c4c597a3301797f25d804b97751f6e3c2d0051
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 08:51:14 2016 +0000

    SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768644 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/maven/slingstart/PackageMojo.java | 37 ++++++++++++----------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
index 53df7db..cd92163 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
@@ -64,7 +64,6 @@ public class PackageMojo extends AbstractSlingStartMojo {
     private void packageStandaloneApp(final Map<String, File> globalContentsMap) throws MojoExecutionException {
         this.getLog().info("Packaging standalone jar...");
 
-        final File buildDirectory = new File(this.project.getBuild().getDirectory());
         @SuppressWarnings("unchecked")
         final Map<String, File> contentsMap = (Map<String, File>) this.project.getContextValue(BuildConstants.CONTEXT_STANDALONE);
 
@@ -75,14 +74,7 @@ public class PackageMojo extends AbstractSlingStartMojo {
             fis = new FileInputStream(manifestFile);
             final Manifest mf = new Manifest(fis);
 
-            // make sure this filename does not conflict with any other project artifacts (primary or secondary)
-            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 File outputFile = getBuildFile(".jar");
             final JarArchiverHelper helper = new JarArchiverHelper(jarArchiver, this.project, outputFile, mf);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);
 
@@ -110,16 +102,10 @@ public class PackageMojo extends AbstractSlingStartMojo {
             @SuppressWarnings("unchecked")
             final Map<String, File> contentsMap = (Map<String, File>) this.project.getContextValue(BuildConstants.CONTEXT_WEBAPP);
 
-            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;
-            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 File outputFile = getBuildFile(".war");
 
             final JarArchiverHelper helper = new JarArchiverHelper(this.jarArchiver, this.project, outputFile);
+            final File buildOutputDirectory = new File(buildDirectory, BuildConstants.WEBAPP_OUTDIR);
             helper.addDirectory(buildOutputDirectory, null, EXCLUDES_MANIFEST);
 
             helper.addArtifacts(globalContentsMap, "WEB-INF/");
@@ -130,4 +116,21 @@ public class PackageMojo extends AbstractSlingStartMojo {
             projectHelper.attachArtifact(project, BuildConstants.TYPE_WAR, BuildConstants.CLASSIFIER_WEBAPP, outputFile);
         }
     }
+
+    /**
+     *
+     * @param isStandalone {@code true} if the standalone launchpad should be built, {@code false} if the webapp should be built.
+     * @return the absolute file name of the to be created artifact
+     */
+    private File getBuildFile(final String extension) {
+        final File buildDirectory = new File(this.project.getBuild().getDirectory());
+        final File buildFile;
+        if ( BuildConstants.PACKAGING_SLINGSTART.equals(project.getPackaging()) ) {
+            buildFile = new File(buildDirectory, this.project.getBuild().getFinalName() + extension);
+        } else {
+            // make sure this filename does not conflict with any other project artifacts (primary or secondary)
+            buildFile = new File(buildDirectory, this.project.getBuild().getFinalName() + ".launchpad" + extension);
+        }
+        return buildFile;
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 10/15: SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit e0e89f2f0ee472dcf936062b2736d2e51bf4ebb6
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 8 07:59:05 2016 +0000

    SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768640 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/maven/slingstart/PackageMojo.java     | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
index de1bb05..53df7db 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
@@ -76,7 +76,12 @@ public class PackageMojo extends AbstractSlingStartMojo {
             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 AbstractSlingStartMojo {
 
             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);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 02/15: Switch to provisioning model 1.4.5-SNAPSHOT during release vote

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit 0804217c3623e6b64c41c50e1a411b80b0817ae8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jun 6 14:03:32 2016 +0000

    Switch to provisioning model 1.4.5-SNAPSHOT during release vote
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1747011 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b111b74..f79fe6f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.provisioning.model</artifactId>
-           <version>1.4.4</version>
+           <version>1.4.5-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-slingstart-maven-plugin] 12/15: SLING-6068 fix javadoc

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag slingstart-maven-plugin-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git

commit fb3ba19c0f0221312e3321a9c4852bef73df4caa
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Nov 8 09:28:36 2016 +0000

    SLING-6068 fix javadoc
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1768647 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
index cd92163..bdd42c7 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PackageMojo.java
@@ -119,8 +119,8 @@ public class PackageMojo extends AbstractSlingStartMojo {
 
     /**
      *
-     * @param isStandalone {@code true} if the standalone launchpad should be built, {@code false} if the webapp should be built.
-     * @return the absolute file name of the to be created artifact
+     * @param extension the extension including the leading dot to be used for the file name.
+     * @return the absolute file name of the to be created artifact.
      */
     private File getBuildFile(final String extension) {
         final File buildDirectory = new File(this.project.getBuild().getDirectory());

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.