Fix order of jetty.http.port property for jetty maven plugin (#12183)

This commit is contained in:
Jan Bartel 2024-08-22 18:19:44 +10:00 committed by Simone Bordet
parent 9f08dc3050
commit dbb982108b
No known key found for this signature in database
GPG Key ID: 1677D141BCF3584D
1 changed files with 10 additions and 9 deletions

View File

@ -198,6 +198,15 @@ public abstract class AbstractHomeForker extends AbstractForker
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=");
@ -214,6 +223,7 @@ public abstract class AbstractHomeForker extends AbstractForker
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
@ -222,15 +232,6 @@ public abstract class AbstractHomeForker extends AbstractForker
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());