Skip to content

daggerok/payara-micro-gradle-plugin-build-script

Repository files navigation

payara-micro-gradle-plugin (inline build script) Build Status

inline build script plugin implementation

Current project demonstrates regular Gradle functionality usage - payara-micro maven plugin similar gradle tasks implementation (bundle and start)

remote

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

local

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

multi-project setup

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, run and test

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"
]

About

Payara micro Gradle build-script plugin

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages