You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2018/10/11 23:11:02 UTC

svn commit: r1843611 - in /webservices/axiom/trunk: ./ apidocs/ aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/ aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/ axiom-all/ axiom-api/src/main/java/org/apache/axiom/om/ axi...

Author: veithen
Date: Thu Oct 11 23:11:01 2018
New Revision: 1843611

URL: http://svn.apache.org/viewvc?rev=1843611&view=rev
Log:
Resurrect axiom-jaxb because Java 11 removed JAXB from the JRE again.

Added:
    webservices/axiom/trunk/axiom-jaxb/   (props changed)
      - copied from r1748019, webservices/axiom/trunk/axiom-jaxb/
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/ds/jaxb/
      - copied from r1843610, webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/ds/jaxb/
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/AttachmentUnmarshallerImpl.java
      - copied, changed from r1843610, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/AttachmentUnmarshallerImpl.java
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/UnmarshallerConfigurator.java
      - copied, changed from r1843610, webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/UnmarshallerConfigurator.java
Removed:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/UnmarshallerConfigurator.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/ds/jaxb/
    webservices/axiom/trunk/axiom-compat/src/main/java/org/apache/axiom/om/util/jaxb/
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/util/
    webservices/axiom/trunk/axiom-jaxb/src/test/
Modified:
    webservices/axiom/trunk/apidocs/pom.xml
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
    webservices/axiom/trunk/axiom-all/pom.xml
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java
    webservices/axiom/trunk/axiom-jaxb/pom.xml
    webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/JAXBUtils.java
    webservices/axiom/trunk/code-coverage/pom.xml
    webservices/axiom/trunk/distribution/pom.xml
    webservices/axiom/trunk/pom.xml
    webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md
    webservices/axiom/trunk/systests/osgi-tests/pom.xml
    webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/FactoryTest.java
    webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java
    webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/SJSXPTest.java
    webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/JAXBCustomBuilder.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java

Modified: webservices/axiom/trunk/apidocs/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/apidocs/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/apidocs/pom.xml (original)
+++ webservices/axiom/trunk/apidocs/pom.xml Thu Oct 11 23:11:01 2018
@@ -41,6 +41,11 @@
             <artifactId>axiom-api</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <!-- These are artifacts that are optional/provided dependencies of the above artifacts.
              We need them to process the sources. -->
         <dependency>

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj Thu Oct 11 23:11:01 2018
@@ -24,10 +24,6 @@ import java.io.Writer;
 import java.util.Iterator;
 
 import javax.activation.DataHandler;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
@@ -60,7 +56,6 @@ import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.OMXMLStreamReaderConfiguration;
-import org.apache.axiom.om.UnmarshallerConfigurator;
 import org.apache.axiom.om.XOPEncoded;
 import org.apache.axiom.om.impl.OMMultipartWriter;
 import org.apache.axiom.om.impl.common.AxiomExceptionTranslator;
@@ -70,7 +65,6 @@ import org.apache.axiom.om.impl.common.b
 import org.apache.axiom.om.impl.intf.AxiomChildNode;
 import org.apache.axiom.om.impl.intf.AxiomContainer;
 import org.apache.axiom.om.impl.intf.AxiomElement;
-import org.apache.axiom.om.impl.jaxb.AttachmentUnmarshallerImpl;
 import org.apache.axiom.om.impl.stream.NamespaceContextPreservationFilterHandler;
 import org.apache.axiom.om.impl.stream.XmlDeclarationRewriterHandler;
 import org.apache.axiom.om.impl.stream.XsiTypeFilterHandler;
@@ -371,24 +365,4 @@ public aspect AxiomContainerSupport {
             builder.close();
         }
     }
-
-    public final Object AxiomContainer.unmarshal(JAXBContext context, UnmarshallerConfigurator configurator, boolean preserve) throws JAXBException {
-        Unmarshaller unmarshaller = context.createUnmarshaller();
-        if (configurator != null) {
-            configurator.configure(unmarshaller);
-        }
-        XOPEncoded<XMLStreamReader> xopEncodedStream = getXOPEncodedStreamReader(preserve);
-        unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(xopEncodedStream.getAttachmentAccessor()));
-        return unmarshaller.unmarshal(xopEncodedStream.getRootPart());
-    }
-
-    public final <T> JAXBElement<T> AxiomContainer.unmarshal(JAXBContext context, UnmarshallerConfigurator configurator, Class<T> declaredType, boolean preserve) throws JAXBException {
-        Unmarshaller unmarshaller = context.createUnmarshaller();
-        if (configurator != null) {
-            configurator.configure(unmarshaller);
-        }
-        XOPEncoded<XMLStreamReader> xopEncodedStream = getXOPEncodedStreamReader(preserve);
-        unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(xopEncodedStream.getAttachmentAccessor()));
-        return unmarshaller.unmarshal(xopEncodedStream.getRootPart(), declaredType);
-    }
 }

