Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flow-devloop-daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,16 @@ process:

```
JAVA_HOME=<the JDK Jvm chose>
JDK_HOME=<the same JDK>
mvnw -B -ntp -nsu [-f <root>/pom.xml -pl :<app> -am] -Dmaven.test.skip=true
org.wildfly.plugins:wildfly-maven-plugin:<version>:run
-Dwildfly.javaOpts="<agents, opens, -XX:...> <settings the app reads>"
```

`JDK_HOME` is there because a plugin can read it before `JAVA_HOME`: Payara
Server's does, so a `JDK_HOME` the daemon inherited would otherwise start the
server on another JDK, which may refuse the loop's flags.

Every one of them deploys the packaged WAR rather than the module's own
output, so one has to exist. WildFly's goal declares `@Execute(phase = PACKAGE)`
and forks the packaging itself, which is why the command above names no phase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public Invocation invocation(Launch.Project project, List<String> jvmFlags,
// JetBrains Runtime that Jvm chose is the one the application runs on -
// and with it, enhanced class redefinition.
environment.put("JAVA_HOME", launch.appJvm().home().toString());
// The same for JDK_HOME, which a forked server's plugin can read
// before JAVA_HOME. Payara Server's does, so an inherited JDK_HOME -
// a CI agent sets one to its own Java 8 - started the server on that
// JDK, which refused the loop's --add-opens and never started.
environment.put("JDK_HOME", launch.appJvm().home().toString());
// And first on the PATH, for the forked servers: a plugin that is given
// no java of its own runs the first one it finds there, whatever
// JAVA_HOME says. Payara Micro's does, and on Linux that was a JDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ void invocation_forkedServerInAReactor_packsTheFlagsIntoItsParameter()
.startsWith(launch.appJvm().home().resolve("bin")
+ File.pathSeparator),
invocation.environment().get("PATH"));
// Payara Server's plugin reads JDK_HOME before JAVA_HOME, so an
// inherited one must not pick another JDK.
assertEquals(launch.appJvm().home().toString(),
invocation.environment().get("JDK_HOME"));
assertFalse(Files.exists(launch.reactor().app().classesDir()
.resolve("hotswap-agent.properties")));
}
Expand Down
Loading