From 1c1495299ff272aa8eb1e55803dcf3f6eb45dda1 Mon Sep 17 00:00:00 2001 From: Thai Nguyen Date: Tue, 12 Jul 2016 08:13:43 +0700 Subject: [PATCH 1/3] Refactors code for Introduction to Apache CXF --- apache-cxf/cxf-introduction/pom.xml | 37 ++++++------------- .../com/baeldung/cxf/introduction/Server.java | 8 +--- .../cxf/introduction/StudentTest.java | 2 +- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/apache-cxf/cxf-introduction/pom.xml b/apache-cxf/cxf-introduction/pom.xml index e28039c1af..b25ef4db03 100644 --- a/apache-cxf/cxf-introduction/pom.xml +++ b/apache-cxf/cxf-introduction/pom.xml @@ -10,9 +10,19 @@ 0.0.1-SNAPSHOT - true 3.1.6 + + + + org.codehaus.mojo + exec-maven-plugin + + com.baeldung.cxf.introduction.Server + + + + org.apache.cxf @@ -25,29 +35,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); From 351b4a53972545cbb4390ede1e64c2139cafd24c Mon Sep 17 00:00:00 2001 From: Thai Nguyen Date: Wed, 13 Jul 2016 07:39:31 +0700 Subject: [PATCH 2/3] Updates POM to skip a test. --- apache-cxf/cxf-introduction/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apache-cxf/cxf-introduction/pom.xml b/apache-cxf/cxf-introduction/pom.xml index b25ef4db03..27a2978956 100644 --- a/apache-cxf/cxf-introduction/pom.xml +++ b/apache-cxf/cxf-introduction/pom.xml @@ -21,6 +21,15 @@ com.baeldung.cxf.introduction.Server + + maven-surefire-plugin + 2.19.1 + + + **/StudentTest.java + + + From b9f5dda9c262d127589270012dc5a8245deb202c Mon Sep 17 00:00:00 2001 From: Zeger Hendrikse Date: Wed, 13 Jul 2016 09:46:16 +0200 Subject: [PATCH 3/3] Replaced tabs with spaces --- apache-cxf/pom.xml | 78 +++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/apache-cxf/pom.xml b/apache-cxf/pom.xml index 7732490576..41ae75a1de 100644 --- a/apache-cxf/pom.xml +++ b/apache-cxf/pom.xml @@ -1,40 +1,40 @@ - 4.0.0 - com.baeldung - apache-cxf - 0.0.1-SNAPSHOT - pom - - cxf-introduction - - - - junit - junit - 4.12 - test - - - - install - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - org.codehaus.mojo - exec-maven-plugin - 1.5.0 - - - - - \ No newline at end of file + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + com.baeldung + apache-cxf + 0.0.1-SNAPSHOT + pom + + cxf-introduction + + + + junit + junit + 4.12 + test + + + + install + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + + +