Skip to content

Commit

Permalink
GEODE-5820: upgrade jetty to fix jetty tests in java 9+ (#2567)
Browse files Browse the repository at this point in the history
* GEODE-5820: upgrade jetty to fix jetty tests in java 9+

Co-authored-by: Patrick Rhomberg <prhomberg@pivotal.io>
  • Loading branch information
jinmeiliao and PurelyApplied committed Oct 5, 2018
1 parent 5bccf66 commit db716cc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.HashMap;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.SystemUtils;
import org.apache.logging.log4j.Logger;
import org.codehaus.cargo.container.ContainerType;
import org.codehaus.cargo.container.InstalledLocalContainer;
Expand Down Expand Up @@ -183,8 +184,16 @@ public void start() {
config.setProperty(GeneralPropertySet.RMI_PORT, Integer.toString(ports[1]));
config.setProperty(TomcatPropertySet.AJP_PORT, Integer.toString(ports[2]));
config.setProperty(GeneralPropertySet.PORT_OFFSET, "0");
config.setProperty(GeneralPropertySet.START_JVMARGS,
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=" + ports[3]);
String jvmArgs = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=" + ports[3];
if (SystemUtils.isJavaVersionAtLeast(900)) {
jvmArgs += " --add-opens java.base/java.lang.module=ALL-UNNAMED" +
" --add-opens java.base/jdk.internal.module=ALL-UNNAMED" +
" --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED" +
" --add-opens java.base/jdk.internal.misc=ALL-UNNAMED" +
" --add-opens java.base/jdk.internal.ref=ALL-UNNAMED" +
" --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED";
}
config.setProperty(GeneralPropertySet.START_JVMARGS, jvmArgs);
container.setConfiguration(config);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* specific code outside of the {@link GenericAppServerVersion}.
*/
public class GenericAppServerInstall extends ContainerInstall {
private static final String JETTY_VERSION = "9.4.8.v20171121";
private static final String JETTY_VERSION = "9.4.12.v20180830";

/**
* Get the version number, download URL, and container name of a generic app server using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1196,14 +1196,14 @@ lib/javax.transaction-api-1.2.jar
lib/jaxb-api-2.2.11.jar
lib/jaxb-core-2.2.11.jar
lib/jaxb-impl-2.2.11.jar
lib/jetty-http-9.4.8.v20171121.jar
lib/jetty-io-9.4.8.v20171121.jar
lib/jetty-security-9.4.8.v20171121.jar
lib/jetty-server-9.4.8.v20171121.jar
lib/jetty-servlet-9.4.8.v20171121.jar
lib/jetty-util-9.4.8.v20171121.jar
lib/jetty-webapp-9.4.8.v20171121.jar
lib/jetty-xml-9.4.8.v20171121.jar
lib/jetty-http-9.4.12.v20180830.jar
lib/jetty-io-9.4.12.v20180830.jar
lib/jetty-security-9.4.12.v20180830.jar
lib/jetty-server-9.4.12.v20180830.jar
lib/jetty-servlet-9.4.12.v20180830.jar
lib/jetty-util-9.4.12.v20180830.jar
lib/jetty-webapp-9.4.12.v20180830.jar
lib/jetty-xml-9.4.12.v20180830.jar
lib/jgroups-3.6.14.Final.jar
lib/jline-2.12.jar
lib/jna-4.1.0.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ javax.transaction-api-1.2.jar
jaxb-api-2.2.11.jar
jaxb-core-2.2.11.jar
jaxb-impl-2.2.11.jar
jetty-http-9.4.8.v20171121.jar
jetty-io-9.4.8.v20171121.jar
jetty-security-9.4.8.v20171121.jar
jetty-server-9.4.8.v20171121.jar
jetty-servlet-9.4.8.v20171121.jar
jetty-util-9.4.8.v20171121.jar
jetty-webapp-9.4.8.v20171121.jar
jetty-xml-9.4.8.v20171121.jar
jetty-http-9.4.12.v20180830.jar
jetty-io-9.4.12.v20180830.jar
jetty-security-9.4.12.v20180830.jar
jetty-server-9.4.12.v20180830.jar
jetty-servlet-9.4.12.v20180830.jar
jetty-util-9.4.12.v20180830.jar
jetty-webapp-9.4.12.v20180830.jar
jetty-xml-9.4.12.v20180830.jar
jgroups-3.6.14.Final.jar
jline-2.12.jar
jna-4.1.0.jar
Expand Down
2 changes: 1 addition & 1 deletion geode-core/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>9.4.8.v20171121</version>
<version>9.4.12.v20180830</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion gradle/dependency-versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ javax-activation.version = 1.1.1
javax-annotation.version = 1.3.2
# The jetty version is also hard-coded in geode-assembly:test
# at o.a.g.sessions.tests.GenericAppServerInstall.java
jetty.version = 9.4.8.v20171121
jetty.version = 9.4.12.v20180830
jgroups.version = 3.6.14.Final
jna.version = 4.1.0
jopt-simple.version = 5.0.4
Expand Down

0 comments on commit db716cc

Please sign in to comment.