fix it test: add new property to be able to configure used java, fix jetty-http.xml with compliance mode changed
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
parent
1d00091bd1
commit
f4f3dc679a
|
@ -93,6 +93,7 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<jettyBase>${basedir}/src/base</jettyBase>
|
||||
<javaPath>${java.home}/bin/java</javaPath>
|
||||
<jettyProperties>
|
||||
<jettyProperty>jetty.server.dumpAfterStart=true</jettyProperty>
|
||||
<jettyProperty>jetty.port.file=${jetty.port.file}</jettyProperty>
|
||||
|
|
|
@ -198,7 +198,9 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
private Random random;
|
||||
|
||||
private Path tokenFile;
|
||||
|
||||
|
||||
@Parameter(property = "jetty.javaPath")
|
||||
private String javaPath;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.maven.plugin.JettyRunMojo#execute()
|
||||
|
@ -375,7 +377,7 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
//copy the existing jetty base
|
||||
Files.walkFileTree(jettyBasePath,EnumSet.of(FileVisitOption.FOLLOW_LINKS),
|
||||
Integer.MAX_VALUE,
|
||||
new SimpleFileVisitor<Path>()
|
||||
new SimpleFileVisitor<>()
|
||||
{
|
||||
/**
|
||||
* @see java.nio.file.SimpleFileVisitor#preVisitDirectory(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
|
||||
|
@ -492,7 +494,14 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
public ProcessBuilder configureCommand()
|
||||
{
|
||||
List<String> cmd = new ArrayList<>();
|
||||
cmd.add("java");
|
||||
if(StringUtil.isNotBlank( javaPath ))
|
||||
{
|
||||
cmd.add( javaPath );
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.add( "java" );
|
||||
}
|
||||
cmd.add("-jar");
|
||||
cmd.add(new File(jettyHome, "start.jar").getAbsolutePath());
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
||||
<Arg name="compliance"><Call class="org.eclipse.jetty.http.HttpCompliance" name="valueOf"><Arg><Property name="jetty.http.compliance" default="RFC7230_LEGACY"/></Arg></Call></Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
|
|
Loading…
Reference in New Issue