<version>0.1</version>\r
</parent>\r
<modelVersion>4.0.0</modelVersion>\r
- <groupId>org.collectionspace.services.hello</groupId>\r
+ <groupId>org.collectionspace.hello.services</groupId>\r
<artifactId>helloworld-client</artifactId>\r
<packaging>jar</packaging>\r
<version>0.1</version>\r
<name>Helloworld Client</name>\r
<dependencies>\r
<dependency>\r
- <groupId>org.collectionspace.services.hello</groupId>\r
+ <groupId>org.collectionspace.hello.services</groupId>\r
<artifactId>helloworld-jaxb</artifactId>\r
<version>0.1</version>\r
</dependency>\r
--- /dev/null
+package org.collectionspace.hello.client;
+
+import javax.ws.rs.core.Response;
+
+import org.collectionspace.hello.Identifier;
+import org.jboss.resteasy.client.ProxyFactory;
+import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
+import org.jboss.resteasy.client.ClientResponse;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+
+/**
+ * A IdentifierClient.
+
+ * @version $Revision:$
+ */
+public class IdentifierClient {
+
+ /**
+ *
+ */
+ private static final IdentifierClient instance = new IdentifierClient();
+ /**
+ *
+ */
+ private IdentifierProxy identifierProxy;
+
+ /**
+ *
+ * Create a new IdentifierClient.
+ *
+ */
+ private IdentifierClient() {
+ ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
+ RegisterBuiltin.register(factory);
+ identifierProxy = ProxyFactory.create(IdentifierProxy.class, "http://localhost:8080/helloworld/cspace");
+ }
+
+ /**
+ * FIXME Comment this
+ *
+ * @return
+ */
+ public static IdentifierClient getInstance() {
+ return instance;
+ }
+
+ /**
+ * @param id
+ * @return
+ * @see org.collectionspace.hello.client.IdentifierProxy#getIdentifier(java.lang.Long)
+ */
+ public ClientResponse<Identifier> getIdentifier(Long id) {
+ return identifierProxy.getIdentifier(id);
+ }
+
+ /**
+ * @param identifier
+ * @return
+ * @see org.collectionspace.hello.client.IdentifierProxy#createIdentifier(org.collectionspace.hello.client.entity.Identifier)
+ */
+ public ClientResponse<Response> createIdentifier(Identifier identifier) {
+ return identifierProxy.createIdentifier(identifier);
+ }
+}
--- /dev/null
+package org.collectionspace.hello.client;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.collectionspace.hello.Identifier;
+import org.jboss.resteasy.client.ClientResponse;
+
+/**
+ * @version $Revision:$
+ */
+@Path("/identifiers/")
+@Produces({"application/xml"})
+@Consumes({"application/xml"})
+public interface IdentifierProxy {
+
+ /**
+ * @param id
+ * @return
+ */
+ @GET
+ @Path("/{id}")
+ ClientResponse<Identifier> getIdentifier(@PathParam("id") Long id);
+
+ @POST
+ ClientResponse<Response> createIdentifier(Identifier so);
+}
\ No newline at end of file
import javax.ws.rs.core.Response;
+import org.collectionspace.hello.Person;
import org.jboss.resteasy.client.ProxyFactory;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.client.ClientResponse;
package org.collectionspace.hello.client;
import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
+import org.collectionspace.hello.Person;
import org.jboss.resteasy.client.ClientResponse;
/**
--- /dev/null
+package org.collectionspace.hello.client.test;
+
+import org.collectionspace.hello.client.*;
+import java.util.ArrayList;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import org.collectionspace.hello.Identifier;
+import org.jboss.resteasy.client.ClientResponse;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * A IdentifierServiceTest.
+ *
+ * @version $Revision:$
+ */
+public class IdentifierServiceTest {
+
+ private IdentifierClient identifierClient = IdentifierClient.getInstance();
+ private Long id = 0L;
+
+ @Test
+ public void createIdentifier() {
+ Identifier identifier = new Identifier();
+ identifier.setNamespace("org.bnhm");
+ ClientResponse<Response> res = identifierClient.createIdentifier(identifier);
+ Assert.assertEquals(res.getStatus(), Response.Status.CREATED.getStatusCode());
+ id = extractId(res);
+ }
+
+ @Test(dependsOnMethods = {"createIdentifier"})
+ public void getIdentifier() {
+ Identifier i = identifierClient.getIdentifier(id).getEntity();
+ verbose("received with get", i);
+ }
+
+ private Long extractId(ClientResponse<Response> res) {
+ MultivaluedMap mvm = res.getMetadata();
+ String uri = (String) ((ArrayList) mvm.get("Location")).get(0);
+ String[] segments = uri.split("/");
+ System.out.println("id=" + segments[segments.length - 1]);
+ return Long.valueOf(segments[segments.length - 1]);
+ }
+
+ private void verbose(String msg, Identifier p) {
+ try {
+ System.out.println(msg);
+ JAXBContext jc = JAXBContext.newInstance(Identifier.class);
+ Marshaller m = jc.createMarshaller();
+ m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
+ Boolean.TRUE);
+ m.marshal(p, System.out);
+ //m.marshal(new JAXBElement(new QName("uri", "local"), Identifier.class, p), System.out);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
-package org.collectionspace.hello.client;
+package org.collectionspace.hello.client.test;
import java.util.ArrayList;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-import org.collectionspace.hello.client.*;
+import org.collectionspace.hello.Person;
+import org.collectionspace.hello.client.PersonClient;
import org.jboss.resteasy.client.ClientResponse;
import org.testng.Assert;
import org.testng.annotations.Test;
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
Boolean.TRUE);
- m.marshal(new JAXBElement(new QName("uri", "local"), Person.class, p), System.out);
+ m.marshal(p, System.out);
+ //m.marshal(new JAXBElement(new QName("uri", "local"), Person.class, p), System.out);
} catch (Exception e) {
e.printStackTrace();
}
<?xml version="1.0" encoding="UTF-8"?>
<project>
- <parent>
- <artifactId>helloworld</artifactId>
- <groupId>org.collectionspace.hello.services</groupId>
- <version>0.1</version>
- </parent>
+ <parent>
+ <artifactId>helloworld</artifactId>
+ <groupId>org.collectionspace.hello.services</groupId>
+ <version>0.1</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.collectionspace.services.hello</groupId>
+ <groupId>org.collectionspace.hello.services</groupId>
<artifactId>helloworld-jaxb</artifactId>
- <name>Helloworld Client JAXB</name>
<version>0.1</version>
+ <name>Helloworld Client JAXB</name>
<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://collectionspace.org/hello"
+ xmlns="http://collectionspace.org/hello"
+ targetNamespace="http://collectionspace.org/hello"
+ version="0.1"
+>
+
+<!-- avoid XmlRootElement nightnmare, see http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html-->
+ <xs:element name="person">
+ <xs:complexType>
+
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="lastName" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="street" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="city" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="state" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="zip" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="country" type="xs:string"
+ minOccurs="1" />
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:long" />
+ <xs:attribute name="version" type="xs:int" />
+
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="identifier">
+ <xs:complexType>
+
+ <xs:sequence>
+ <xs:element name="namespace" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="value" type="xs:string"
+ minOccurs="0" />
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:long" />
+ <xs:attribute name="version" type="xs:int" />
+
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema version="1.0"
- xmlns:re="http://www.collectionspace.org/services/hello"
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- <xs:element name="person" type="person" />
-
- <xs:complexType name="person">
-
- <xs:sequence>
- <xs:element name="firstName" type="xs:string"
- minOccurs="1" />
- <xs:element name="lastName" type="xs:string"
- minOccurs="1" />
- <xs:element name="street" type="xs:string"
- minOccurs="1" />
- <xs:element name="city" type="xs:string"
- minOccurs="1" />
- <xs:element name="state" type="xs:string"
- minOccurs="1" />
- <xs:element name="zip" type="xs:string"
- minOccurs="1" />
- <xs:element name="country" type="xs:string"
- minOccurs="1" />
- </xs:sequence>
- <xs:attribute name="id" type="xs:long" />
- <xs:attribute name="version" type="xs:int" />
-
- </xs:complexType>
-
-</xs:schema>
-
<goal>clean</goal>\r
<goal>install</goal>\r
</goals>\r
+ <properties>\r
+ <maven.test.skip>true</maven.test.skip>\r
+ </properties>\r
</action>\r
<action>\r
<actionName>run</actionName>\r
<version>0.1</version>\r
</parent>\r
<modelVersion>4.0.0</modelVersion>\r
- <groupId>org.collectionspace.prototype</groupId>\r
+ <groupId>org.collectionspace.hello.services</groupId>\r
<artifactId>helloworld-service</artifactId>\r
<packaging>war</packaging>\r
<version>0.1</version>\r
</repositories>\r
\r
<dependencies>\r
+ <dependency>\r
+ <groupId>org.collectionspace.hello.services</groupId>\r
+ <artifactId>helloworld-jaxb</artifactId>\r
+ <version>0.1</version>\r
+ </dependency>\r
<dependency>\r
<groupId>org.jboss.resteasy</groupId>\r
<artifactId>resteasy-jaxrs</artifactId>\r
<groupId>org.apache.maven.plugins</groupId>\r
<artifactId>maven-surefire-plugin</artifactId>\r
<configuration>\r
- <skip>true</skip>\r
</configuration>\r
<executions>\r
<execution>\r
+++ /dev/null
-package org.collectionspace.hello.entity;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.Unmarshaller.Listener;
-import javax.xml.bind.annotation.XmlElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "person", propOrder = {
- "firstName",
- "lastName",
- "street",
- "city",
- "state",
- "zip",
- "country"
-})
-public class Person extends Listener {
-
- @XmlAttribute
- private int id;
- @XmlAttribute
- private int version = 1;
- private String firstName;
- private String lastName;
- private String street;
- private String city;
- private String state;
- private String zip;
- private String country;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @return the version
- */
- public int getVersion() {
- return version;
- }
-
- /**
- * @param version the version to set
- */
- public void setVersion(int version) {
- this.version = version;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
- }
-
- public String getCity() {
- return city;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getZip() {
- return zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
- public String getCountry() {
- return country;
- }
-
- public void setCountry(String country) {
- this.country = country;
- }
-
- /**
- * JAXB Callback method used to reassociate the item with the owning contact.
- * JAXB doesn't seem to read this method from a super class and it must
- * therefore be placed on any subclass.
- *
- * @param unmarshaller the JAXB {@link Unmarshaller}.
- * @param parent the owning {@link Contact} instance.
- */
- public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
- super.afterUnmarshal(unmarshaller, parent);
- }
-}
import java.util.Set;
public class HelloworldApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> empty = new HashSet<Class<?>>();
- public HelloworldApplication() {
- singletons.add(new PersonResource());
- }
+ private Set<Object> singletons = new HashSet<Object>();
+ private Set<Class<?>> empty = new HashSet<Class<?>>();
- @Override
- public Set<Class<?>> getClasses() {
- return empty;
- }
+ public HelloworldApplication() {
+ singletons.add(new PersonResource());
+ singletons.add(new IdentifierResource());
+ }
- @Override
- public Set<Object> getSingletons() {
- return singletons;
- }
+ @Override
+ public Set<Class<?>> getClasses() {
+ return empty;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ return singletons;
+ }
}
--- /dev/null
+package org.collectionspace.hello.services;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+import javax.ws.rs.core.UriBuilder;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import org.collectionspace.hello.Identifier;
+
+@Path("/identifiers")
+@Consumes("application/xml")
+@Produces("application/xml")
+public class IdentifierResource {
+
+ private Map<Long, Identifier> idDB = new ConcurrentHashMap<Long, Identifier>();
+ private AtomicLong idCounter = new AtomicLong();
+
+ public IdentifierResource() {
+ }
+
+ @POST
+ public Response createIdentifier(Identifier id) {
+ if (id.getNamespace() == null) {
+ id.setNamespace("edu.berkeley");
+ }
+ id.setId(idCounter.incrementAndGet());
+ id.setVersion(1);
+ UUID uuid = UUID.nameUUIDFromBytes(id.getNamespace().getBytes());
+ id.setValue(uuid.toString());
+ idDB.put(id.getId(), id);
+ verbose("create Id", id);
+ UriBuilder path = UriBuilder.fromResource(IdentifierResource.class);
+ path.path("" + id.getId());
+ Response response = Response.created(path.build()).build();
+ return response;
+ }
+
+ @GET
+ @Path("{id}")
+ public Identifier getId(@PathParam("id") Long id) {
+ Identifier i = idDB.get(id);
+ if (i == null) {
+ Response response = Response.status(Response.Status.NOT_FOUND).entity(
+ "The requested ID was not found.").type("text/plain").build();
+ throw new WebApplicationException(response);
+ }
+ verbose("get Id", i);
+ return i;
+ }
+
+ private void verbose(String msg, Identifier id) {
+ try {
+ System.out.println(msg);
+ JAXBContext jc = JAXBContext.newInstance(Identifier.class);
+ Marshaller m = jc.createMarshaller();
+ m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
+ Boolean.TRUE);
+ m.marshal(id, System.out);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
package org.collectionspace.hello.services;
-import org.collectionspace.hello.entity.Person;
-
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.core.Response;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
import javax.ws.rs.core.UriBuilder;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
+import javax.xml.namespace.QName;
+import org.collectionspace.hello.Person;
@Path("/persons")
@Consumes("application/xml")
@Produces("application/xml")
public class PersonResource {
- private Map<Integer, Person> personDB = new ConcurrentHashMap<Integer, Person>();
- private AtomicInteger idCounter = new AtomicInteger();
+ private Map<Long, Person> personDB = new ConcurrentHashMap<Long, Person>();
+ private AtomicLong idCounter = new AtomicLong();
public PersonResource() {
}
@GET
@Path("{id}")
- public Person getPerson(@PathParam("id") int id) {
+ public Person getPerson(@PathParam("id") Long id) {
Person p = personDB.get(id);
if (p == null) {
Response response = Response.status(Response.Status.NOT_FOUND).entity(
@PUT
@Path("{id}")
- public Person updatePerson(@PathParam("id") int id, Person update) {
+ public Person updatePerson(@PathParam("id") Long id, Person update) {
Person current = personDB.get(id);
if (current == null) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
- verbose("received person", update);
+ verbose("update input", update);
//todo: intelligent merge needed
current.setFirstName(update.getFirstName());
current.setLastName(update.getLastName());
current.setZip(update.getZip());
current.setCountry(update.getCountry());
current.setVersion(current.getVersion() + 1);
- verbose("updated person", current);
+ verbose("update output", current);
return current;
}
--- /dev/null
+package org.collectionspace.hello.test;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * @version $Revision: 1 $
+ */
+public class IdentifierResourceTest {
+
+ @Test
+ public void testIdentifierResource() throws Exception {
+ System.out.println("*** Create a new Identifier ***");
+ // Create a new object
+ String newIdentifier = "<ns2:identifier xmlns:ns2=\"http://collectionspace.org/hello\">" +
+ "<namespace>edu.stanford</namespace>" +
+ "</ns2:identifier>";
+
+ URL postUrl = new URL("http://localhost:8080/helloworld/cspace/identifiers");
+ HttpURLConnection connection = (HttpURLConnection) postUrl.openConnection();
+ connection.setDoOutput(true);
+ connection.setInstanceFollowRedirects(false);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", "application/xml");
+ OutputStream os = connection.getOutputStream();
+ os.write(newIdentifier.getBytes());
+ os.flush();
+ Assert.assertEquals(HttpURLConnection.HTTP_CREATED, connection.getResponseCode());
+ String createdUrl = connection.getHeaderField("Location");
+ System.out.println("Location: " + createdUrl);
+ connection.disconnect();
+
+
+ // Get the new object
+ System.out.println("*** GET Created Identifier **");
+ URL getUrl = new URL(createdUrl);
+ connection = (HttpURLConnection) getUrl.openConnection();
+ connection.setRequestMethod("GET");
+ System.out.println("Content-Type: " + connection.getContentType());
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+
+ String line = reader.readLine();
+ while (line != null) {
+ System.out.println(line);
+ line = reader.readLine();
+ }
+ Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
+ connection.disconnect();
+
+ connection.disconnect();
+ }
+}
/**
- * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class PersonResourceTest
{
System.out.println("*** Create a new Person ***");
// Create a new object
- String newPerson = "<person>"
+ String newPerson = "<ns2:person xmlns:ns2=\"http://collectionspace.org/hello\">"
+ "<firstName>John</firstName>"
+ "<lastName>Doe</lastName>"
+ "<street>2195 Hearst Ave</street>"
+ "<state>CA</state>"
+ "<zip>94504</zip>"
+ "<country>USA</country>"
- + "</person>";
+ + "</ns2:person>";
URL postUrl = new URL("http://localhost:8080/helloworld/cspace/persons");
HttpURLConnection connection = (HttpURLConnection) postUrl.openConnection();
Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
connection.disconnect();
- String updatePerson = "<person>"
+ String updatePerson = "<ns2:person xmlns:ns2=\"http://collectionspace.org/hello\">"
+ "<firstName>Jane</firstName>"
+ "<lastName>Doe</lastName>"
+ "<street>1 University Ave</street>"
+ "<state>CA</state>"
+ "<zip>94504</zip>"
+ "<country>USA</country>"
- + "</person>";
+ + "</ns2:person>";
connection = (HttpURLConnection) getUrl.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("PUT");
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.collectionspace.hello.services</groupId>
- <version>0.1</version>
- <artifactId>helloworld</artifactId>
- <packaging>pom</packaging>
- <name>HelloWorld</name>
- <modules>
- <module>HelloWorldService</module>
- <module>HelloWorldJaxb</module>
- <module>HelloWorldClient</module>
- </modules>
- <repositories>
- <repository>
- <id>jboss</id>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>sun</id>
- <url>http://download.java.net/maven/2</url>
- </repository>
- <repository>
- <id>java.net</id>
- <name>java.net Maven Repository</name>
- <url>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.collectionspace.hello.services</groupId>
+ <version>0.1</version>
+ <artifactId>helloworld</artifactId>
+ <packaging>pom</packaging>
+ <name>HelloWorld</name>
+ <modules>
+ <module>HelloWorldJaxb</module>
+ <module>HelloWorldService</module>
+ <module>HelloWorldClient</module>
+ </modules>
+ <repositories>
+ <repository>
+ <id>jboss</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>sun</id>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ <repository>
+ <id>java.net</id>
+ <name>java.net Maven Repository</name>
+ <url>
https://maven-repository.dev.java.net/nonav/repository
- </url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Maven 2 Repository</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- </repositories>
- <pluginRepositories>
+ </url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Maven 2 Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
- <pluginRepository>
- <id>java.net</id>
- <name>java.net Maven Repository</name>
- <url>
+ <pluginRepository>
+ <id>java.net</id>
+ <name>java.net Maven Repository</name>
+ <url>
https://maven-repository.dev.java.net/nonav/repository
- </url>
- <layout>legacy</layout>
- </pluginRepository>
- <pluginRepository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Maven 2 Repository</name>
- <url>http://download.java.net/maven/2</url>
- </pluginRepository>
- </pluginRepositories>
+ </url>
+ <layout>legacy</layout>
+ </pluginRepository>
+ <pluginRepository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Maven 2 Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </pluginRepository>
+ </pluginRepositories>
- <build>
- <pluginManagement>
- <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>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <unzipCommand>
+ <build>
+ <pluginManagement>
+ <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>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <unzipCommand>
/usr/bin/unzip -o > err.txt
- </unzipCommand>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.0.1</version>
- <configuration>
+ </unzipCommand>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
- <warSourceExcludes>
+ <warSourceExcludes>
WEB-INF/lib/*.jar
- </warSourceExcludes>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
+ </warSourceExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jvnet.jaxb2.maven2</groupId>
- <artifactId>maven-jaxb2-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <args>
- <arg>-XtoString</arg>
- <arg>-Xinject-listener-code</arg>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jvnet.jaxb2.maven2</groupId>
+ <artifactId>maven-jaxb2-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <args>
+ <arg>-XtoString</arg>
+ <arg>-Xinject-listener-code</arg>
<!-- <arg>-Xcollection-setter-injector</arg>
<arg>-Xfluent-api</arg> -->
- </args>
- <plugins>
- <plugin>
- <groupId>
+ </args>
+ <plugins>
+ <plugin>
+ <groupId>
org.jvnet.jaxb2_commons
- </groupId>
- <artifactId>basic</artifactId>
- <version>0.4.1</version>
- </plugin>
- <plugin>
- <groupId>
+ </groupId>
+ <artifactId>basic</artifactId>
+ <version>0.4.1</version>
+ </plugin>
+ <plugin>
+ <groupId>
org.jvnet.jaxb2-commons
- </groupId>
- <artifactId>
+ </groupId>
+ <artifactId>
property-listener-injector
- </artifactId>
- <version>1.0</version>
- </plugin>
+ </artifactId>
+ <version>1.0</version>
+ </plugin>
<!--
<plugin>
<groupId>
<version>2.0.1</version>
</plugin>
-->
- </plugins>
- <generatePackage>
- org.collectionspace.hello.client
- </generatePackage>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>net.java.dev.jaxb2-commons</groupId>
- <artifactId>jaxb-fluent-api</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.6</version>
- <scope>test</scope>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>jaxrs-api</artifactId>
- <version>1.0.2.GA</version>
- </dependency>
- <dependency>
- <groupId>net.java.dev.jaxb2-commons</groupId>
- <artifactId>jaxb-fluent-api</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.jvnet.jaxb2-commons</groupId>
- <artifactId>property-listener-injector</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.jvnet.jaxb2_commons</groupId>
- <artifactId>runtime</artifactId>
- <version>0.4.1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxrs</artifactId>
- <version>1.0.2.GA</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.1.7</version>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.6</version>
- <scope>test</scope>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.5.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.2</version>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.jgoodies</groupId>
- <artifactId>binding</artifactId>
- <version>2.0.2</version>
- </dependency>
- <dependency>
- <groupId>com.jgoodies</groupId>
- <artifactId>forms</artifactId>
- <version>1.2.0</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ </plugins>
+ <generatePackage>
+ org.collectionspace.hello
+ </generatePackage>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>net.java.dev.jaxb2-commons</groupId>
+ <artifactId>jaxb-fluent-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.6</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>jaxrs-api</artifactId>
+ <version>1.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.jaxb2-commons</groupId>
+ <artifactId>jaxb-fluent-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2-commons</groupId>
+ <artifactId>property-listener-injector</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>runtime</artifactId>
+ <version>0.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <version>1.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.6</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.jgoodies</groupId>
+ <artifactId>binding</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jgoodies</groupId>
+ <artifactId>forms</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
</project>