MagicMarcus / mqtt-spy

Automatically exported from code.google.com/p/mqtt-spy
0 stars 0 forks source link

use xml API of JDK #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use Eclipse IDE for mqtt-spy-common (import maven project)
2. Build

What is the expected output? What do you see instead?

Build fails:
W3C_XML_SCHEMA_NS_URI cannot be resolved or is not a field

Please provide any additional information below.

These days (in Java 6 and newer), you do not need any explicit JAXB, JAX-WS, 
XML Streaming API (JSR-173) or SAAJ jars because they are all included in the 
JDK. There are many other non-xml related APIs generally available too, such as 
javax.activation for example.
You should exclude anything to do with these if your environment is Java 6 or 
newer.
We could use "mvn dependency:tree" to determine the dependency that depends of 
jsr173_api.

For version 1.8 see issue #33

Patch to solve problem:

diff --git a/mqtt-spy-common/pom.xml b/mqtt-spy-common/pom.xml
index 1dca75c..1cefb5e 100644
--- a/mqtt-spy-common/pom.xml
+++ b/mqtt-spy-common/pom.xml
@@ -8,6 +8,8 @@
        <properties>
                <timestamp>${maven.build.timestamp}</timestamp>
                <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
+               <maven.compiler.source>1.8</maven.compiler.source>
+               <maven.compiler.target>1.8</maven.compiler.target>
        </properties>

        <repositories>
@@ -135,6 +137,12 @@
                        <groupId>org.jvnet.jaxb2.maven2</groupId>
                        <artifactId>maven-jaxb2-plugin</artifactId>
                        <version>0.9.0</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>javax.xml.bind</groupId>
+                                       <artifactId>jsr173_api</artifactId>
+                               </exclusion>
+                       </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.jvnet.jaxb2_commons</groupId>

Original issue reported on code.google.com by maggu2810@gmail.com on 9 Mar 2015 at 10:36

GoogleCodeExporter commented 9 years ago
Fixed in the dev branch - thank you.

Original comment by kamil.ba...@gmail.com on 17 Mar 2015 at 8:58