Friday, October 26, 2018

JBoss Thorntail

https://thorntail.io/

https://thorntail.io/generator/


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.dave</groupId>
  <artifactId>demo-thorntail</artifactId>
  <name>Thorntail Example</name>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>war</packaging>

  <properties>
    <version.thorntail>2.2.0.Final</version.thorntail>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <failOnMissingWebXml>false</failOnMissingWebXml>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.thorntail</groupId>
        <artifactId>bom-all</artifactId>
        <version>${version.thorntail}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <finalName>demo</finalName>
    <plugins>
      <plugin>
        <groupId>io.thorntail</groupId>
        <artifactId>thorntail-maven-plugin</artifactId>
        <version>${version.thorntail}</version>

        <executions>
          <execution>
            <goals>
              <goal>package</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>

    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>jaxrs</artifactId>
    </dependency><dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>jpa</artifactId>
    </dependency>
  </dependencies>
</project>


HelloWorldEndpoin.java

package com.dave.demothorntail.rest;


import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;


@Path("/hello")
public class HelloWorldEndpoint {

        @GET
        @Produces("text/plain")
        public Response doGet() {
                return Response.ok("Hello from Thorntail!").build();
        }
}



RestApplication

package com.dave.demothorntail.rest;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/")
public class RestApplication extends Application {

}




mvn install

mvn thorntail:run



[INFO] Starting .war
Fri Oct 26 16:40:36 CEST 2018 INFO [org.wildfly.swarm.bootstrap] (main) Dependencies not bundled; resolving from M2REPO.
2018-10-26 16:40:42,986 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                   JAX-RS - STABLE          io.thorntail:jaxrs:2.2.0.Final
2018-10-26 16:40:42,997 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                  Logging - STABLE          io.thorntail:logging:2.2.0.Final
2018-10-26 16:40:42,997 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                 Undertow - STABLE          io.thorntail:undertow:2.2.0.Final
2018-10-26 16:40:42,999 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                  Elytron - STABLE          io.thorntail:elytron:2.2.0.Final
2018-10-26 16:40:43,000 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                      JPA - STABLE          io.thorntail:jpa:2.2.0.Final
2018-10-26 16:40:43,000 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:              Datasources - STABLE          io.thorntail:datasources:2.2.0.Final
2018-10-26 16:40:43,001 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                      JCA - STABLE          io.thorntail:jca:2.2.0.Final
2018-10-26 16:40:43,001 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:             Transactions - STABLE          io.thorntail:transactions:2.2.0.Final
2018-10-26 16:40:46,101 WARN  [org.wildfly.swarm.datasources] (main) THORN1005: Not creating a default datasource due to lack of JDBC driver
2018-10-26 16:40:47,061 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1
2018-10-26 16:40:47,304 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: Thorntail 2.2.0.Final (WildFly Core 3.0.8.Final) starting
2018-10-26 16:40:47,554 INFO  [org.wildfly.swarm] (MSC service thread 1-1) THORN0019: Install MSC service for command line args: []
2018-10-26 16:40:50,300 INFO  [org.wildfly.security] (ServerService Thread Pool -- 12) ELY00001: WildFly Elytron version 1.1.6.Final
2018-10-26 16:40:50,374 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 16) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
2018-10-26 16:40:50,375 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 15) WFLYRS0016: RESTEasy version 3.0.24.Final
2018-10-26 16:40:50,388 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 23) WFLYNAM0001: Activating Naming Subsystem
2018-10-26 16:40:50,454 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 20) WFLYSEC0002: Activating Security Subsystem
2018-10-26 16:40:50,459 INFO  [org.xnio] (ServerService Thread Pool -- 24) XNIO version 3.5.4.Final
2018-10-26 16:40:50,754 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0003: Undertow 1.4.18.Final starting
2018-10-26 16:40:50,792 INFO  [org.xnio.nio] (ServerService Thread Pool -- 24) XNIO NIO Implementation Version 3.5.4.Final
2018-10-26 16:40:50,804 INFO  [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=5.0.2.Final
2018-10-26 16:40:50,988 INFO  [org.jboss.as.connector] (MSC service thread 1-3) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.6.Final)
2018-10-26 16:40:51,511 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 24) WFLYIO001: Worker 'default' has auto-configured to 4 core threads with 32 task threads based on your 2 available processors
2018-10-26 16:40:51,583 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0012: Started server default-server.
2018-10-26 16:40:51,610 INFO  [org.jboss.as.naming] (MSC service thread 1-4) WFLYNAM0003: Starting Naming Service
2018-10-26 16:40:51,691 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8080
2018-10-26 16:40:52,282 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
2018-10-26 16:40:52,285 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Thorntail 2.2.0.Final (WildFly Core 3.0.8.Final) started in 5331ms - Started 143 of 161 services (32 services are lazy, passive or on-demand)
2018-10-26 16:40:52,789 INFO  [org.wildfly.swarm.runtime.deployer] (main) deploying demo.war
2018-10-26 16:40:52,839 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "demo.war" (runtime-name: "demo.war")
2018-10-26 16:40:53,364 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.demo.war" is using a private module ("org.jboss.jts") which may be changed or removed in future versions without notice.
2018-10-26 16:40:53,364 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.demo.war" is using a private module ("org.jboss.ironjacamar.jdbcadapters") which may be changed or removed in future versions without notice.
2018-10-26 16:40:53,365 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.demo.war" is using a private module ("org.jboss.jts") which may be changed or removed in future versions without notice.
2018-10-26 16:40:53,365 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.demo.war" is using a private module ("org.jboss.ironjacamar.jdbcadapters") which may be changed or removed in future versions without notice.
2018-10-26 16:40:53,645 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0018: Host default-host starting
2018-10-26 16:40:54,005 INFO  [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 12) RESTEASY002225: Deploying javax.ws.rs.core.Application: class com.dave.demothorntail.rest.RestApplication
2018-10-26 16:40:54,036 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 12) WFLYUT0021: Registered web context: '/' for server 'default-server'
2018-10-26 16:40:54,200 INFO  [org.jboss.as.server] (main) WFLYSRV0010: Deployed "demo.war" (runtime-name : "demo.war")
2018-10-26 16:40:54,216 INFO  [org.wildfly.swarm] (main) THORN99999: Thorntail is Ready




