cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1198145 - in /cxf/trunk/distribution/src/main/release/samples/java_first_jaxws: README.txt pom.xml wsdl/
Date Sun, 06 Nov 2011 07:07:30 GMT
Author: gmazza
Date: Sun Nov  6 07:07:30 2011
New Revision: 1198145

URL: http://svn.apache.org/viewvc?rev=1198145&view=rev
Log:
Provided WAR deployment option for intro java-first sample

Removed:
    cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/wsdl/
Modified:
    cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt
    cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/pom.xml

Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt?rev=1198145&r1=1198144&r2=1198145&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt Sun Nov  6
07:07:30 2011
@@ -10,8 +10,8 @@ located), the pom.xml file is used to bu
 
 Using either UNIX or Windows:
 
-  mvn install   (builds the demo)
-  mvn -Pserver  (from one command line window)
+  mvn clean install   (builds the demo and creates a WAR file for optional Tomcat deployment)
+  mvn -Pserver  (from one command line window -- only if using a non-WAR standalone service)
   mvn -Pclient  (from a second command line window)
 
 
@@ -19,3 +19,23 @@ To remove the code generated from the WS
 files, run "mvn clean".
 
 
+Alternative: WAR deployment of service in a servlet container (e.g. Tomcat)
+---------------------------------------------------------------------------
+
+1.) Update the endpointAddress value in the client.Client class to the WAR-hosted 
+value. The endpointAddress value will be installation-specific, but could be 
+"http://localhost:8080/java_first_jaxws-{CXF Version}/services/hello_world" 
+for a default local installation of Tomcat.  Replace {CXF Version} with the
+CXF version declared in the parent POM -- for example, "2.5.1", "2.5.1-SNAPSHOT", 
+etc.
+
+2.) Manually copy the generated WAR file to the Tomcat webapps folder, or, if you
+have Maven and Tomcat set up to use the Tomcat Maven Plugin 
+(http://mojo.codehaus.org/tomcat-maven-plugin/) you can use the mvn tomcat:redeploy
+command instead.  Important: if you're using this command and deploying on Tomcat 6
+instead of Tomcat 7, update the tomcat-maven-plugin configuration in the pom.xml,
+switching to the the Tomcat 6-specific "url" element.
+
+Prior to running the client (mvn -Pclient) good to confirm the generated WSDL 
+can be seen from a web browser at: 
+http://{server}:{port}/java_first_jaxws-{CXF Version}/services/hello_world?wsdl

Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/pom.xml?rev=1198145&r1=1198144&r2=1198145&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/pom.xml Sun Nov  6 07:07:30
2011
@@ -16,10 +16,12 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>org.apache.cxf.samples</groupId>
     <artifactId>java_first_jaxws</artifactId>
+    <packaging>war</packaging>
     <name>Java First demo using JAX-WS APIs</name>
     <description>Java First demo using JAX-WS APIs</description>
     <version>2.5.1-SNAPSHOT</version>
@@ -31,6 +33,7 @@
     </parent>
     <properties>
         <cxf.version>${project.version}</cxf.version>
+        <cxf.release.base>${basedir}/../..</cxf.release.base>
     </properties>
     <build>
         <plugins>
@@ -41,6 +44,26 @@
                     <target>1.5</target>
                 </configuration>
             </plugin>
+                <plugin>
+                    <artifactId>maven-war-plugin</artifactId>
+                    <version>2.1</version>
+                    <configuration>
+                        <webXml>${cxf.release.base}/etc/web.xml</webXml>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>tomcat-maven-plugin</artifactId>
+                    <version>1.1</version>
+                    <configuration>
+                        <server>myTomcat</server>
+                        <!-- if using Tomcat 6 (see README) -->
+                        <!--url>http://localhost:8080/manager</url-->
+                        <!-- if using Tomcat 7 (see README) -->
+                        <url>http://localhost:8080/manager/text</url>
+                        <path>/${project.build.finalName}</path>
+                    </configuration>
+                </plugin>
         </plugins>
     </build>
     <profiles>
@@ -66,6 +89,13 @@
                     </plugin>
                 </plugins>
             </build>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.cxf</groupId>
+                    <artifactId>cxf-rt-transports-http-jetty</artifactId>
+                    <version>2.5.1-SNAPSHOT</version>
+                </dependency>
+            </dependencies>
         </profile>
         <profile>
             <id>client</id>
@@ -102,10 +132,5 @@
             <artifactId>cxf-rt-transports-http</artifactId>
             <version>2.5.1-SNAPSHOT</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http-jetty</artifactId>
-            <version>2.5.1-SNAPSHOT</version>
-        </dependency>
     </dependencies>
 </project>



Mime
View raw message