diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 92fe65ff2e0..0f25efd50a3 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -10,7 +10,7 @@ http://www.eclipse.org/jetty pom - target/distribution + ${basedir}/target/distribution 1.0.1 @@ -466,18 +466,18 @@ exec-maven-plugin - package + process-classes - exec + java - java - ${assembly-directory} + org.eclipse.jetty.start.Main - -jar - start.jar + --debug + jetty.home=${assembly-directory} + jetty.base=${assembly-directory} --module-start-ini=server,deploy,http,websocket,jsp,ext,resources diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 6f891b68bed..57f4cee27dd 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -66,7 +66,7 @@ public class StartArgs // TODO: might make sense to declare this in modules/base.mod private static final String SERVER_MAIN = "org.eclipse.jetty.xml.XmlConfiguration"; - + private List commandLine = new ArrayList<>(); private Set modules = new HashSet<>(); private Map> sources = new HashMap<>(); @@ -579,9 +579,21 @@ public class StartArgs } } - public void parse(String arg, String source) + public void parse(final String rawarg, String source) { - if (arg.trim().startsWith("#")) + if (rawarg == null) + { + return; + } + + final String arg = rawarg.trim(); + + if (arg.length() <= 0) + { + return; + } + + if (arg.startsWith("#")) { return; } @@ -751,7 +763,7 @@ public class StartArgs } // Anything else is unrecognized - throw new UsageException(ERR_BAD_ARG,"Unrecognized argument: %s in %s",arg,source); + throw new UsageException(ERR_BAD_ARG,"Unrecognized argument: \"%s\" in %s",arg,source); } public void parseCommandLine() diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini index 565a7c8fc90..d8f52628564 100644 --- a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini +++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/start.ini @@ -4,6 +4,7 @@ # We want to serve content over http --module=http +jetty.port=8080 # Have webapps be deployed normally from webapps directory --module=deploy