Skip to content

Commit

Permalink
add zkWedriverBaseResource property
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Sep 23, 2022
1 parent 131c020 commit 99533a0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ test {
}
```

### How to specify Webapp Base Resource in System Property
For example in Gradle,
```gradle
test {
systemProperty "zkWebdriverBaseResource", "./test/webapp/"
}
```
Note: the default value is `"./src/main/webapp/"`

### How to specify a fix Jetty Port in System Property
For example in Gradle,
```gradle
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dependencies {
api "org.apache.commons:commons-lang3:$commonsLang3Version"
api "org.eclipse.jetty:jetty-server:$jettyVersion"
api "org.eclipse.jetty:jetty-webapp:$jettyVersion"
api "com.google.guava:guava:31.0.1-jre" // override com.palantir.docker.compose using old version fails on maven project

optionalImplementation "org.zkoss.common:zcommon:${zkVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# from puppeteer v15.5.0 Chromium 105.0.5173.0 (r1022525)
#
# same as Chrome version
version=1.0.0
version=1.0.2

# dependencies
junitVersion=5.8.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public static void init() throws Exception {

final WebAppContext context = new WebAppContext();
context.setContextPath(getContextPath());
context.setBaseResource(Resource.newResource("./src/main/webapp/"));
context.setBaseResource(Resource.newResource(System.getProperty("zkWebdriverBaseResource", "./src/main/webapp/")));
context.getSessionHandler().setSessionIdPathParameterName(null);
server.setHandler(new HandlerList(context, new DefaultHandler()));
initServer(server);
Expand Down

0 comments on commit 99533a0

Please sign in to comment.