Browse Source

SPR-5523: JAXB2 is using package-info.java now as well.

conversation
Arjen Poutsma 16 years ago
parent
commit
374afccadc
  1. 2
      org.springframework.oxm/build.xml
  2. 24
      org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java
  3. 6
      org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/package.html
  4. 5
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java
  5. 4
      org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java
  6. 6
      org.springframework.oxm/src/test/resources/org/springframework/oxm/config/oxmNamespaceHandlerTest.xml

2
org.springframework.oxm/build.xml

@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
<delete quiet="true" dir="${test.jaxb.dir}" />
<mkdir dir="${test.jaxb.dir}" />
<xjc destdir="${test.jaxb.dir}" package="org.springframework.oxm.jaxb" schema="${schema}">
<xjc destdir="${test.jaxb.dir}" package="org.springframework.oxm.jaxb.test" schema="${schema}">
<produces dir="${test.jaxb.dir}" includes="**/*.java"/>
</xjc>
<do-compile classpath.id="@{classpath.id}" input.dir="${test.jaxb.dir}" output.dir="@{output.dir}"

24
org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
* Package providing integration of <a href="http://java.sun.com/webservices/jaxb/">JAXB</a> with Springs O/X Mapping
* support
*
*/
package org.springframework.oxm.jaxb;

6
org.springframework.oxm/src/main/java/org/springframework/oxm/jaxb/package.html

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
<html>
<body>
Package providing integration of <a href="http://java.sun.com/webservices/jaxb/">JAXB</a> with Springs O/X Mapping
support.
</body>
</html>

5
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java

@ -38,12 +38,15 @@ import org.springframework.core.io.Resource; @@ -38,12 +38,15 @@ import org.springframework.core.io.Resource;
import org.springframework.oxm.AbstractMarshallerTests;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.XmlMappingException;
import org.springframework.oxm.jaxb.test.FlightType;
import org.springframework.oxm.jaxb.test.Flights;
import org.springframework.oxm.jaxb.test.ObjectFactory;
import org.springframework.oxm.mime.MimeContainer;
import org.springframework.util.FileCopyUtils;
public class Jaxb2MarshallerTests extends AbstractMarshallerTests {
private static final String CONTEXT_PATH = "org.springframework.oxm.jaxb";
private static final String CONTEXT_PATH = "org.springframework.oxm.jaxb.test";
private Jaxb2Marshaller marshaller;

4
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java

@ -33,6 +33,8 @@ import org.springframework.core.io.ClassPathResource; @@ -33,6 +33,8 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.oxm.AbstractUnmarshallerTests;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.jaxb.test.FlightType;
import org.springframework.oxm.jaxb.test.Flights;
import org.springframework.oxm.mime.MimeContainer;
import org.springframework.util.xml.StaxUtils;
@ -46,7 +48,7 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests { @@ -46,7 +48,7 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests {
@Override
public Unmarshaller createUnmarshaller() throws Exception {
unmarshaller = new Jaxb2Marshaller();
unmarshaller.setContextPath("org.springframework.oxm.jaxb");
unmarshaller.setContextPath("org.springframework.oxm.jaxb.test");
unmarshaller.setSchema(new ClassPathResource("org/springframework/oxm/flight.xsd"));
unmarshaller.afterPropertiesSet();
return unmarshaller;

6
org.springframework.oxm/src/test/resources/org/springframework/oxm/config/oxmNamespaceHandlerTest.xml

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
</property>
</bean>
<oxm:jaxb2-marshaller id="contextPathMarshaller" contextPath="org.springframework.oxm.jaxb"/>
<oxm:jaxb2-marshaller id="contextPathMarshaller" contextPath="org.springframework.oxm.jaxb.test"/>
<oxm:jaxb2-marshaller id="classesMarshaller">
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.Flights"/>
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.FlightType"/>
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.Flights"/>
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.FlightType"/>
</oxm:jaxb2-marshaller>
</beans>

Loading…
Cancel
Save