sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1767154 - in /sling/trunk/tooling/maven/slingstart-maven-plugin: pom.xml src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
Date Sun, 30 Oct 2016 12:50:18 GMT
Author: cziegeler
Date: Sun Oct 30 12:50:18 2016
New Revision: 1767154

URL: http://svn.apache.org/viewvc?rev=1767154&view=rev
Log:
Clean up code

Modified:
    sling/trunk/tooling/maven/slingstart-maven-plugin/pom.xml
    sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
    sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java

Modified: sling/trunk/tooling/maven/slingstart-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin/pom.xml?rev=1767154&r1=1767153&r2=1767154&view=diff
==============================================================================
--- sling/trunk/tooling/maven/slingstart-maven-plugin/pom.xml (original)
+++ sling/trunk/tooling/maven/slingstart-maven-plugin/pom.xml Sun Oct 30 12:50:18 2016
@@ -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>

Modified: sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java?rev=1767154&r1=1767153&r2=1767154&view=diff
==============================================================================
--- sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
(original)
+++ sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java
Sun Oct 30 12:50:18 2016
@@ -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);
     }
 }

Modified: sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java?rev=1767154&r1=1767153&r2=1767154&view=diff
==============================================================================
--- sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
(original)
+++ sling/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
Sun Oct 30 12:50:18 2016
@@ -184,7 +184,7 @@ public class PreparePackageMojo extends
             // 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
         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
         }
         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
 
         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 ) {



Mime
View raw message