Modified: webservices/axiom/trunk/axiom-all/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-all/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-all/pom.xml (original)
+++ webservices/axiom/trunk/axiom-all/pom.xml Thu Oct 11 23:11:01 2018
@@ -63,6 +63,11 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>axiom-c14n</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java Thu Oct 11 23:11:01 2018
@@ -19,9 +19,6 @@
 
 package org.apache.axiom.om;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
@@ -416,36 +413,4 @@ public interface OMContainer extends OMS
      * @return an XOP encoded representation of this information item
      */
     XOPEncoded<XMLStreamReader> getXOPEncodedStreamReader(boolean cache);
-    
-    /**
-     * Unmarshall the information item using JAXB.
-     * 
-     * @param context
-     *            the JAXB context
-     * @param configurator
-     *            custom unmarshaller settings to apply; may be {@code null}
-     * @param preserve
-     *            specifies whether the content of the information item should be preserved
-     * @return the unmarshalled object
-     * @throws JAXBException
-     *             if an error occurred while unmarshalling
-     */
-    Object unmarshal(JAXBContext context, UnmarshallerConfigurator configurator, boolean preserve) throws JAXBException;
-    
-    /**
-     * Unmarshall the information item using JAXB.
-     * 
-     * @param context
-     *            the JAXB context
-     * @param configurator
-     *            custom unmarshaller settings to apply; may be {@code null}
-     * @param declaredType
-     *            a JAXB mapped class to hold the XML data.
-     * @param preserve
-     *            specifies whether the content of the information item should be preserved
-     * @return the unmarshalled object
-     * @throws JAXBException
-     *             if an error occurred while unmarshalling
-     */
-    <T> JAXBElement<T> unmarshal(JAXBContext context, UnmarshallerConfigurator configurator, Class<T> declaredType, boolean preserve) throws JAXBException;
 }

Propchange: webservices/axiom/trunk/axiom-jaxb/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 11 23:11:01 2018
@@ -0,0 +1,4 @@
+target
+.classpath
+.project
+.settings

Propchange: webservices/axiom/trunk/axiom-jaxb/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Oct 11 23:11:01 2018
@@ -0,0 +1,17 @@
+/webservices/axiom/branches/AXIOM-201/axiom-jaxb:1183599-1433135
+/webservices/axiom/branches/AXIOM-399/axiom-jaxb:1329379-1331100
+/webservices/axiom/branches/AXIOM-412/axiom-jaxb:1311325-1325526
+/webservices/axiom/branches/AXIOM-420/axiom-jaxb:1334121-1336372
+/webservices/axiom/branches/AXIOM-435/axiom-jaxb:1361507-1366198
+/webservices/axiom/branches/AXIOM-437/axiom-jaxb:1364041-1364239
+/webservices/axiom/branches/AXIOM-476/axiom-jaxb:1718738-1718932
+/webservices/axiom/branches/CHECK_PARENT_BUG/axiom-jaxb:1338398-1338886
+/webservices/axiom/branches/CLONE/axiom-jaxb:1337822-1339011
+/webservices/axiom/branches/CLONE_NODE/axiom-jaxb:1346607-1353106
+/webservices/axiom/branches/DOXIA-492/axiom-jaxb:1715574-1716528
+/webservices/axiom/branches/JAXB2_DS/axiom-jaxb:1366463-1367737
+/webservices/axiom/branches/attrs-aspects/axiom-jaxb:1685218-1686663
+/webservices/axiom/branches/maven-site-plugin-3.5/axiom-jaxb:1731125-1732708
+/webservices/axiom/branches/namespaceURIInterning/axiom-jaxb:1293148-1293587
+/webservices/axiom/branches/osgi-redesign/axiom-jaxb:1180368-1180596
+/webservices/axiom/branches/stax-stream/axiom-jaxb:1733528-1733796

