Skip to content

Setup for Manual Testing of the Starter

amyreit edited this page Jun 7, 2023 · 1 revision

Pre-req - maven must be installed on your machine (for example - brew install maven on mac-os)

  1. Run mvn liberty:dev

    This will do the following:

    • build the openliberty-starter-1.0-SNAPSHOT.war
    • download and unzip the wlp to start.openliberty.io/target/liberty directory,
    • create the defaultServer, copy the server.xml to start.openliberty.io/target/liberty/wlp/usr/servers/defaultServer directory,
    • copy the .war to the apps directory of the server and start the server (defaultServer)
  2. Visit https://localhost:9443/api/start/info to confirm the API is healthy

  3. To test the app-name.zip generated using maven, use the query params for ex. https://localhost:9443/api/start?a=app-name&b=maven&e=9.1&g=com.demo&j=8&m=5.0

  4. To test the app-name.zip generated using gradle, use the query params for ex. https://localhost:9443/api/start?a=app-name&b=gradle&e=9.1&g=com.demo&j=8&m=5.0


To test the downloaded app-name.zip

  1. Unzip the downloaded app-name.zip & cd to inside the app-name directory
  2. Add the PropertiesResource.java to src/main/java/com/demo/rest from this sample
  3. Run gradlew libertyDev or mvnw liberty:dev
  4. Check the splash page http://localhost:9080
  5. Go to http://localhost:9080/openapi/ui/
  6. Go to http://localhost:9080/app-name/api/properties
Clone this wiki locally