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:54 UTC
[sling-slingstart-maven-plugin] 07/15: Clean up code
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>.