Skip to content

Commit

Permalink
Reverts the java-17 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Oct 6, 2023
1 parent b769749 commit b3ba197
Show file tree
Hide file tree
Showing 26 changed files with 171 additions and 209 deletions.
32 changes: 15 additions & 17 deletions api-generator/api-generator-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
<!--
Licensed under the European Space Agency Public License, Version 2.0
You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,27 +67,18 @@
<assembly.mainClass>esa.mo.tools.stubgen.StubGenerator</assembly.mainClass>
</properties>

<dependencies><!--
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
Expand All @@ -113,12 +104,6 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.6.0</version>
<exclusions>
<exclusion>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
Expand Down Expand Up @@ -189,5 +174,18 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk-17</id>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
// import javax.xml.bind.JAXBContext;
// import javax.xml.bind.JAXBException;
// import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.SystemStreamLog;
Expand Down Expand Up @@ -509,7 +506,7 @@ private void processWithGenerator(final Generator generator,
// pre process the reference XSD specifications
for (Map.Entry<Schema, XmlSpecification> spec : refXsd) {
try {
generator.preProcess((SpecificationType) spec.getKey());
generator.preProcess(spec.getKey());
} catch (Exception ex) {
ex.printStackTrace();
throw new MojoExecutionException(
Expand Down
25 changes: 16 additions & 9 deletions api-generator/generator-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,14 @@
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency><!--
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
Expand Down Expand Up @@ -191,4 +183,19 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-17</id>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
//import javax.xml.bind.JAXBElement;
//import javax.xml.bind.JAXBException;

import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import org.apache.batik.transcoder.TranscoderException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
import esa.mo.tools.stubgen.writers.AbstractWriter;
import esa.mo.xsd.*;
import esa.mo.xsd.EnumerationType.Item;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
Expand All @@ -44,8 +41,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
//import javax.xml.bind.JAXBElement;
//import javax.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;

/**
* Generates an XHTML compliant file of the service specification in an ECSS PUS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
*/
package esa.mo.tools.stubgen;

// import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper;
import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
import esa.mo.tools.stubgen.specification.AttributeTypeDetails;
import esa.mo.tools.stubgen.specification.CompositeField;
import esa.mo.tools.stubgen.specification.StdStrings;
Expand Down Expand Up @@ -57,10 +52,10 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
//import javax.xml.bind.JAXBContext;
//import javax.xml.bind.JAXBElement;
//import javax.xml.bind.JAXBException;
//import javax.xml.bind.Marshaller;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import org.dom4j.Namespace;
import org.dom4j.dom.DOMElement;
import org.w3c.dom.Element;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.ccsds.org/schema/ServiceSchema",
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.ccsds.org/schema/ServiceSchema",
xmlns =
{
@jakarta.xml.bind.annotation.XmlNs(namespaceURI = "http://www.ccsds.org/schema/ServiceSchema", prefix = "mal"),
@jakarta.xml.bind.annotation.XmlNs(namespaceURI = "http://www.ccsds.org/schema/COMSchema", prefix = "com"),
@jakarta.xml.bind.annotation.XmlNs(namespaceURI = "http://www.w3.org/2001/XMLSchema", prefix = "xsd")
@javax.xml.bind.annotation.XmlNs(namespaceURI = "http://www.ccsds.org/schema/ServiceSchema", prefix = "mal"),
@javax.xml.bind.annotation.XmlNs(namespaceURI = "http://www.ccsds.org/schema/COMSchema", prefix = "com"),
@javax.xml.bind.annotation.XmlNs(namespaceURI = "http://www.w3.org/2001/XMLSchema", prefix = "xsd")
},
elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED)
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

package esa.mo.xsd;
23 changes: 14 additions & 9 deletions api-generator/generator-interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,14 @@
<groupId>int.esa.ccsds.mo</groupId>
<artifactId>xml-jaxb</artifactId>
<version>10.0-SNAPSHOT</version>
</dependency><!--
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

Expand Down Expand Up @@ -268,5 +260,18 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk-17</id>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
import esa.mo.xsd.SpecificationType;
import java.io.IOException;
import java.util.Map;
//import javax.xml.bind.JAXBElement;
//import javax.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import w3c.xsd.Schema;

/**
Expand Down
25 changes: 16 additions & 9 deletions api-generator/generator-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,14 @@
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency><!--
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

Expand All @@ -119,4 +111,19 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-17</id>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,8 @@
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
//import javax.xml.bind.JAXBElement;
//import javax.xml.bind.JAXBException;

import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import org.apache.maven.plugin.logging.Log;

/**
Expand Down
27 changes: 17 additions & 10 deletions api-generator/generator-lib/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
<!--
Licensed under the European Space Agency Public License, Version 2.0
You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -79,18 +79,10 @@
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency> <!--
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>int.esa.ccsds.mo</groupId>
Expand Down Expand Up @@ -120,4 +112,19 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-17</id>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
import esa.mo.xsd.*;
import java.io.IOException;
import java.util.*;

import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import org.apache.maven.plugin.logging.Log;
import w3c.xsd.ComplexType;
import w3c.xsd.NoFixedFacet;
Expand Down
Loading

0 comments on commit b3ba197

Please sign in to comment.