You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2008/07/21 18:36:14 UTC

svn commit: r678466 - in /cxf/trunk/distribution/src/main/release/samples/jms_queue: README.txt pom.xml

Author: seanoc
Date: Mon Jul 21 09:36:14 2008
New Revision: 678466

URL: http://svn.apache.org/viewvc?rev=678466&view=rev
Log:
Enabled demo to be built and run using maven.
Updated README

Added:
    cxf/trunk/distribution/src/main/release/samples/jms_queue/pom.xml
Modified:
    cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt

Modified: cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt?rev=678466&r1=678465&r2=678466&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/jms_queue/README.txt Mon Jul 21 09:36:14 2008
@@ -26,6 +26,10 @@
 javac, and java to build and run the demos, you must set the
 environment.
 
+
+Building and running the demo using ant
+---------------------------------------
+
 This demo requires ActiveMQ 5.0.0. Before you run this
 demo, please make sure you had installed the ActiveMQ 5.0.0 and
 set ACTIVEMQ_HOME and ACTIVEMQ_VERSION environment variables.
@@ -44,29 +48,6 @@
 For Windows:
 set ACTIVEMQ_VERSION=5.0.0
 
-
-
-Before you run this demo, please start up the JMS message broker first.
-
-From your ActiveMQ 5.0.0 installation launch ActiveMQ JMS broker in a
-separate window or in the background using the commandline:
-
-For Unix:
-
-cd <activemq.home.dir>/bin
-activemq
-
-For Windows:
-cd <activemq.home.dir>\bin
-activemq.bat
-
-The location of <activemq.home.dir> depends on whether you have installed the
-binary or source release.
-
-
-Building and running the demo using ant
----------------------------------------
-
 From the base directory of this sample (i.e., where this README file is
 located), the Ant build.xml file can be used to build and run the demo. 
 The server and client targets automatically build the demo.
@@ -82,6 +63,24 @@
 files, run "ant clean".
 
 
+Building and running the demo using maven
+---------------------------------------
+  
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo. 
+  
+Using either UNIX or Windows:
+
+    mvn install (this will build the demo)
+    In separate command windows/shells:
+    mvn -Pjms.broker
+    mvn -Pserver
+    mvn -Pclient
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
+
 Building the demo using wsdl2java and javac
 -------------------------------------------
 

Added: cxf/trunk/distribution/src/main/release/samples/jms_queue/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jms_queue/pom.xml?rev=678466&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jms_queue/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jms_queue/pom.xml Mon Jul 21 09:36:14 2008
@@ -0,0 +1,190 @@
+<?xml version="1.0"?>
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>jms_queue</artifactId>
+    <version>1.0</version>
+    <properties>
+        <cxf.version>[2,)</cxf.version>
+        <activemq.version>[5,)</activemq.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>LATEST</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/wsdl/jms_greeter.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>   
+    <profiles>
+        <profile>
+            <id>server</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.jms_greeter.server.Server</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.jms_greeter.client.Client</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/jms_greeter.wsdl</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>jms.broker</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.jms_greeter.broker.EmbeddedBroker</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>snapshots</id>
+            <repositories>
+                <repository>
+                    <id>apache-snapshots</id>
+                    <name>Apache SNAPSHOT Repository</name>
+                    <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                </repository>
+                    <!-- for jaxb-impl -->
+                <repository>
+                    <id>java.net</id>
+                    <url>http://download.java.net/maven/1/</url>
+                    <layout>legacy</layout>
+                </repository>
+            </repositories>
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>apache-plugin-snapshots</id>
+                    <name>Apache Maven Plugin Snapshots</name>
+                    <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+                    <releases>
+                        <enabled>false</enabled>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+    </profiles>
+    <repositories>
+        <!-- for jaxb-impl -->
+        <repository>
+            <id>java.net</id>
+            <url>http://download.java.net/maven/1/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <!-- Jetty is needed if you're using the CXFServlet -->
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-jms</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+            <version>${activemq.version}</version>
+        </dependency>
+    </dependencies>
+</project>