diff --git a/apache-cxf/cxf-introduction/pom.xml b/apache-cxf/cxf-introduction/pom.xml index e28039c1af..27a2978956 100644 --- a/apache-cxf/cxf-introduction/pom.xml +++ b/apache-cxf/cxf-introduction/pom.xml @@ -10,9 +10,28 @@ 0.0.1-SNAPSHOT - true 3.1.6 + + + + org.codehaus.mojo + exec-maven-plugin + + com.baeldung.cxf.introduction.Server + + + + maven-surefire-plugin + 2.19.1 + + + **/StudentTest.java + + + + + org.apache.cxf @@ -25,29 +44,4 @@ ${cxf.version} - - - server - - test - - - org.codehaus.mojo - exec-maven-plugin - - - test - - java - - - com.baeldung.cxf.introduction.Server - - - - - - - - \ No newline at end of file diff --git a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Server.java b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Server.java index 58caa9087e..0e5af60b9d 100644 --- a/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Server.java +++ b/apache-cxf/cxf-introduction/src/main/java/com/baeldung/cxf/introduction/Server.java @@ -3,15 +3,11 @@ package com.baeldung.cxf.introduction; import javax.xml.ws.Endpoint; public class Server { - private Server() { + public static void main(String args[]) throws InterruptedException { BaeldungImpl implementor = new BaeldungImpl(); String address = "http://localhost:8080/baeldung"; Endpoint.publish(address, implementor); - } - - public static void main(String args[]) throws InterruptedException { - new Server(); - System.out.println("Server ready"); + System.out.println("Server ready..."); Thread.sleep(60 * 1000); System.out.println("Server exiting"); System.exit(0); diff --git a/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java b/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java index 68bc4aa5e8..e1e5b60ec3 100644 --- a/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java +++ b/apache-cxf/cxf-introduction/src/test/java/com/baeldung/cxf/introduction/StudentTest.java @@ -21,7 +21,7 @@ public class StudentTest { private Service service; private Baeldung baeldungProxy; - private Baeldung baeldungImpl; + private BaeldungImpl baeldungImpl; { service = Service.create(SERVICE_NAME);