no plugin build script implementation
Current project demonstrates regular Gradle functionality usage -
payara-micro maven plugin similar gradle tasks implementation
(bundle
and start
)
install
apply(from: "https://raw.githubusercontent.com/daggerok/payara-micro-gradle-no-plugin/master/gradle/payara-micro.gradle")
defaultTasks("bundle")
usage
./gradlew start
# or
./gradlew bundle
ls ./build | grep "microbundle"
java -jar build/*-microbundle.jar
requirements: expected to be used for war packaged projects
apply(from: project.file("./gradle/payara-micro.gradle"))
defaultTasks("bundle")
usage (similar to payara-micrio maven plugin)
./gradlew bundle
./gradlew start
# or
java -jar build/*-microbundle.jar
install
project(":multi") {
apply(from: "https://raw.githubusercontent.com/daggerok/payara-micro-gradle-no-plugin/master/gradle/payara-micro.gradle")
defaultTasks("bundle")
// other configurations are skipped, but just in case:
apply(plugin: "io.franzbecker.gradle-lombok")
lombok {
version = "1.18.10"
}
dependencies {
providedCompile("javax:javaee-api:8.0.1")
}
}
usage
# not sure about it:
./gradlew start --parallel
# or (better):
./gradlew clean bundle
java -jar ./build/*-microbundle.jar &
java -jar ./multi/build/*-microbundle.jar &
build
./gradlew clean bundle
run (with remote debug for example)
./gradle start
# or debug:
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Djava.net.preferIPv4Stack=true ./build/*-microbundle.jar
test
http :8080 string=one
http :8080 string=two
http :8080 string=3
post new data
HTTP/1.1 202 Accepted
Content-Length: 0
Server: Payara Micro #badassfish
X-Frame-Options: SAMEORIGIN
verify
http :8080
HTTP/1.1 200 OK
Content-Length: 17
Content-Type: application/json
Server: Payara Micro #badassfish
X-Frame-Options: SAMEORIGIN
[
"two",
"one",
"3"
]
java 9+ problem solving
java --add-modules java.se \
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.nio=ALL-UNNAMED \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.management/sun.management=ALL-UNNAMED \
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED \
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED \
--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED \
-jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 \
-Djava.net.preferIPv4Stack=true \
./build/*-microbundle.jar