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/24 13:07:16 UTC
svn commit: r679355 - in
/cxf/trunk/distribution/src/main/release/samples/jax_rs: basic/README.txt
basic/pom.xml content_negotiation/README.txt content_negotiation/pom.xml
Author: seanoc
Date: Thu Jul 24 04:07:15 2008
New Revision: 679355
URL: http://svn.apache.org/viewvc?rev=679355&view=rev
Log:
Enable demos to be built and run using maven.
Updated READMEs accordingly.
Added:
cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/pom.xml
cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/pom.xml
Modified:
cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/README.txt
cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/README.txt
Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/README.txt?rev=679355&r1=679354&r2=679355&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/README.txt Thu Jul 24 04:07:15 2008
@@ -81,7 +81,25 @@
files, run "ant clean".
-Building the demo using wsdl2java and javac
+
+Building and running the demo using maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo.
+
+
+Using either UNIX or Windows:
+
+ mvn install
+ mvn -Pserver (from one command line window)
+ mvn -Pclient (from a second command line window)
+
+
+To remove the target dir, run mvn clean".
+
+
+Building the demo using javac
-------------------------------------------
From the base directory of this sample (i.e., where this README file is
Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/pom.xml?rev=679355&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/basic/pom.xml Thu Jul 24 04:07:15 2008
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>jax_rs_basic</artifactId>
+ <version>1.0</version>
+ <properties>
+ <cxf.version>[2,)</cxf.version>
+ <httpclient.version>3.1</httpclient.version>
+ <jsr311.version>0.8</jsr311.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>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copyxmlfiles</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/src/demo/jaxrs/client/add_customer.txt" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+ <copy file="${basedir}/src/demo/jaxrs/client/update_customer.txt" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+ </tasks>
+ </configuration>
+ </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.jaxrs.server.Server</mainClass>
+ </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.jaxrs.client.Client</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-frontend-jaxrs</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>${jsr311.version}</version>
+ </dependency>
+ </dependencies>
+</project>
Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/README.txt?rev=679355&r1=679354&r2=679355&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/README.txt Thu Jul 24 04:07:15 2008
@@ -59,11 +59,27 @@
ant client (from a second command line window)
-To remove the code generated from the WSDL file and the .class
-files, run "ant clean".
+To remove the .class 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 maven pom.xml file can be used to build and run the demo.
+
+
+Using either UNIX or Windows:
+
+ mvn install
+ mvn -Pserver (from one command line window)
+ mvn -Pclient (from a second command line window)
+
+
+To remove the target dir, run mvn clean".
-Building the demo using wsdl2java and javac
+Building the demo using javac
-------------------------------------------
From the base directory of this sample (i.e., where this README file is
Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/pom.xml?rev=679355&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/content_negotiation/pom.xml Thu Jul 24 04:07:15 2008
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>jax_rs_content_negotiation</artifactId>
+ <version>1.0</version>
+ <properties>
+ <cxf.version>[2,)</cxf.version>
+ <httpclient.version>3.1</httpclient.version>
+ <jsr311.version>0.8</jsr311.version>
+ </properties>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </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.jaxrs.server.Server</mainClass>
+ </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.jaxrs.client.Client</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-frontend-jaxrs</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>${jsr311.version}</version>
+ </dependency>
+ </dependencies>
+</project>