geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r684407 - in /geronimo/devtools/eclipse-plugin/trunk: ./ plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/ plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/ plugins...
Date Sun, 10 Aug 2008 05:22:26 GMT
Author: mcconne
Date: Sat Aug  9 22:22:25 2008
New Revision: 684407

URL: http://svn.apache.org/viewvc?rev=684407&view=rev
Log:
GERONIMODEVTOOLS-468 Use Java 1.6 internal JAXB implementation instead of JAXB RI for Eclipse
plugins

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/NamespacePrefixMapperImpl.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/NamespacePrefixMapperImpl.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
    geronimo/devtools/eclipse-plugin/trunk/pom.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/NamespacePrefixMapperImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/NamespacePrefixMapperImpl.java?rev=684407&r1=684406&r2=684407&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/NamespacePrefixMapperImpl.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/common/NamespacePrefixMapperImpl.java
Sat Aug  9 22:22:25 2008
@@ -17,11 +17,11 @@
 
 package org.apache.geronimo.jee.common;
 
+import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
-
 /**
  * <strong>NamespacePrefixMapperImpl</strong> is used to map XML namespaces 
  * to a set of predetermined values.

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java?rev=684407&r1=684406&r2=684407&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
Sat Aug  9 22:22:25 2008
@@ -72,7 +72,7 @@
             marshaller.setListener(marshellerListener);
             marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
             marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
-            marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapperImpl());
+            marshaller.setProperty("com.sun.xml.internal.bind.namespacePrefixMapper", new
NamespacePrefixMapperImpl());
             ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
             marshaller.marshal(jaxbElement, outBuffer);
             ByteArrayInputStream inBuffer = new ByteArrayInputStream(outBuffer.toByteArray());

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/NamespacePrefixMapperImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/NamespacePrefixMapperImpl.java?rev=684407&r1=684406&r2=684407&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/NamespacePrefixMapperImpl.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/NamespacePrefixMapperImpl.java
Sat Aug  9 22:22:25 2008
@@ -17,10 +17,11 @@
 
 package org.apache.geronimo.st.core.jaxb;
 
+import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
 import org.apache.geronimo.st.core.internal.Trace;
 
 /**

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java?rev=684407&r1=684406&r2=684407&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/DependencyHelperTest.java
Sat Aug  9 22:22:25 2008
@@ -33,7 +33,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.geronimo.st.core.jaxb.NamespacePrefixMapperImpl;
 import org.xml.sax.InputSource;
 
 /**

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java?rev=684407&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
Sat Aug  9 22:22:25 2008
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.st.core.internal;
+
+import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.geronimo.st.core.internal.Trace;
+
+/**
+ * <strong>NamespacePrefixMapperImpl</strong> is used to map XML namespaces 
+ * to a set of predetermined values.
+ * 
+ * If this class changes, then the test version in org.apache.geronimo.jee.common
+ * need to be updated to be kept in sync
+ * 
+ * @version $Rev$ $Date$
+ */
+public class NamespacePrefixMapperImpl extends NamespacePrefixMapper {
+
+    private static Map<String, String> prefixMap = new HashMap<String, String>();
+
+    static {
+        prefixMap.put("http://geronimo.apache.org/xml/ns/deployment-1.2", "dep");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/application-2.0", "app");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0", "client");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/connector-1.2", "conn");
+        prefixMap.put("http://openejb.apache.org/xml/ns/openejb-jar-2.2", "ejb");
+        prefixMap.put("http://java.sun.com/xml/ns/persistence", "pers");
+        prefixMap.put("http://openejb.apache.org/xml/ns/pkgen-2.1", "pkgen");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/naming-1.2", "name");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/security-2.0", "sec");
+        prefixMap.put("http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1", "web");
+    }
+
+    public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix)
{
+        Trace.tracePoint("Entry", "NamespacePrefixMapper.getPreferredPrefix", namespaceUri,
suggestion, requirePrefix);
+
+        if (prefixMap.containsKey(namespaceUri))
+            return prefixMap.get(namespaceUri);
+
+        Trace.tracePoint("Exit", "NamespacePrefixMapper.getPreferredPrefix", namespaceUri,
suggestion, requirePrefix);
+        return suggestion;
+    }
+    
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/test/java/org/apache/geronimo/st/core/internal/NamespacePrefixMapperImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/pom.xml?rev=684407&r1=684406&r2=684407&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/pom.xml Sat Aug  9 22:22:25 2008
@@ -217,7 +217,6 @@
                         
         <pluginManagement>
             <plugins>
-                
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-antrun-plugin</artifactId>
@@ -270,7 +269,6 @@
                         <redirectTestOutputToFile>true</redirectTestOutputToFile>
                     </configuration>
                 </plugin>
-
             </plugins>
         </pluginManagement>
                 
@@ -280,10 +278,20 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.0.2</version>
                 <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                    <!--
+                     |
+                     | Have to specify compiler arguments here since using the <scope>system</scope>

+                     | tag does not work with maven 2.0.9 on Windows with a space in the
${java.home}
+                     |
+                     -->
+                    <compilerArguments>
+                        <bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
+                    </compilerArguments>
                 </configuration>
             </plugin>
+                
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-clean-plugin</artifactId>
@@ -299,6 +307,7 @@
                     </filesets>
                 </configuration>
             </plugin>
+                
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>



Mime
View raw message