diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c5fbe8f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM openliberty/open-liberty:kernel-java11-openj9-ubi + +COPY --chown=1001:0 src/main/liberty/config/server.xml /config/server.xml +COPY --chown=1001:0 src/main/liberty/config/server.xml /config/server.env +COPY --chown=1001:0 target/io.openliberty.sample.daytrader8.war /config/apps/ + +#Derby +COPY --chown=1001:0 target/liberty/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar /opt/ol/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar +COPY --chown=1001:0 target/liberty/wlp/usr/shared/resources/data /opt/ol/wlp/usr/shared/resources/data + +RUN configure.sh diff --git a/README.md b/README.md index ea440f4..595a96d 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ git clone git@github.com:OpenLiberty/sample.daytrader8.git From inside the sample.daytrader8 directory, build and start the application in Open Liberty with the following command: ``` -mvn clean package liberty:run-server +mvn clean package liberty:run ``` -The server will listen on port 9080 by default. You can change the port (for example, to port 9081) by adding `mvn clean package liberty:run-server -DtestServerHttpPort=9081` to the end of the Maven command. +The server will listen on port 9080 by default. You can change the port (for example, to port 9081) by adding `mvn clean package liberty:run -DtestServerHttpPort=9081` to the end of the Maven command. Once the server is started, you should be able to access the application at: http://localhost:9080/daytrader diff --git a/pom.xml b/pom.xml index c86b1f3..cd63184 100644 --- a/pom.xml +++ b/pom.xml @@ -1,134 +1,104 @@ + - 4.0.0 - - io.openliberty.samples - io.openliberty.sample.daytrader8 - 1.0-SNAPSHOT - war - - - net.wasdev.wlp.maven.parent - liberty-maven-app-parent - 2.6.1 - - - - + 4.0.0 + io.openliberty.samples + io.openliberty.sample.daytrader8 + 1.0-SNAPSHOT + war + UTF-8 UTF-8 1.8 1.8 - LibertyProject + + 10.14.2.0 + ${user.home}/.m2/repository/org/apache/derby/derby + 9080 9443 - ${project.build.directory}/${app.name}.zip - usr - false - - - + + - javax - javaee-api - 8.0 - provided + javax + javaee-api + 8.0 + provided - taglibs - standard - 1.1.1 - compile + taglibs + standard + 1.1.1 + compile - javax.xml.bind - jaxb-api - 2.3.0 - provided + javax.xml.bind + jaxb-api + 2.3.0 + provided - - - - ${project.artifactId} - - - org.apache.maven.plugins - maven-dependency-plugin - 3.0.0 - - - copy-derby - package - - copy - + + + org.apache.derby + derby + ${version.derby} + test + + + + ${project.artifactId} + + + + io.openliberty.tools + liberty-maven-plugin + 3.3-M4 - - - org.apache.derby - derby - 10.13.1.1 - ${project.build.directory}/liberty/wlp/usr/shared/resources/DerbyLibs - - + + ${testServerHttpPort} + ${testServerHttpsPort} + - - - - - maven-resources-plugin - 2.6 - - - copy-resources - package - - copy-resources - - - ${project.build.directory}/liberty/wlp/usr/shared/resources/data - - - resources/data - false - - - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.6 - - false - pom.xml - - - - - net.wasdev.wlp.maven.plugins - liberty-maven-plugin - 2.0 - - - io.openliberty - openliberty-runtime - RELEASE - zip - - sampleAppServer - src/main/liberty/config/server.xml - src/main/liberty/config/server.env - ${package.file} - ${packaging.type} - - ${testServerHttpPort} - ${testServerHttpsPort} - - - - - - + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.2 + + + copy-derby-dependency + package + + copy-dependencies + + + derby + ${project.build.directory}/liberty/wlp/usr/shared/resources/DerbyLibs/ + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + package + + copy-resources + + + ${project.build.directory}/liberty/wlp/usr/shared/resources/data + + + resources/data + false + + + + + + + + diff --git a/src/main/liberty/config/server.xml b/src/main/liberty/config/server.xml index 51cfc3f..c951cac 100644 --- a/src/main/liberty/config/server.xml +++ b/src/main/liberty/config/server.xml @@ -1,75 +1,79 @@ + - - ejb-3.2 - servlet-4.0 - jsf-2.3 - jpa-2.2 - mdb-3.2 - wasJmsServer-1.0 - wasJmsClient-2.0 - cdi-2.0 - websocket-1.1 - concurrent-1.0 - jsonp-1.1 - jsonb-1.0 - beanValidation-2.0 - jaxrs-2.1 - ssl-1.0 - - - + + ejb-3.2 + servlet-4.0 + jsf-2.3 + jpa-2.2 + mdb-3.2 + wasJmsServer-1.0 + wasJmsClient-2.0 + cdi-2.0 + websocket-1.1 + concurrent-1.0 + jsonp-1.1 + jsonb-1.0 + beanValidation-2.0 + jaxrs-2.1 + ssl-1.0 + - + - - - - - + - + - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file