Modified: webservices/axiom/trunk/axiom-jaxb/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-jaxb/pom.xml?rev=1843611&r1=1748019&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-jaxb/pom.xml (original)
+++ webservices/axiom/trunk/axiom-jaxb/pom.xml Thu Oct 11 23:11:01 2018
@@ -39,58 +39,14 @@
             <artifactId>axiom-api</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>axiom-impl</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <!-- Necessary for some tests that construct a DataHandler form an object with content type text/plain -->
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-javamail_1.4_spec</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
         <plugins>
             <plugin>
-                <groupId>org.jvnet.jaxb2.maven2</groupId>
-                <artifactId>maven-jaxb2-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-test-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                        <configuration>
-                            <schemaDirectory>src/test/schemas</schemaDirectory>
-                            <addCompileSourceRoot>false</addCompileSourceRoot>
-                            <addTestCompileSourceRoot>true</addTestCompileSourceRoot>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Export-Package>*;-noimport:=true</Export-Package>
-                    </instructions>
-                </configuration>
             </plugin>
         </plugins>
     </build>

Copied: webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/AttachmentUnmarshallerImpl.java (from r1843610, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/AttachmentUnmarshallerImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/AttachmentUnmarshallerImpl.java?p2=webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/AttachmentUnmarshallerImpl.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/AttachmentUnmarshallerImpl.java&r1=1843610&r2=1843611&rev=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/jaxb/AttachmentUnmarshallerImpl.java (original)
+++ webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/AttachmentUnmarshallerImpl.java Thu Oct 11 23:11:01 2018
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.om.impl.jaxb;
+package org.apache.axiom.om.util.jaxb;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
@@ -26,10 +26,10 @@ import javax.xml.bind.attachment.Attachm
 
 import org.apache.axiom.om.OMAttachmentAccessor;
 
-public final class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller {
+final class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller {
     private final OMAttachmentAccessor attachmentAccessor;
     
-    public AttachmentUnmarshallerImpl(OMAttachmentAccessor attachmentAccessor) {
+    AttachmentUnmarshallerImpl(OMAttachmentAccessor attachmentAccessor) {
         this.attachmentAccessor = attachmentAccessor;
     }
     /**

Modified: webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/JAXBUtils.java?rev=1843611&r1=1748019&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/JAXBUtils.java (original)
+++ webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/JAXBUtils.java Thu Oct 11 23:11:01 2018
@@ -19,11 +19,14 @@
 package org.apache.axiom.om.util.jaxb;
 
 import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
+import javax.xml.stream.XMLStreamReader;
 
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.util.jaxb.UnmarshallerAdapter;
+import org.apache.axiom.om.XOPEncoded;
 
 /**
  * Contains utility methods that integrate JAXB with Axiom.
@@ -32,24 +35,63 @@ public final class JAXBUtils {
     private JAXBUtils() {}
     
     /**
-     * Unmarshal the given element.
+     * @deprecated Use
+     *             {@link #unmarshal(OMContainer, JAXBContext, UnmarshallerConfigurator, boolean)}
+     *             instead.
+     */
+    public static Object unmarshal(JAXBContext context, OMElement element, boolean cache) throws JAXBException {
+        return unmarshal(element, context, null, cache);
+    }
+    
+    /**
+     * Unmarshall the information item using JAXB.
      * 
+     * @param container
+     *            the document or element to unmarshall
      * @param context
      *            the JAXB context
-     * @param element
-     *            the element to unmarshal
-     * @param cache
-     *            <code>true</code> if the element must be preserved; <code>false</code> if it may
-     *            be consumed during unmarshalling
-     * @return the JAXB object
+     * @param configurator
+     *            custom unmarshaller settings to apply; may be {@code null}
+     * @param preserve
+     *            specifies whether the content of the information item should be preserved
+     * @return the unmarshalled object
      * @throws JAXBException
-     *             if an error occurs while unmarshalling
+     *             if an error occurred while unmarshalling
      */
-    public static Object unmarshal(JAXBContext context, OMElement element, boolean cache) throws JAXBException {
-        UnmarshallerAdapter adapter = org.apache.axiom.util.jaxb.JAXBUtils.getUnmarshallerAdapter(
-                element.getXMLStreamReader(cache));
+    public static Object unmarshal(OMContainer container, JAXBContext context, UnmarshallerConfigurator configurator, boolean preserve) throws JAXBException {
+        Unmarshaller unmarshaller = context.createUnmarshaller();
+        if (configurator != null) {
+            configurator.configure(unmarshaller);
+        }
+        XOPEncoded<XMLStreamReader> xopEncodedStream = container.getXOPEncodedStreamReader(preserve);
+        unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(xopEncodedStream.getAttachmentAccessor()));
+        return unmarshaller.unmarshal(xopEncodedStream.getRootPart());
+    }
+    
+    /**
+     * Unmarshall the information item using JAXB.
+     * 
+     * @param container
+     *            the document or element to unmarshall
+     * @param context
+     *            the JAXB context
+     * @param configurator
+     *            custom unmarshaller settings to apply; may be {@code null}
+     * @param declaredType
+     *            a JAXB mapped class to hold the XML data.
+     * @param preserve
+     *            specifies whether the content of the information item should be preserved
+     * @return the unmarshalled object
+     * @throws JAXBException
+     *             if an error occurred while unmarshalling
+     */
+    public static <T> JAXBElement<T> unmarshal(OMContainer container, JAXBContext context, UnmarshallerConfigurator configurator, Class<T> declaredType, boolean preserve) throws JAXBException {
         Unmarshaller unmarshaller = context.createUnmarshaller();
-        unmarshaller.setAttachmentUnmarshaller(adapter.getAttachmentUnmarshaller());
-        return unmarshaller.unmarshal(adapter.getReader());
+        if (configurator != null) {
+            configurator.configure(unmarshaller);
+        }
+        XOPEncoded<XMLStreamReader> xopEncodedStream = container.getXOPEncodedStreamReader(preserve);
+        unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(xopEncodedStream.getAttachmentAccessor()));
+        return unmarshaller.unmarshal(xopEncodedStream.getRootPart(), declaredType);
     }
 }

Copied: webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/UnmarshallerConfigurator.java (from r1843610, webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/UnmarshallerConfigurator.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/UnmarshallerConfigurator.java?p2=webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/UnmarshallerConfigurator.java&p1=webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/UnmarshallerConfigurator.java&r1=1843610&r2=1843611&rev=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/UnmarshallerConfigurator.java (original)
+++ webservices/axiom/trunk/axiom-jaxb/src/main/java/org/apache/axiom/om/util/jaxb/UnmarshallerConfigurator.java Thu Oct 11 23:11:01 2018
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.om;
+package org.apache.axiom.om.util.jaxb;
 
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;

Modified: webservices/axiom/trunk/code-coverage/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/code-coverage/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/code-coverage/pom.xml (original)
+++ webservices/axiom/trunk/code-coverage/pom.xml Thu Oct 11 23:11:01 2018
@@ -166,6 +166,25 @@
         
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+            <classifier>sources</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+            <classifier>jacoco</classifier>
+            <type>exec</type>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>xml-truth</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: webservices/axiom/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/distribution/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/distribution/pom.xml (original)
+++ webservices/axiom/trunk/distribution/pom.xml Thu Oct 11 23:11:01 2018
@@ -58,6 +58,11 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>axiom-c14n</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Thu Oct 11 23:11:01 2018
@@ -210,6 +210,7 @@
         <module>buildutils</module>
         <module>axiom-api</module>
         <module>axiom-compat</module>
+        <module>axiom-jaxb</module>
         <module>axiom-all</module>
         <module>samples</module>
         <module>systests</module>

Modified: webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md (original)
+++ webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md Thu Oct 11 23:11:01 2018
@@ -10,7 +10,6 @@ Changes in this release
         (Activation, StAX and JAXB) have been removed.
     *   The public API now uses generics. Note that this should in general not
         have impact on binary compatibility with Axiom 1.2.x.
-    *   `axiom-jaxb` no longer exists as a separate artifact.
 
 *   In Axiom 1.2.x several APIs were using `Object` as argument/return type
     although they expect/return a `DataHandler`. This is a legacy of Axis 1.x

Modified: webservices/axiom/trunk/systests/osgi-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/pom.xml (original)
+++ webservices/axiom/trunk/systests/osgi-tests/pom.xml Thu Oct 11 23:11:01 2018
@@ -50,6 +50,12 @@
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
         
         <dependency>
             <groupId>org.apache.felix</groupId>

Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/FactoryTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/FactoryTest.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/FactoryTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/FactoryTest.java Thu Oct 11 23:11:01 2018
@@ -51,9 +51,9 @@ public class FactoryTest {
                 url("link:classpath:stax2-api.link"),
                 url("link:classpath:woodstox-core-asl.link"),
                 url("link:classpath:org.apache.james.apache-mime4j-core.link"),
-                url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
                 url("link:classpath:org.apache.ws.commons.axiom.axiom-impl.link"),
                 url("link:classpath:org.apache.ws.commons.axiom.axiom-dom.link"),
+                url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
                 junitBundles());
     }
     

Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java Thu Oct 11 23:11:01 2018
@@ -39,7 +39,7 @@ import org.ops4j.pax.exam.spi.reactors.E
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 
 /**
- * Tests that the APIs depending on JAXB can be used successfully.
+ * Tests that the axiom-jaxb bundle can be loaded successfully and is operational.
  */
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
@@ -50,6 +50,7 @@ public class JAXBTest {
                 url("link:classpath:org.apache.james.apache-mime4j-core.link"),
                 url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
                 url("link:classpath:org.apache.ws.commons.axiom.axiom-impl.link"),
+                url("link:classpath:org.apache.ws.commons.axiom.axiom-jaxb.link"),
                 junitBundles());
     }
     

Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/SJSXPTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/SJSXPTest.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/SJSXPTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/SJSXPTest.java Thu Oct 11 23:11:01 2018
@@ -51,8 +51,8 @@ public class SJSXPTest {
                 url("link:classpath:org.apache.servicemix.specs.stax-api-1.0.link"),
                 url("link:classpath:org.apache.servicemix.bundles.jaxp-ri.link"),
                 url("link:classpath:org.apache.james.apache-mime4j-core.link"),
-                url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
                 url("link:classpath:org.apache.ws.commons.axiom.axiom-impl.link"),
+                url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
                 // For whatever reason, these packages are no longer exported by the system bundle
                 // in Felix >= 4.0.0
                 systemPackages("org.w3c.dom.html", "org.w3c.dom.ranges", "org.w3c.dom.traversal"),

Modified: webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/pom.xml?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/pom.xml (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/pom.xml Thu Oct 11 23:11:01 2018
@@ -46,6 +46,11 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/JAXBCustomBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/JAXBCustomBuilder.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/JAXBCustomBuilder.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/JAXBCustomBuilder.java Thu Oct 11 23:11:01 2018
@@ -27,6 +27,7 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.ds.custombuilder.CustomBuilder;
 import org.apache.axiom.om.ds.jaxb.JAXBOMDataSource;
+import org.apache.axiom.om.util.jaxb.JAXBUtils;
 
 public class JAXBCustomBuilder implements CustomBuilder {
     private final JAXBContext jaxbContext;
@@ -39,7 +40,7 @@ public class JAXBCustomBuilder implement
     @Override
     public OMDataSource create(OMElement element) throws OMException {
         try {
-            jaxbObject = element.unmarshal(jaxbContext, null, false);
+            jaxbObject = JAXBUtils.unmarshal(element, jaxbContext, null, false);
             return new JAXBOMDataSource(jaxbContext, jaxbObject);
         } catch (JAXBException ex) {
             throw new OMException(ex);

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java?rev=1843611&r1=1843610&r2=1843611&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestUnmarshalWithDataHandler.java Thu Oct 11 23:11:01 2018
@@ -25,6 +25,7 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.ds.jaxb.JAXBOMDataSource;
+import org.apache.axiom.om.util.jaxb.JAXBUtils;
 import org.apache.axiom.ts.AxiomTestCase;
 import org.apache.axiom.ts.jaxb.beans.DocumentBean;
 
@@ -41,7 +42,7 @@ public class TestUnmarshalWithDataHandle
         orgBean.setId("AB23498");
         orgBean.setContent(new DataHandler("test content", "text/plain"));
         OMElement element = factory.createOMElement(new JAXBOMDataSource(context, orgBean));
-        DocumentBean bean = (DocumentBean)element.unmarshal(context, null, true);
+        DocumentBean bean = (DocumentBean)JAXBUtils.unmarshal(element, context, null, true);
         assertEquals(orgBean.getId(), bean.getId());
         assertEquals(orgBean.getContent(), bean.getContent());
     }