Migrating Airline sample to maven
This commit is contained in:
16
samples/airline/client/pom.xml
Normal file
16
samples/airline/client/pom.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>airline</artifactId>
|
||||
<groupId>org.springframework.ws</groupId>
|
||||
<version>2.0.0-M1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>airline-client</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring WS Airline Sample - Clients</name>
|
||||
<modules>
|
||||
<module>saaj</module>
|
||||
</modules>
|
||||
</project>
|
||||
72
samples/airline/client/saaj/pom.xml
Normal file
72
samples/airline/client/saaj/pom.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>airline-client</artifactId>
|
||||
<groupId>org.springframework.ws</groupId>
|
||||
<version>2.0.0-M1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>airline-saaj-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring WS Airline Sample - SAAJ Client</name>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>jdk15</id>
|
||||
<activation>
|
||||
<jdk>!1.6</jdk>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.xml.soap</groupId>
|
||||
<artifactId>saaj-api</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.messaging.saaj</groupId>
|
||||
<artifactId>saaj-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.org.apache.xml.security</groupId>
|
||||
<artifactId>xmlsec</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>java.net</id>
|
||||
<name>Java.net Repository for Maven2</name>
|
||||
<url>http://download.java.net/maven/1/</url>
|
||||
<layout>legacy</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<mainClass>org.springframework.ws.samples.airline.client.saaj.GetFlights</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.wss</groupId>
|
||||
<artifactId>xws-security</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -117,7 +117,7 @@ public class GetFlights {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String url = "http://localhost:8080/airline/services";
|
||||
String url = "http://localhost:8080/airline-server/services";
|
||||
if (args.length > 0) {
|
||||
url = args[0];
|
||||
}
|
||||
@@ -128,17 +128,13 @@ public class GetFrequentFlyerMileage {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String url = "http://localhost:8080/airline/services";
|
||||
if (args.length < 2) {
|
||||
System.err.println(
|
||||
"Usage: java org.springframework.ws.samples.airline.client.saaj.GetFrequentFlyerMileage " +
|
||||
"username password [url]");
|
||||
}
|
||||
String username = args[0];
|
||||
String password = args[1];
|
||||
if (args.length > 2) {
|
||||
url = args[2];
|
||||
if (!System.getProperty("java.version").startsWith("1.5")) {
|
||||
System.out.println("This sample will only run under JDK 1.5");
|
||||
return;
|
||||
}
|
||||
String url = "http://localhost:8080/airline-server/services";
|
||||
String username = "john";
|
||||
String password = "changeme";
|
||||
GetFrequentFlyerMileage getMileage = new GetFrequentFlyerMileage(url);
|
||||
getMileage.getMileage(username, password);
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>spring-ws-samples</artifactId>
|
||||
<artifactId>airline</artifactId>
|
||||
<groupId>org.springframework.ws</groupId>
|
||||
<version>2.0.0-M1-SNAPSHOT</version>
|
||||
<relativePath>../samples/pom.xml</relativePath>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>airline</artifactId>
|
||||
<artifactId>airline-server</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Spring WS Airline Sample</name>
|
||||
<name>Spring WS Airline Sample - Server</name>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>jdk15</id>
|
||||
@@ -56,90 +56,43 @@
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>java.net</id>
|
||||
<name>Java.net Repository for Maven2</name>
|
||||
<url>http://download.java.net/maven/1/</url>
|
||||
<layout>legacy</layout>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-ext</id>
|
||||
<name>Spring External Dependencies Repository</name>
|
||||
<url>https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<stylesheetfile>${basedir}/../../src/main/javadoc/javadoc.css</stylesheetfile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>java.net</id>
|
||||
<name>Java.net Repository for Maven2</name>
|
||||
<url>http://download.java.net/maven/1/</url>
|
||||
<layout>legacy</layout>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.properties</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.sun.tools.xjc.maven2</groupId>
|
||||
<artifactId>maven-jaxb-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
<goal>xjc</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<generatePackage>org.springframework.ws.samples.airline.schema</generatePackage>
|
||||
<schemaDirectory>src/main/webapp/</schemaDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</executions>
|
||||
<configuration>
|
||||
<schemaDirectory>src/main/webapp/</schemaDirectory>
|
||||
<packageName>org.springframework.ws.samples.airline.schema</packageName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>openjpa-maven-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<includes>org/springframework/ws/samples/airline/domain/*.class</includes>
|
||||
<excludes>org/springframework/ws/samples/airline/domain/ServiceClass.class</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enhancer</id>
|
||||
<phase>process-classes</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<java classname="org.apache.openjpa.enhance.PCEnhancer" classpathref="maven.runtime.classpath" dir="target/classes" fork="true" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
<goal>enhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -246,13 +199,8 @@
|
||||
<!-- O/R Mapping dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-lib</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence-jdbc</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
@@ -318,12 +266,6 @@
|
||||
<artifactId>XmlSchema</artifactId>
|
||||
</dependency>
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-core</artifactId>
|
||||
@@ -45,10 +45,12 @@ public class DateTimeValueHandler extends AbstractValueHandler {
|
||||
return new Column[]{col};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object toDataStoreValue(ValueMapping valueMapping, Object val, JDBCStore jdbcStore) {
|
||||
return val == null ? null : new Timestamp(((DateTime) val).getMillis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object toObjectValue(ValueMapping valueMapping, Object val) {
|
||||
return val == null ? null : new DateTime(val);
|
||||
}
|
||||
@@ -39,10 +39,12 @@ public class LocalDateValueHandler extends AbstractValueHandler {
|
||||
return new Column[]{col};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object toDataStoreValue(ValueMapping valueMapping, Object val, JDBCStore jdbcStore) {
|
||||
return val == null ? null : new Date(((LocalDate) val).toDateMidnight().getMillis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object toObjectValue(ValueMapping valueMapping, Object val) {
|
||||
return val == null ? null : new LocalDate(val);
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
jdbc.driverClassName=${jdbc.driverClassName}
|
||||
jdbc.username=${jdbc.username}
|
||||
jdbc.password=${jdbc.password}
|
||||
jdbc.url=${jdbc.url}
|
||||
Reference in New Issue
Block a user