You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by en...@apache.org on 2021/04/01 20:29:34 UTC
[sling-feature-launcher-maven-plugin] branch master updated:
SLING-9994 cleanup to convert tabs to spaces
This is an automated email from the ASF dual-hosted git repository.
enorman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-feature-launcher-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 46d691a SLING-9994 cleanup to convert tabs to spaces
46d691a is described below
commit 46d691a34699e70ef6b9905dc1aff6a32d3cb8bf
Author: Eric Norman <en...@apache.org>
AuthorDate: Thu Apr 1 13:29:01 2021 -0700
SLING-9994 cleanup to convert tabs to spaces
---
src/it/simple-it/pom.xml | 14 ++++++------
.../maven/feature/launcher/LauncherArguments.java | 16 ++++++-------
.../sling/maven/feature/launcher/StartMojo.java | 26 +++++++++++-----------
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/it/simple-it/pom.xml b/src/it/simple-it/pom.xml
index 44990a0..a1b0e07 100644
--- a/src/it/simple-it/pom.xml
+++ b/src/it/simple-it/pom.xml
@@ -112,13 +112,13 @@
<type>slingosgifeature</type>
</feature>
<launcherArguments>
- <!-- optionally uncomment to pass any required extra vm options -->
- <!--
- <vmOptions>
- <value>-Xmx512m</value>
- <value>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5000</value>
- </vmOptions>
- -->
+ <!-- optionally uncomment to pass any required extra vm options -->
+ <!--
+ <vmOptions>
+ <value>-Xmx512m</value>
+ <value>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5000</value>
+ </vmOptions>
+ -->
<frameworkProperties>
<org.osgi.service.http.port>${http.port}</org.osgi.service.http.port>
</frameworkProperties>
diff --git a/src/main/java/org/apache/sling/maven/feature/launcher/LauncherArguments.java b/src/main/java/org/apache/sling/maven/feature/launcher/LauncherArguments.java
index c617849..aaef214 100644
--- a/src/main/java/org/apache/sling/maven/feature/launcher/LauncherArguments.java
+++ b/src/main/java/org/apache/sling/maven/feature/launcher/LauncherArguments.java
@@ -23,18 +23,18 @@ import java.util.Map;
public class LauncherArguments {
- private String[] vmOptions = null;
+ private String[] vmOptions = null;
private Map<String, String> frameworkProperties = new HashMap<>();
- public String[] getVmOptions() {
- return vmOptions;
- }
+ public String[] getVmOptions() {
+ return vmOptions;
+ }
- public void setVmOptions(String[] vmOptions) {
- this.vmOptions = vmOptions;
- }
+ public void setVmOptions(String[] vmOptions) {
+ this.vmOptions = vmOptions;
+ }
- public Map<String, String> getFrameworkProperties() {
+ public Map<String, String> getFrameworkProperties() {
return frameworkProperties;
}
diff --git a/src/main/java/org/apache/sling/maven/feature/launcher/StartMojo.java b/src/main/java/org/apache/sling/maven/feature/launcher/StartMojo.java
index afa4d64..b8730e3 100644
--- a/src/main/java/org/apache/sling/maven/feature/launcher/StartMojo.java
+++ b/src/main/java/org/apache/sling/maven/feature/launcher/StartMojo.java
@@ -118,20 +118,20 @@ public class StartMojo extends AbstractMojo {
List<String> args = new ArrayList<>();
String javahome = System.getenv("JAVA_HOME");
if (javahome == null || javahome.isEmpty()) {
- // SLING-9843 fallback to java.home system property if JAVA_HOME env variable is not set
- getLog().warn("The JAVA_HOME env variable was not set, falling back to the java.home system property");
- javahome = System.getProperty("java.home");
+ // SLING-9843 fallback to java.home system property if JAVA_HOME env variable is not set
+ getLog().warn("The JAVA_HOME env variable was not set, falling back to the java.home system property");
+ javahome = System.getProperty("java.home");
+ }
+ args.add(javahome + File.separatorChar + "bin" + File.separatorChar + "java");
+ // SLING-9994 - if any extra vm options were supplied, apply them here
+ String[] vmOptions = launch.getLauncherArguments().getVmOptions();
+ if (vmOptions != null) {
+ for (String vmOption : vmOptions) {
+ if (vmOption != null && !vmOption.isEmpty()) {
+ args.add(vmOption);
+ }
+ }
}
- args.add(javahome + File.separatorChar + "bin" + File.separatorChar + "java");
- // SLING-9994 - if any extra vm options were supplied, apply them here
- String[] vmOptions = launch.getLauncherArguments().getVmOptions();
- if (vmOptions != null) {
- for (String vmOption : vmOptions) {
- if (vmOption != null && !vmOption.isEmpty()) {
- args.add(vmOption);
- }
- }
- }
args.add("-jar");
args.add(launcher.getAbsolutePath());
args.add("-f");