inline build script plugin 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-plugin-build-script/master/gradle/payara-micro-gradle-plugin.gradle'
defaultTasks 'clean', '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-plugin.gradle'))
defaultTasks('clean', 'bundle')
usage (similar to payara-micrio maven plugin)
./gradlew bundle
java -jar build/*-microbundle.jar
# or
./gradlew start
install
project(':multi') {
// other configurations are skipped...
apply(from: project.file('../gradle/payara-micro-gradle-plugin.gradle'))
dependencies {
providedCompile 'javax:javaee-api:8.0'
}
defaultTasks('clean', 'bundle')
}
usage
./gradlew start --parallel
# or:
./gradlew clean bundle
java -jar ./build/*-microbundle.jar &
java -jar ./nulti/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: post new data
http :8080 string=one
http :8080 string=two
http :8080 string=3
HTTP/1.1 202 Accepted
Content-Length: 0
Server: Payara Micro #badassfish
X-Frame-Options: SAMEORIGIN
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"
]