Check the project

http://localhost:8080/hello

Using Docker containers to develop microservices



Adam Bien - Thin WARs, Java EE 7, Docker and Productivity
https://www.youtube.com/watch?v=5N4EUDhrkec

Adam Bien - samples
https://github.com/AdamBien/docklands


OpenLiberty MicroService Docker guide
https://openliberty.io/guides/docker.html

GitHub repo https://github.com/OpenLiberty/guide-docker

  mvn clean install


[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/guide-docker/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "dropins".
[INFO] Installing assembly...
[INFO] Expanding: /home/centos/.m2/io/openliberty/openliberty-runtime/18.0.0.3/openliberty-runtime-18.0.0.3.zip into /git/guide-docker/finish/target/liberty
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:create-server (create-server) @ rest ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/guide-docker/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "dropins".
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO] CWWKM2143I: Server defaultServer does not exist. Now creating...
[INFO] CWWKM2001I: server.config.dir is /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: server.output.dir is /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: Invoke command is [/git/guide-docker/finish/target/liberty/wlp/bin/server, create, defaultServer].
[INFO] Server defaultServer created.
[INFO] CWWKM2129I: Server defaultServer has been created at /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Copying 1 file to /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/guide-docker/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO]
[INFO] --- maven-war-plugin:3.2.2:war (default-war) @ rest ---
[INFO] Packaging webapp
[INFO] Assembling webapp [rest] in [/git/guide-docker/finish/target/rest-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/git/guide-docker/finish/src/main/webapp]
[INFO] Webapp assembled in [47 msecs]
[INFO] Building war: /git/guide-docker/finish/target/rest-1.0-SNAPSHOT.war
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:install-apps (install-app) @ rest ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/guide-docker/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Copying 1 file to /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/guide-docker/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2160I: Installing application /git/guide-docker/finish/target/rest-1.0-SNAPSHOT.war.
[INFO] Copying 1 file to /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer/apps
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:test-start-server (start-server) @ rest ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/guide-docker/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO] Copying 1 file to /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/guide-docker/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2001I: server.config.dir is /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: server.output.dir is /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: Invoke command is [/git/guide-docker/finish/target/liberty/wlp/bin/server, start, defaultServer].
[INFO] Starting server defaultServer.
[INFO] Server defaultServer started with process ID 20700.
[INFO] Waiting up to 30 seconds for server confirmation:  CWWKF0011I to be found in /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer/logs/messages.log
[INFO] CWWKM2010I: Searching for CWWKF0011I in /git/guide-docker/finish/target/liberty/wlp/usr/servers/defaultServer/logs/messages.log. This search will timeout after 30 seconds.
[INFO] CWWKM2015I: Match number: 1 is [10/26/18 13:21:13:991 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The server defaultServer is ready to run a smarter planet..



 yum install docker

sudo systemctl start docker
 
Configure Docker proxy 
 https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

docker build -t ol-runtime .


docker build -t ol-runtime .
Sending build context to Docker daemon 150.5 MB
Step 1/4 : FROM open-liberty
Trying to pull repository docker.io/library/open-liberty ...
latest: Pulling from docker.io/library/open-liberty
18d680d61657: Pull complete
0addb6fece63: Pull complete
78e58219b215: Pull complete
eb6959a66df2: Pull complete
d28276d78514: Pull complete
f4b7f9cac3ff: Pull complete
cca6875781ba: Pull complete
19927b6c1502: Pull complete
e7b4b52f440a: Pull complete
b756387f6847: Pull complete
Digest: sha256:ed0252357b07d199c18fa67eac13a563cef9d052c856f7050727775bf2dc3e2b
Status: Downloaded newer image for docker.io/open-liberty:latest
 ---> 2408c7bfb52d
Step 2/4 : RUN ln -s /opt/ol/wlp/usr/servers /servers
 ---> Running in ee3238c49602

 ---> b99f07819d6b
Removing intermediate container ee3238c49602
Step 3/4 : ENTRYPOINT /opt/ol/wlp/bin/server run
 ---> Running in eb0103bfe0a0
 ---> 5be83f0c9bcd
Removing intermediate container eb0103bfe0a0
Step 4/4 : CMD defaultServer
 ---> Running in 79167390de6a
 ---> 026f9cdf87b7
Removing intermediate container 79167390de6a
Successfully built 026f9cdf87b7


Run container

$ docker run -d --name rest-app -p 9080:9080 -p 9443:9443 -v /git/guide-maven-intro/finish/target/liberty/wlp/usr/servers:/servers ol-runtime
6177bbf6b6626c4004878910f97bf2581d7f16cc4aca46550685e65b06a1771b



 docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES
6177bbf6b662        ol-runtime          "/opt/ol/wlp/bin/s..."   54 seconds ago      Exited (23) 52 seconds ago                       rest-app



Thursday, October 25, 2018

Getting started with Microprofile


MicroProfile

https://microprofile.io/

https://openliberty.io/docs/ref/microprofile/1.3/

List of microprofile implementations
https://wiki.eclipse.org/MicroProfile/Implementation

Payara 


https://blog.payara.fish/building-your-next-microservice-with-eclipse-microprofile

https://github.com/OndrejM/getting-started-microprofile

OpenLiberty

https://www.phillip-kruger.com/post/fatjars_thinwars_and_why_openliberty_is_cool/

OpenLiberty guides
https://openliberty.io/guides/

Install OpenLiberty via Maven
https://openliberty.io/blog/2018/07/27/installing-features-from-maven-dependencies.html

http://www.adam-bien.com/roller/abien/entry/microprofile_java_ee_8_thinner

http://javaeemicro.services/


Thorntail ( previously JBoss  Wildfly Swarm)


https://thorntail.io/

https://developers.redhat.com/blog/2017/08/24/the-skinny-on-fat-thin-hollow-and-uber/


https://developers.redhat.com/blog/2018/08/23/eclipse-microprofile-and-red-hat-update-thorntail-and-smallrye/


Sample project

Start application HOWTO
 https://openliberty.io/guides/maven-intro.html


Compile the project

mvn install

jar tvf target/ServletSample-1.0-SNAPSHOT.war
    97 Thu Oct 25 11:12:26 CEST 2018 META-INF/MANIFEST.MF
     0 Thu Oct 25 11:12:26 CEST 2018 META-INF/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/classes/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/classes/io/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/classes/io/openliberty/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/classes/io/openliberty/guides/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/classes/io/openliberty/guides/hello/
     0 Thu Oct 25 11:12:26 CEST 2018 WEB-INF/lib/
   431 Thu Oct 25 11:08:56 CEST 2018 WEB-INF/web.xml
1047863 Thu Oct 25 11:11:42 CEST 2018 WEB-INF/lib/jaxb-impl-2.2.11.jar
  1222 Thu Oct 25 11:11:44 CEST 2018 WEB-INF/classes/io/openliberty/guides/hello/HelloServlet.class
   575 Thu Oct 25 11:08:56 CEST 2018 index.html
  6330 Thu Oct 25 11:08:56 CEST 2018 META-INF/maven/io.openliberty.guides/ServletSample/pom.xml
   107 Thu Oct 25 11:12:26 CEST 2018 META-INF/maven/io.openliberty.guides/ServletSample/pom.properties
102244 Thu Oct 25 11:11:42 CEST 2018 WEB-INF/lib/jaxb-api-2.2.11.jar
 69409 Thu Oct 25 11:11:42 CEST 2018 WEB-INF/lib/activation-1.1.1.jar
252336 Thu Oct 25 11:11:42 CEST 2018 WEB-INF/lib/jaxb-core-2.2.11.jar


Maven build log

mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ServletSample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ServletSample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /git/openliberty-maven-intro/finish/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ServletSample ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ServletSample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /git/openliberty-maven-intro/finish/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ ServletSample ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ServletSample ---
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:install-server (create-server) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "apps".
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:create-server (create-server) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "apps".
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO] Copying 1 file to /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/openliberty-maven-intro/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO]
[INFO] --- maven-war-plugin:3.2.2:war (default-war) @ ServletSample ---
[INFO] Packaging webapp
[INFO] Assembling webapp [ServletSample] in [/git/openliberty-maven-intro/finish/target/ServletSample-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/git/openliberty-maven-intro/finish/src/main/webapp]
[INFO] Webapp assembled in [47 msecs]
[INFO] Building war: /git/openliberty-maven-intro/finish/target/ServletSample-1.0-SNAPSHOT.war
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:install-apps (install-apps) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] Copying 1 file to /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/openliberty-maven-intro/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "apps".
[INFO] CWWKM2160I: Installing application ServletSample.war.xml.
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:package-server (package-server) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO] CWWKM2134I: Packaging server ServletSampleServer.
[INFO] Copying 1 file to /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/openliberty-maven-intro/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2136I: Package file location is /git/openliberty-maven-intro/finish/target/ServletSample.zip.
[INFO] CWWKM2001I: server.config.dir is /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2001I: server.output.dir is /git/openliberty-maven-intro/finish/target/wlp-package/ServletSampleServer.
[INFO] CWWKM2001I: Invoke command is [/git/openliberty-maven-intro/finish/target/liberty/wlp/bin/server, package, ServletSampleServer, --archive=/git/openliberty-maven-intro/finish/target/ServletSample.zip, --include=usr].
[INFO] Packaging server ServletSampleServer.
[INFO] Server ServletSampleServer package complete in /git/openliberty-maven-intro/finish/target/ServletSample.zip.
[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:test-start-server (test-start-server) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2112I: Re-using previously installed assembly.
[INFO] Copying 1 file to /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /git/openliberty-maven-intro/finish/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration.
[INFO] CWWKM2001I: server.config.dir is /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2001I: server.output.dir is /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2001I: Invoke command is [/git/openliberty-maven-intro/finish/target/liberty/wlp/bin/server, start, ServletSampleServer].
[INFO] Server ServletSampleServer is already running with process ID 28763.
[INFO] Waiting up to 30 seconds for server confirmation:  CWWKF0011I to be found in /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer/logs/messages.log
[INFO] CWWKM2010I: Searching for CWWKF0011I in /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer/logs/messages.log. This search will timeout after 30 seconds.
[INFO] CWWKM2015I: Match number: 1 is [10/25/18 11:13:40:556 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The server ServletSampleServer is ready to run a smarter planet..
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:integration-test (default) @ ServletSample ---


Tests 

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running io.openliberty.guides.hello.it.EndpointIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.373 sec - in io.openliberty.guides.hello.it.EndpointIT

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- liberty-maven-plugin:2.6.1:test-stop-server (test-stop-server) @ ServletSample ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-runtime:null:RELEASE:zip.
[INFO] CWWKM2102I: Using installDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : ServletSampleServer.
[INFO] CWWKM2102I: Using serverDirectory : /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2152I: Stopping server ServletSampleServer.
[INFO] CWWKM2001I: server.config.dir is /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2001I: server.output.dir is /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer.
[INFO] CWWKM2001I: Invoke command is [/git/openliberty-maven-intro/finish/target/liberty/wlp/bin/server, stop, ServletSampleServer].
[INFO] Stopping server ServletSampleServer.
[INFO] Server ServletSampleServer stopped.
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ ServletSample ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ ServletSample ---
[INFO] Installing /git/openliberty-maven-intro/finish/target/ServletSample-1.0-SNAPSHOT.war to /home/centos/.m2/io/openliberty/guides/ServletSample/1.0-SNAPSHOT/ServletSample-1.0-SNAPSHOT.war
[INFO] Installing /git/openliberty-maven-intro/finish/pom.xml to /home/centos/.m2/io/openliberty/guides/ServletSample/1.0-SNAPSHOT/ServletSample-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


Run server

mvn liberty:start-server

Server log

tail -500f ./target/liberty/wlp/usr/servers/ServletSampleServer/logs/messages.log
********************************************************************************
product = Open Liberty 18.0.0.3 (wlp-1.0.22.cl180320180905-2337)
wlp.install.dir = /git/openliberty-maven-intro/finish/target/liberty/wlp/
java.home = /usr/java/jdk1.8.0_144/jre
java.version = 1.8.0_144
java.runtime = Java(TM) SE Runtime Environment (1.8.0_144-b01)
os = Linux (3.10.0-693.21.1.el7.x86_64; amd64) (en_US)
process = 28763@ip-10-112-45-153.eu-central-1.compute.internal
********************************************************************************
[10/25/18 11:13:37:833 CEST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           A CWWKE0001I: The server ServletSampleServer has been launched.
[10/25/18 11:13:38:923 CEST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           I CWWKE0002I: The kernel started after 1.322 seconds
[10/25/18 11:13:38:962 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0007I: Feature update started.
[10/25/18 11:13:39:643 CEST] 00000011 com.ibm.ws.app.manager.internal.monitor.DropinMonitor        A CWWKZ0058I: Monitoring dropins for applications.
[10/25/18 11:13:39:652 CEST] 0000001c com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host *  (IPv6) port 9080.
[10/25/18 11:13:39:853 CEST] 00000021 com.ibm.ws.app.manager.AppMessageHelper                      I CWWKZ0018I: Starting application ServletSample.
[10/25/18 11:13:39:932 CEST] 00000021 m.ibm.ws.container.service.app.deploy.ManifestClassPathUtils W SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file file:/home/centos/.m2/com/sun/xml/bind/jaxb-core/2.2.11/jaxb-core-2.2.11.jar or its parent.
[10/25/18 11:13:39:944 CEST] 00000021 m.ibm.ws.container.service.app.deploy.ManifestClassPathUtils W SRVE9967W: The manifest class path jaxb-core.jar can not be found in jar file file:/home/centos/.m2/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar or its parent.
[10/25/18 11:13:40:106 CEST] 00000021 m.ibm.ws.container.service.app.deploy.ManifestClassPathUtils W SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file file:/home/centos/.m2/com/sun/xml/bind/jaxb-core/2.2.11/jaxb-core-2.2.11.jar or its parent.
[10/25/18 11:13:40:109 CEST] 00000021 m.ibm.ws.container.service.app.deploy.ManifestClassPathUtils W SRVE9967W: The manifest class path jaxb-core.jar can not be found in jar file file:/home/centos/.m2/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar or its parent.
[10/25/18 11:13:40:484 CEST] 00000021 com.ibm.ws.session.WASSessionCore                            I SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
[10/25/18 11:13:40:506 CEST] 00000021 com.ibm.ws.webcontainer.osgi.webapp.WebGroup                 I SRVE0169I: Loading Web Module: Hello Servlet.
[10/25/18 11:13:40:508 CEST] 00000021 com.ibm.ws.webcontainer                                      I SRVE0250I: Web Module Hello Servlet has been bound to default_host.
[10/25/18 11:13:40:510 CEST] 00000021 com.ibm.ws.http.internal.VirtualHostImpl                     A CWWKT0016I: Web application available (default_host): http://rdfadm:9080/ServletSample/
[10/25/18 11:13:40:514 CEST] 00000021 com.ibm.ws.app.manager.AppMessageHelper                      A CWWKZ0001I: Application ServletSample started in 0.661 seconds.
[10/25/18 11:13:40:555 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0012I: The server installed the following features: [servlet-3.1].
[10/25/18 11:13:40:556 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0008I: Feature update completed in 1.633 seconds.
[10/25/18 11:13:40:556 CEST] 00000019 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The server ServletSampleServer is ready to run a smarter planet.
[10/25/18 11:13:40:566 CEST] 00000025 com.ibm.ws.session.WASSessionCore                            I SESN0176I: A new session context will be created for application key default_host/ServletSample
[10/25/18 11:13:40:582 CEST] 00000025 com.ibm.ws.util                                              I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[10/25/18 11:13:40:803 CEST] 00000021 com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator          I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at /git/openliberty-maven-intro/finish/target/liberty/wlp/usr/servers/ServletSampleServer/logs/state/plugin-cfg.xml.