Skip to content

Commit

Permalink
Fix order of jetty.http.port property for jetty maven plugin (#12183)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel committed Aug 22, 2024
1 parent 0644aaf commit 36ec04f
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ protected ProcessBuilder createCommand()
if (stopKey != null)
cmd.add("-DSTOP.KEY=" + stopKey);

//put any jetty properties onto the command line
if (jettyProperties != null)
{
for (Map.Entry<String, String> e : jettyProperties.entrySet())
{
cmd.add(e.getKey() + "=" + e.getValue());
}
}

//set up enabled jetty modules
StringBuilder tmp = new StringBuilder();
tmp.append("--module=");
Expand All @@ -214,6 +223,7 @@ protected ProcessBuilder createCommand()
if (libExtJarFiles != null && !libExtJarFiles.isEmpty() && tmp.indexOf("ext") < 0)
tmp.append(",ext");
tmp.append("," + environment + "-maven");

cmd.add(tmp.toString());

//put any other jetty options onto the command line
Expand All @@ -222,15 +232,6 @@ protected ProcessBuilder createCommand()
Arrays.stream(jettyOptions.split(" ")).filter(a -> StringUtil.isNotBlank(a)).forEach((a) -> cmd.add(a.trim()));
}

//put any jetty properties onto the command line
if (jettyProperties != null)
{
for (Map.Entry<String, String> e : jettyProperties.entrySet())
{
cmd.add(e.getKey() + "=" + e.getValue());
}
}

//existence of this file signals process started
cmd.add("jetty.token.file=" + tokenFile.getAbsolutePath().toString());

Expand Down

0 comments on commit 36ec04f

Please sign in to comment.