From e04ef86a8d62b490d5234f0d43afa7ca68f419fa Mon Sep 17 00:00:00 2001 From: Dmitry Katsubo Date: Fri, 6 Mar 2015 12:28:08 +0100 Subject: [PATCH] Added test resources (issue #40). --- README.md | 2 +- .../unqualified/ObjectFactory.java | 40 ++++++++++++++ .../unqualified/RootElement.java | 52 +++++++++++++++++++ .../unqualified/package-info.java | 2 + 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 src/test/generated_resources/unqualified/ObjectFactory.java create mode 100644 src/test/generated_resources/unqualified/RootElement.java create mode 100644 src/test/generated_resources/unqualified/package-info.java diff --git a/README.md b/README.md index 0ad2d15..fad5259 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Note: `maven-jaxb2-plugin` prior to v0.8.0 was compiled against JAXB XJC API whi #### jaxb2-maven-plugin -Note: `jaxb2-maven-plugin` v1.5 was compiled against JAXB XJC API v2.1.13 which is not compatible with this plugin, thus additional dependency is needed to be added to **plugin classpath**. +Note: `jaxb2-maven-plugin` v1.5 was compiled against JAXB XJC API v2.1.13 which is not compatible with this plugin, thus additional dependency is needed to be added to **plugin classpath**. The same apples to v1.6 of the plugin. org.codehaus.mojo diff --git a/src/test/generated_resources/unqualified/ObjectFactory.java b/src/test/generated_resources/unqualified/ObjectFactory.java new file mode 100644 index 0000000..b4dd14f --- /dev/null +++ b/src/test/generated_resources/unqualified/ObjectFactory.java @@ -0,0 +1,40 @@ + +package unqualified; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the unqualified package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: unqualified + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link RootElement } + * + */ + public RootElement createRootElement() { + return new RootElement(); + } + +} diff --git a/src/test/generated_resources/unqualified/RootElement.java b/src/test/generated_resources/unqualified/RootElement.java new file mode 100644 index 0000000..408ee9d --- /dev/null +++ b/src/test/generated_resources/unqualified/RootElement.java @@ -0,0 +1,52 @@ + +package unqualified; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="stringList" type="{testNamespace}StringListType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "stringList" +}) +@XmlRootElement(name = "rootElement") +public class RootElement { + + @XmlElementWrapper(required = true) + @XmlElement(name = "listItem") + protected List stringList = new ArrayList(); + + public List getStringList() { + return stringList; + } + + public void setStringList(List stringList) { + this.stringList = stringList; + } + +} diff --git a/src/test/generated_resources/unqualified/package-info.java b/src/test/generated_resources/unqualified/package-info.java new file mode 100644 index 0000000..eb33bc9 --- /dev/null +++ b/src/test/generated_resources/unqualified/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "testNamespace") +package unqualified;