You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2026/05/06 05:51:32 UTC

(karaf) branch main updated: Remove specs bundles (#1958)

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/main by this push:
     new a0062f9710 Remove specs bundles (#1958)
a0062f9710 is described below

commit a0062f97106bbf874bebc4e227c00c1e0c881d2f
Author: JB Onofré <jb...@apache.org>
AuthorDate: Wed May 6 07:51:27 2026 +0200

    Remove specs bundles (#1958)
---
 assemblies/features/base/pom.xml                   |  40 ---
 bom/artifacts/pom.xml                              |  21 --
 .../core/internal/InstanceServiceImpl.java         |   8 +-
 .../org/apache/karaf/itests/KarafTestSupport.java  |  10 +-
 .../KarafMinimalMonitoredTestSupport.java          |  11 +-
 pom.xml                                            |   1 -
 services/interceptor/impl/pom.xml                  |   6 -
 specs/activator/pom.xml                            |  71 -----
 .../apache/karaf/specs/activator/Activator.java    | 205 -------------
 .../apache/karaf/specs/locator/MockCallable.java   |  27 --
 .../apache/karaf/specs/locator/MockCallable2.java  |  27 --
 .../karaf/specs/locator/OsgiLocatorTest.java       |  83 ------
 specs/javaxml/pom.xml                              | 143 ---------
 .../java/javax/xml/datatype/$FactoryFinder.java    | 226 --------------
 .../java/javax/xml/datatype/DatatypeFactory.java   | 279 -----------------
 .../java/javax/xml/parsers/$FactoryFinder.java     | 242 ---------------
 .../javax/xml/parsers/DocumentBuilderFactory.java  | 145 ---------
 .../java/javax/xml/parsers/SAXParserFactory.java   | 115 -------
 .../main/java/javax/xml/stream/$FactoryFinder.java | 222 --------------
 .../java/javax/xml/stream/XMLEventFactory.java     | 102 -------
 .../java/javax/xml/stream/XMLInputFactory.java     | 132 ---------
 .../java/javax/xml/stream/XMLOutputFactory.java    |  74 -----
 .../java/javax/xml/transform/$FactoryFinder.java   | 232 ---------------
 .../javax/xml/transform/TransformerFactory.java    |  62 ----
 .../javax/xml/validation/$SchemaFactoryFinder.java | 328 --------------------
 .../java/javax/xml/validation/SchemaFactory.java   | 138 ---------
 .../java/javax/xml/xpath/$XPathFactoryFinder.java  | 330 ---------------------
 .../main/java/javax/xml/xpath/XPathFactory.java    | 120 --------
 .../main/java/org/w3c/dom/ElementTraversal.java    |  64 ----
 specs/javaxmlws/pom.xml                            |  84 ------
 .../main/java/javax/xml/soap/$FactoryFinder.java   | 256 ----------------
 .../main/java/javax/xml/soap/MessageFactory.java   |  46 ---
 .../main/java/javax/xml/soap/SAAJMetaFactory.java  |  38 ---
 .../java/javax/xml/soap/SOAPConnectionFactory.java |  33 ---
 .../src/main/java/javax/xml/soap/SOAPFactory.java  |  68 -----
 .../main/java/javax/xml/ws/spi/$FactoryFinder.java | 165 -----------
 .../src/main/java/javax/xml/ws/spi/Provider.java   |  89 ------
 specs/locator/pom.xml                              |  37 ---
 .../apache/karaf/specs/locator/OsgiLocator.java    | 161 ----------
 .../apache/karaf/specs/locator/MockCallable.java   |  27 --
 .../apache/karaf/specs/locator/MockCallable2.java  |  27 --
 .../karaf/specs/locator/OsgiLocatorTest.java       |  83 ------
 specs/pom.xml                                      |  44 ---
 43 files changed, 4 insertions(+), 4618 deletions(-)

diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml
index 1aeaafb820..edbe045bd5 100644
--- a/assemblies/features/base/pom.xml
+++ b/assemblies/features/base/pom.xml
@@ -59,26 +59,6 @@
             <artifactId>org.apache.servicemix.specs.activation-api-1.2.1</artifactId>
             <version>1.2.1_3</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.locator</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.java.xml</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.activator</artifactId>
-            <scope>runtime</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.karaf</groupId>
             <artifactId>org.apache.karaf.main</artifactId>
@@ -155,21 +135,6 @@
                         </goals>
                         <configuration>
                             <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.locator</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.java.xml</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
-                                </artifactItem>
                                 <artifactItem>
                                     <groupId>jakarta.annotation</groupId>
                                     <artifactId>jakarta.annotation-api</artifactId>
@@ -190,11 +155,6 @@
                                     <artifactId>osgi.core</artifactId>
                                     <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                 </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.activator</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
-                                </artifactItem>
                                 <artifactItem>
                                     <groupId>org.apache.karaf</groupId>
                                     <artifactId>org.apache.karaf.client</artifactId>
diff --git a/bom/artifacts/pom.xml b/bom/artifacts/pom.xml
index 471fed0206..81c383bd9d 100644
--- a/bom/artifacts/pom.xml
+++ b/bom/artifacts/pom.xml
@@ -391,27 +391,6 @@
                 <version>${project.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>org.apache.karaf.specs</groupId>
-                <artifactId>org.apache.karaf.specs.locator</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.karaf.specs</groupId>
-                <artifactId>org.apache.karaf.specs.activator</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.karaf.specs</groupId>
-                <artifactId>org.apache.karaf.specs.java.xml</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.karaf.specs</groupId>
-                <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
             <dependency>
                 <groupId>org.apache.karaf.subsystem</groupId>
                 <artifactId>org.apache.karaf.subsystem.core</artifactId>
diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index 2c56c3c15f..7671f4c8b9 100644
--- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -516,11 +516,7 @@ public class InstanceServiceImpl implements InstanceService {
                 classpath.append(System.getProperty("path.separator"));
                 classpath.append(jdk9Classpath);
             }
-            jdkOpts = " --add-reads=java.xml=java.logging" +
-                      " --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED" +
-                      " --patch-module java.base=" + System.getProperty("karaf.home") + "/lib/endorsed/org.apache.karaf.specs.locator-" + System.getProperty("karaf.version") + ".jar" +
-                      " --patch-module java.xml=" + System.getProperty("karaf.home") + "/lib/endorsed/org.apache.karaf.specs.java.xml-" + System.getProperty("karaf.version") + ".jar" +
-                      " --add-opens java.base/java.security=ALL-UNNAMED" +
+            jdkOpts = " --add-opens java.base/java.security=ALL-UNNAMED" +
                       " --add-opens java.base/java.net=ALL-UNNAMED" +
                       " --add-opens java.base/java.lang=ALL-UNNAMED" +
                       " --add-opens java.base/java.util=ALL-UNNAMED" +
@@ -541,7 +537,7 @@ public class InstanceServiceImpl implements InstanceService {
                 jdkOpts += " -Djava.security.manager=allow";
             }
         } else {
-            jdkOpts = " -Djava.endorsed.dirs=\"" + new File(new File(new File(System.getProperty("java.home"), "jre"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(libDir, "endorsed").getCanonicalPath() + "\""
+            jdkOpts = " -Djava.endorsed.dirs=\"" + new File(new File(new File(System.getProperty("java.home"), "jre"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"), "lib"), "endorsed") + "\""
                     + " -Djava.ext.dirs=\"" + new File(new File(new File(System.getProperty("java.home"), "jre"), "lib"), "ext") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"), "lib"), "ext") + System.getProperty("path.separator") + new File(libDir, "ext").getCanonicalPath() + "\"";
         }
         String command = "\""
diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
index 843a46c5b5..3a9876d12b 100644
--- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -260,13 +260,6 @@ public class KarafTestSupport {
                 KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", localRepository),
                 KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner
                 KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""),
-                new VMOption("--add-reads=java.xml=java.logging"),
-                new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"),
-                new VMOption("--patch-module"),
-                new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-"
-                    + System.getProperty("karaf.version") + ".jar"),
-                new VMOption("--patch-module"), new VMOption("java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-"
-                    + System.getProperty("karaf.version") + ".jar"),
                 new VMOption("--add-opens"),
                 new VMOption("java.base/java.security=ALL-UNNAMED"),
                 new VMOption("--add-opens"),
@@ -288,8 +281,7 @@ public class KarafTestSupport {
                 new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"),
                 new VMOption("--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED"),
                 new VMOption("-classpath"),
-                new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*"
-                    + File.pathSeparator + "lib/endorsed/*")
+                new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*")
                 
             };
         } else {
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java
index 679efd5f48..8269a5c77f 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/mavenresolver/KarafMinimalMonitoredTestSupport.java
@@ -89,14 +89,6 @@ public abstract class KarafMinimalMonitoredTestSupport {
                 editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
                 editConfigurationFilePut("etc/startup.properties", "file:../../" + new File(url.toURI()).getName(), "1"),
                 composite(editConfigurationFilePut("etc/org.apache.karaf.features.cfg", new File("target/test-classes/etc/org.apache.karaf.features.cfg"))),
-                new VMOption("--add-reads=java.xml=java.logging"),
-                new VMOption("--add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED"),
-                new VMOption("--patch-module"),
-                new VMOption("java.base=lib/endorsed/org.apache.karaf.specs.locator-" 
-                + System.getProperty("karaf.version") + ".jar"),
-                new VMOption("--patch-module"),
-                new VMOption("java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-" 
-                + System.getProperty("karaf.version") + ".jar"),
                 new VMOption("--add-opens"),
                 new VMOption("java.base/java.security=ALL-UNNAMED"),
                 new VMOption("--add-opens"),
@@ -118,8 +110,7 @@ public abstract class KarafMinimalMonitoredTestSupport {
                 new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED"),
                 new VMOption("--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED"),
                 new VMOption("-classpath"),
-                new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*"
-                    + File.pathSeparator + "lib/endorsed/*" )
+                new VMOption("lib/jdk9plus/*" + File.pathSeparator + "lib/boot/*")
             };
         } else {
             return new Option[] {
diff --git a/pom.xml b/pom.xml
index 53c26f6313..ec4c28d7b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,6 @@
         <module>event</module>
         <module>tooling</module>
         <module>manual</module>
-        <module>specs</module>
         <module>assemblies</module>
         <module>examples</module>
         <module>archetypes</module>
diff --git a/services/interceptor/impl/pom.xml b/services/interceptor/impl/pom.xml
index 698aff36a4..e0833dafa2 100644
--- a/services/interceptor/impl/pom.xml
+++ b/services/interceptor/impl/pom.xml
@@ -124,12 +124,6 @@
             <version>${slf4j.version}</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.locator</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/specs/activator/pom.xml b/specs/activator/pom.xml
deleted file mode 100644
index 8ec070e748..0000000000
--- a/specs/activator/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.specs</groupId>
-        <artifactId>specs</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>org.apache.karaf.specs.activator</artifactId>
-    <name>Apache Karaf :: Specs :: Activator</name>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.apache.karaf</groupId>
-                <artifactId>karaf-bom</artifactId>
-                <version>${project.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.locator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.framework</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestEntries>
-                            <Karaf-Activator>org.apache.karaf.specs.activator.Activator</Karaf-Activator>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/specs/activator/src/main/java/org/apache/karaf/specs/activator/Activator.java b/specs/activator/src/main/java/org/apache/karaf/specs/activator/Activator.java
deleted file mode 100644
index 97a83e31cd..0000000000
--- a/specs/activator/src/main/java/org/apache/karaf/specs/activator/Activator.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * 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.karaf.specs.activator;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import org.apache.karaf.specs.locator.OsgiLocator;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.SynchronousBundleListener;
-
-public class Activator implements BundleActivator, SynchronousBundleListener {
-
-    private static boolean debug = false;
-
-    private ConcurrentMap<Long, Map<String, Callable<Class>>> factories = new ConcurrentHashMap<>();
-
-    private BundleContext bundleContext;
-
-    static {
-        try {
-            String prop = System.getProperty("org.apache.karaf.specs.debug");
-            debug = prop != null && !"false".equals(prop);
-        } catch (Throwable t) { }
-    }
-
-    /**
-     * <p>Output debugging messages.</p>
-     *
-     * @param msg <code>String</code> to print to <code>stderr</code>.
-     */
-    protected void debugPrintln(String msg) {
-        if (debug) {
-            System.err.println("Spec(" + bundleContext.getBundle().getBundleId() + "): " + msg);
-        }
-    }
-
-    public synchronized void start(BundleContext bundleContext) throws Exception {
-        this.bundleContext = bundleContext;
-        debugPrintln("activating");
-        debugPrintln("adding bundle listener");
-        bundleContext.addBundleListener(this);
-        debugPrintln("checking existing bundles");
-        for (Bundle bundle : bundleContext.getBundles()) {
-            if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING ||
-                    bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) {
-                register(bundle);
-            }
-        }
-        debugPrintln("activated");
-    }
-
-    public synchronized void stop(BundleContext bundleContext) throws Exception {
-        debugPrintln("deactivating");
-        if (bundleContext != null) {
-            bundleContext.removeBundleListener(this);
-        }
-        while (!factories.isEmpty()) {
-            unregister(factories.keySet().iterator().next());
-        }
-        debugPrintln("deactivated");
-        this.bundleContext = null;
-    }
-
-    public void bundleChanged(BundleEvent event) {
-        synchronized (this) {
-            if (bundleContext == null) {
-                return;
-            }
-        }
-        if (event.getType() == BundleEvent.RESOLVED) {
-            register(event.getBundle());
-        } else if (event.getType() == BundleEvent.UNRESOLVED || event.getType() == BundleEvent.UNINSTALLED) {
-            unregister(event.getBundle().getBundleId());
-        }
-    }
-
-    protected void register(final Bundle bundle) {
-        debugPrintln("checking bundle " + bundle.getBundleId());
-        Map<String, Callable<Class>> map = factories.get(bundle.getBundleId());
-        Enumeration e = bundle.findEntries("META-INF/services/", "*", false);
-        if (e != null) {
-            while (e.hasMoreElements()) {
-                final URL u = (URL) e.nextElement();
-                final String url = u.toString();
-                if (url.endsWith("/")) {
-                    continue;
-                }
-                final String factoryId = url.substring(url.lastIndexOf("/") + 1);
-                if (map == null) {
-                    map = new HashMap<>();
-                    factories.put(bundle.getBundleId(), map);
-                }
-                map.put(factoryId, new BundleFactoryLoader(factoryId, u, bundle));
-            }
-        }
-        if (map != null) {
-            for (Map.Entry<String, Callable<Class>> entry : map.entrySet()) {
-                debugPrintln("registering service for key " + entry.getKey() + " with value " + entry.getValue());
-                OsgiLocator.register(entry.getKey(), entry.getValue());
-            }
-        }
-    }
-
-    protected void unregister(long bundleId) {
-        Map<String, Callable<Class>> map = factories.remove(bundleId);
-        if (map != null) {
-            for (Map.Entry<String, Callable<Class>> entry : map.entrySet()) {
-                debugPrintln("unregistering service for key " + entry.getKey() + " with value " + entry.getValue());
-                OsgiLocator.unregister(entry.getKey(), entry.getValue());
-            }
-        }
-    }
-
-    private class BundleFactoryLoader implements Callable<Class> {
-        private final String factoryId;
-        private final URL u;
-        private final Bundle bundle;
-        private volatile Class<?> clazz;
-
-        public BundleFactoryLoader(String factoryId, URL u, Bundle bundle) {
-            this.factoryId = factoryId;
-            this.u = u;
-            this.bundle = bundle;
-        }
-
-        public Class call() throws Exception {
-            try {
-                debugPrintln("loading factory for key: " + factoryId);
-                
-                if (clazz == null){
-                    synchronized (this) {
-                        if (clazz == null){
-                            debugPrintln("creating factory for key: " + factoryId);
-                            try (BufferedReader br = new BufferedReader(
-                                    new InputStreamReader(u.openStream(), StandardCharsets.UTF_8))) {
-                                String factoryClassName = br.readLine();
-                                while (factoryClassName != null) {
-                                    factoryClassName = factoryClassName.trim();
-                                    if (factoryClassName.charAt(0) != '#') {
-                                        debugPrintln("factory implementation: " + factoryClassName);
-                                        clazz = bundle.loadClass(factoryClassName);
-                                        return clazz;
-                                    }
-                                    factoryClassName = br.readLine();
-                                }
-                            }
-                        }
-                    }
-                }
-                return clazz;
-            } catch (Exception e) {
-                debugPrintln("exception caught while creating factory: " + e);
-                throw e;
-            } catch (Error e) {
-                debugPrintln("error caught while creating factory: " + e);
-                throw e;
-            }
-        }
-
-        @Override
-        public String toString() {
-           return u.toString();
-        }
-
-        @Override
-        public int hashCode() {
-           return u.hashCode();
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof BundleFactoryLoader) {
-                return u.toExternalForm().equals(((BundleFactoryLoader) obj).u.toExternalForm());
-            } else {
-                return false;
-            }
-        }
-    }
-}
diff --git a/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java b/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java
deleted file mode 100644
index 092d5bdd00..0000000000
--- a/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import java.util.concurrent.Callable;
-
-public class MockCallable implements Callable<Class> {
-   
-    public Class call() throws Exception {
-        return this.getClass();
-    }
-
-}
diff --git a/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java b/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java
deleted file mode 100644
index 7fba2f4ad2..0000000000
--- a/specs/activator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import java.util.concurrent.Callable;
-
-public class MockCallable2 implements Callable<Class> {
-   
-    public Class call() throws Exception {
-        return this.getClass();
-    }
-
-}
diff --git a/specs/activator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java b/specs/activator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java
deleted file mode 100644
index 7fc9dbdf77..0000000000
--- a/specs/activator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class OsgiLocatorTest extends Assert {
-    
-    @BeforeClass
-    public static void setup() {
-        OsgiLocator.register("Factory", new MockCallable());
-        OsgiLocator.register("Factory", new MockCallable2());
-    }
-
-    @Test
-    public void testLocatorWithSystemProperty() {
-        System.setProperty(OsgiLocator.TIMEOUT, "0");
-        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable.class.getName(), clazz.getName());
-
-        System.setProperty("Factory", "org.apache.karaf.specs.locator");
-        clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNull("Did not expect to find a class", clazz);
-    }
-
-    @Test
-    public void testLocatorWithoutSystemProperty() {
-        System.setProperty(OsgiLocator.TIMEOUT, "0");
-        System.clearProperty("Factory");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
-    }
-
-    @Test
-    public void testLocatorWithSystemPropertyAndTimeout() {
-        long timeout = 1000;
-        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
-        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class.", MockCallable.class.getName(), clazz.getName());
-
-        System.setProperty("Factory", "org.apache.karaf.specs.locator");
-        long t0 = System.currentTimeMillis();
-        clazz = OsgiLocator.locate(Object.class, "Factory");
-        long t1 = System.currentTimeMillis();
-        assertNull("Did not expect to find a class", clazz);
-        assertTrue("Timeout issue", (t1 - t0) > timeout / 2);
-    }
-
-    @Test
-    public void testLocatorWithoutSystemPropertyAndTimeout() {
-        long timeout = 1000;
-        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
-        System.clearProperty("Factory");
-        long t0 = System.currentTimeMillis();
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        long t1 = System.currentTimeMillis();
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
-        assertTrue("Timeout issue", (t1 - t0) < timeout / 2);
-    }
-
-}
diff --git a/specs/javaxml/pom.xml b/specs/javaxml/pom.xml
deleted file mode 100644
index 8645173fac..0000000000
--- a/specs/javaxml/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.specs</groupId>
-        <artifactId>specs</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>org.apache.karaf.specs.java.xml</artifactId>
-    <packaging>jar</packaging>
-    <name>Apache Karaf :: Specs :: Java Xml</name>
-
-    <properties>
-        <javaVersion>8</javaVersion>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.apache.karaf</groupId>
-                <artifactId>karaf-bom</artifactId>
-                <version>${project.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-stax-api_1.2_spec</artifactId>
-            <version>1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>xml-apis</groupId>
-            <artifactId>xml-apis</artifactId>
-            <version>2.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.locator</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <inherited>true</inherited>
-                <configuration>
-                    <!--<compilerArgument>-Xbootclasspath/p:${settings.localRepository}/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar</compilerArgument>-->
-                </configuration>
-            </plugin>
-            <!--
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Description>${project.description}</Bundle-Description>
-                        <Export-Package>
-                            !org.w3c.dom.css,
-                            !org.w3c.dom.html,
-                            !org.w3c.dom.stylesheets,
-                            !org.w3c.dom.xpath,
-                            javax.xml.stream*;version=1.2;-split-package:=merge-first;-noimport:=true,
-                            javax.xml*;version=1.4;-split-package:=merge-first;-noimport:=true,
-                            org.w3c.dom*;version=1.0;-split-package:=merge-first;-noimport:=true,
-                            org.xml.sax*;version=2.0.2;-split-package:=merge-first;-noimport:=true,
-                        </Export-Package>
-                        <Import-Package>
-                            *
-                        </Import-Package>
-                    </instructions>
-                    <unpackBundle>true</unpackBundle>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <artifactSet>
-                                <includes>
-                                    <include>org.apache.servicemix.specs:org.apache.servicemix.specs.locator</include>
-                                    <include>xml-apis:xml-apis</include>
-                                </includes>
-                            </artifactSet>
-                            <filters>
-                                <filter>
-                                    <artifact>${project.groupId}:${project.artifactId}</artifact>
-                                    <excludes>
-                                        <exclude>org/apache/servicemix/**</exclude>
-                                    </excludes>
-                                </filter>
-                                <filter>
-                                    <artifact>xml-apis:xml-apis</artifact>
-                                    <excludes>
-                                        <exclude>javax/**</exclude>
-                                        <exclude>org/**</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                            <createSourcesJar>${createSourcesJar}</createSourcesJar>
-                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-                            <createDependencyReducedPom>true</createDependencyReducedPom>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
--->
-        </plugins>
-    </build>
-</project>
diff --git a/specs/javaxml/src/main/java/javax/xml/datatype/$FactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/datatype/$FactoryFinder.java
deleted file mode 100644
index 1e550400c7..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/datatype/$FactoryFinder.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * 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 javax.xml.datatype;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class $FactoryFinder {
-    
-    private static final String DEFAULT_PACKAGE = "com.sun.xml.internal.";
-    
-    private static final Logger LOGGER = Logger.getLogger("jvaax.xml.datatype");
-    
-    final private static Properties cacheProps = new Properties();
-    
-    private static volatile boolean firstTime = true;
-    
-    static private Class getProviderClass(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException {
-        try {
-            if (cl == null) {
-                if (useBSClsLoader) {
-                    return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-                } else {
-                    cl = getContextClassLoader();
-                    if (cl == null) {
-                        throw new ClassNotFoundException();
-                    }
-                    else {
-                        return Class.forName(className, false, cl);
-                    }
-                }
-            }
-            else {
-                return Class.forName(className, false, cl);
-            }
-        }
-        catch (ClassNotFoundException e1) {
-            if (doFallback) {
-                return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-            }
-            else {
-                throw e1;
-            }
-        }
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback) throws DatatypeConfigurationException {
-        return newInstance(type, className, cl, doFallback, false);
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws DatatypeConfigurationException {
-        assert type != null;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                cl = null;
-                useBSClsLoader = true;
-            }
-        }
-        try {
-            Class<?> providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
-            if (!type.isAssignableFrom(providerClass)) {
-                throw new ClassCastException(className + " cannot be cast to " + type.getName());
-            }
-            Object instance = providerClass.getConstructor().newInstance();
-            final ClassLoader clD = cl;
-            LOGGER.fine(() -> "created new instance of " + providerClass + " using ClassLoader: " + clD);
-            return type.cast(instance);
-        }
-        catch (ClassNotFoundException x) {
-            throw new DatatypeConfigurationException("Provider " + className + " not found", x);
-        }
-        catch (Exception x) {
-            throw new DatatypeConfigurationException("Provider " + className + " could not be instantiated: " + x, x);
-        }
-    }
-
-
-    static <T> T find(Class<T> type, String fallbackClassName) throws DatatypeConfigurationException {
-        return find(type, type.getName(), null, fallbackClassName);
-    }
-
-    static <T> T find(Class<T> type, String factoryId, ClassLoader cl, String fallbackClassName) throws DatatypeConfigurationException
-    {
-        try {
-            // If we are deployed into an OSGi environment, leverage it
-            Class<? extends T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(type, factoryId);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable e) {
-        }
-
-        try {
-            final String systemProp;
-            if (type.getName().equals(factoryId)) {
-                systemProp = getSystemProperty(factoryId);
-            } else {
-                systemProp = System.getProperty(factoryId);
-            }
-            if (systemProp != null) {
-                LOGGER.fine(() -> "found system property, value=" + systemProp);
-                return newInstance(type, systemProp, cl, true);
-            }
-        }
-        catch (SecurityException se) {
-            throw new DatatypeConfigurationException("Failed to read factoryId '" + factoryId + "'", se);
-        }
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        firstTime = false;
-                        String javaHome = getSystemProperty("java.home");
-                        String configFile;
-                        configFile = javaHome + File.separator + "conf" + File.separator + "jaxp.properties";
-                        File jaxp = new File(configFile);
-                        if (doesFileExist(jaxp)) {
-                            cacheProps.load(getFileInputStream(jaxp));
-                        }
-                        configFile = javaHome + File.separator + "conf" + File.separator + "stax.properties";
-                        File stax = new File(configFile);
-                        if (doesFileExist(stax)) {
-                            cacheProps.load(getFileInputStream(stax));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(factoryId);
-            if (factoryClassName != null) {
-                return newInstance(type, factoryClassName, cl, true);
-            }
-        }
-        catch (Exception ex) {
-            LOGGER.log(Level.FINE, "Error loading JDK properties", ex);
-        }
-        if (type.getName().equals(factoryId)) {
-            final T provider = findServiceProvider(type, cl);
-            if (provider != null) {
-                return provider;
-            }
-        } else {
-            assert fallbackClassName == null;
-        }
-        if (fallbackClassName == null) {
-            throw new DatatypeConfigurationException("Provider for " + factoryId + " cannot be found", null);
-        }
-        LOGGER.fine(() -> "loaded from fallback value: " + fallbackClassName);
-        return newInstance(type, fallbackClassName, cl, true);
-    }
-
-    
-    private static <T> T findServiceProvider(final Class<T> type, final ClassLoader cl) throws DatatypeConfigurationException {
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<T>) () -> {
-                final ServiceLoader<T> serviceLoader;
-                if (cl == null) {
-                    serviceLoader = ServiceLoader.load(type);
-                } else {
-                    serviceLoader = ServiceLoader.load(type, cl);
-                }
-                final Iterator<T> iterator = serviceLoader.iterator();
-                if (iterator.hasNext()) {
-                    return iterator.next();
-                } else {
-                    return null;
-                }
-            });
-        } catch(ServiceConfigurationError e) {
-            final RuntimeException x = new RuntimeException("Provider for " + type + " cannot be created", e);
-            throw new DatatypeConfigurationException(x.getMessage(), x);
-          }
-      }
-
-    private static ClassLoader getContextClassLoader() throws SecurityException{
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException)e.getException();
-        }
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/datatype/DatatypeFactory.java b/specs/javaxml/src/main/java/javax/xml/datatype/DatatypeFactory.java
deleted file mode 100644
index 5ff92db72a..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/datatype/DatatypeFactory.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * 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 javax.xml.datatype;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.GregorianCalendar;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public abstract class DatatypeFactory {
-
-    public static final String DATATYPEFACTORY_PROPERTY = "javax.xml.datatype.DatatypeFactory";
-
-    private static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = "com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl";
-
-    private static final Pattern XDTSCHEMA_YMD = Pattern.compile("[^DT]*");
-
-    private static final Pattern XDTSCHEMA_DTD = Pattern.compile("[^YM]*[DT].*");
-
-
-    protected DatatypeFactory() {
-    }
-
-
-    public static DatatypeFactory newDefaultInstance() {
-        try {
-            return $FactoryFinder.newInstance(DatatypeFactory.class, DATATYPEFACTORY_IMPLEMENTATION_CLASS, null, false, true);
-        } catch (DatatypeConfigurationException e) {
-            throw new RuntimeException("Unable to create default instance", e);
-        }
-    }
-
-    public static DatatypeFactory newInstance() throws DatatypeConfigurationException {
-        return $FactoryFinder.find(DatatypeFactory.class, DATATYPEFACTORY_IMPLEMENTATION_CLASS);
-    }
-
-
-    public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader) throws DatatypeConfigurationException {
-        return $FactoryFinder.newInstance(DatatypeFactory.class, factoryClassName, classLoader, false);
-    }
-
-    public abstract Duration newDuration(final String lexicalRepresentation);
-
-    public abstract Duration newDuration(final long durationInMilliSeconds);
-
-    public abstract Duration newDuration(final boolean isPositive, final BigInteger years, final BigInteger months,
-                                         final BigInteger days, final BigInteger hours, final BigInteger minutes, final BigDecimal seconds);
-
-    public Duration newDuration(final boolean isPositive, final int years, final int months,
-                                final int days, final int hours, final int minutes, final int seconds) {
-        BigInteger realYears = (years != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) years) : null;
-        BigInteger realMonths = (months != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) months) : null;
-        BigInteger realDays = (days != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) days) : null;
-        BigInteger realHours = (hours != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) hours) : null;
-        BigInteger realMinutes = (minutes != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) minutes) : null;
-        BigDecimal realSeconds = (seconds != DatatypeConstants.FIELD_UNDEFINED) ? BigDecimal.valueOf((long) seconds) : null;
-        return newDuration(isPositive, realYears, realMonths, realDays, realHours, realMinutes, realSeconds);
-    }
-
-
-    public Duration newDurationDayTime(final String lexicalRepresentation) {
-        if (lexicalRepresentation == null) {
-            throw new NullPointerException("Trying to create an xdt:dayTimeDuration with an invalid lexical representation of \"null\"");
-        }
-        Matcher matcher = XDTSCHEMA_DTD.matcher(lexicalRepresentation);
-        if (!matcher.matches()) {
-            throw new IllegalArgumentException("Trying to create an xdt:dayTimeDuration with an invalid"
-                            + " lexical representation of \"" + lexicalRepresentation
-                            + "\", data model requires years and months only.");
-        }
-        return newDuration(lexicalRepresentation);
-    }
-
-    public Duration newDurationDayTime(final long durationInMilliseconds) {
-        return newDuration(durationInMilliseconds);
-    }
-
-    public Duration newDurationDayTime(final boolean isPositive, final BigInteger day,
-                                       final BigInteger hour, final BigInteger minute, final BigInteger second) {
-        return newDuration(isPositive, null, null,
-                           day, hour, minute, (second != null) ? new BigDecimal(second) : null);
-    }
-
-    public Duration newDurationDayTime(final boolean isPositive, final int day,
-                                       final int hour, final int minute, final int second) {
-        return newDurationDayTime(isPositive, BigInteger.valueOf((long) day), BigInteger.valueOf((long) hour),
-                                  BigInteger.valueOf((long) minute), BigInteger.valueOf((long) second));
-    }
-
-    public Duration newDurationYearMonth(final String lexicalRepresentation) {
-        if (lexicalRepresentation == null) {
-            throw new NullPointerException(
-                    "Trying to create an xdt:yearMonthDuration with an invalid"
-                            + " lexical representation of \"null\"");
-        }
-        Matcher matcher = XDTSCHEMA_YMD.matcher(lexicalRepresentation);
-        if (!matcher.matches()) {
-            throw new IllegalArgumentException(
-                    "Trying to create an xdt:yearMonthDuration with an invalid"
-                            + " lexical representation of \"" + lexicalRepresentation
-                            + "\", data model requires days and times only.");
-        }
-        return newDuration(lexicalRepresentation);
-    }
-
-
-    public Duration newDurationYearMonth(final long durationInMilliseconds) {
-        Duration fullDuration = newDuration(durationInMilliseconds);
-        boolean isPositive = fullDuration.getSign() != -1;
-        BigInteger years = (BigInteger) fullDuration.getField(DatatypeConstants.YEARS);
-        if (years == null) {
-            years = BigInteger.ZERO;
-        }
-        BigInteger months = (BigInteger) fullDuration.getField(DatatypeConstants.MONTHS);
-        if (months == null) {
-            months = BigInteger.ZERO;
-        }
-        return newDurationYearMonth(isPositive, years, months);
-    }
-
-
-    public Duration newDurationYearMonth(final boolean isPositive, final BigInteger year, final BigInteger month) {
-        return newDuration(isPositive, year, month,
-                           null, null, null, null);
-    }
-
-
-    public Duration newDurationYearMonth(final boolean isPositive, final int year, final int month) {
-        return newDurationYearMonth(isPositive, BigInteger.valueOf((long) year), BigInteger.valueOf((long) month));
-    }
-
-    public abstract XMLGregorianCalendar newXMLGregorianCalendar();
-
-    public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
-
-    public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
-
-    public abstract XMLGregorianCalendar newXMLGregorianCalendar(
-            final BigInteger year,
-            final int month,
-            final int day,
-            final int hour,
-            final int minute,
-            final int second,
-            final BigDecimal fractionalSecond,
-            final int timezone);
-
-    public XMLGregorianCalendar newXMLGregorianCalendar(
-            final int year,
-            final int month,
-            final int day,
-            final int hour,
-            final int minute,
-            final int second,
-            final int millisecond,
-            final int timezone) {
-        BigInteger realYear = (year != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) year) : null;
-        BigDecimal realMillisecond = null;
-        if (millisecond != DatatypeConstants.FIELD_UNDEFINED) {
-            if (millisecond < 0 || millisecond > 1000) {
-                throw new IllegalArgumentException(
-                        "javax.xml.datatype.DatatypeFactory#newXMLGregorianCalendar("
-                                + "int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)"
-                                + "with invalid millisecond: " + millisecond
-                );
-            }
-            realMillisecond = BigDecimal.valueOf((long) millisecond).movePointLeft(3);
-        }
-        return newXMLGregorianCalendar(realYear, month,
-                day,
-                hour,
-                minute,
-                second,
-                realMillisecond,
-                timezone
-        );
-    }
-
-
-    public XMLGregorianCalendar newXMLGregorianCalendarDate(
-            final int year,
-            final int month,
-            final int day,
-            final int timezone) {
-
-        return newXMLGregorianCalendar(
-                year,
-                month,
-                day,
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                timezone);
-    }
-
-
-    public XMLGregorianCalendar newXMLGregorianCalendarTime(
-            final int hours,
-            final int minutes,
-            final int seconds,
-            final int timezone) {
-
-        return newXMLGregorianCalendar(
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                hours,
-                minutes,
-                seconds,
-                DatatypeConstants.FIELD_UNDEFINED,
-                timezone);
-    }
-
-
-    public XMLGregorianCalendar newXMLGregorianCalendarTime(
-            final int hours,
-            final int minutes,
-            final int seconds,
-            final BigDecimal fractionalSecond,
-            final int timezone) {
-
-        return newXMLGregorianCalendar(
-                null,
-                DatatypeConstants.FIELD_UNDEFINED,
-                DatatypeConstants.FIELD_UNDEFINED,
-                hours,
-                minutes,
-                seconds,
-                fractionalSecond,
-                timezone);
-    }
-
-
-    public XMLGregorianCalendar newXMLGregorianCalendarTime(
-            final int hours,
-            final int minutes,
-            final int seconds,
-            final int milliseconds,
-            final int timezone) {
-
-
-        BigDecimal realMilliseconds = null;
-        if (milliseconds != DatatypeConstants.FIELD_UNDEFINED) {
-            if (milliseconds < 0 || milliseconds > 1000) {
-                throw new IllegalArgumentException(
-                        "javax.xml.datatype.DatatypeFactory#newXMLGregorianCalendarTime("
-                                + "int hours, int minutes, int seconds, int milliseconds, int timezone)"
-                                + "with invalid milliseconds: " + milliseconds
-                );
-            }
-
-            realMilliseconds = BigDecimal.valueOf((long) milliseconds).movePointLeft(3);
-        }
-
-        return newXMLGregorianCalendarTime(
-                hours,
-                minutes,
-                seconds,
-                realMilliseconds,
-                timezone
-        );
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/parsers/$FactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/parsers/$FactoryFinder.java
deleted file mode 100644
index f209bf4060..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/parsers/$FactoryFinder.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * 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 javax.xml.parsers;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.function.Supplier;
-
-class $FactoryFinder {
-    
-    private static final String DEFAULT_PACKAGE = "com.sun.xml.internal.";
-    
-    private static boolean debug;
-    
-    final private static Properties cacheProps = new Properties();
-    
-    private static volatile boolean firstTime = true;
-    
-    static {
-        try {
-            String val = getSystemProperty("jaxp.debug");
-            debug = val != null && !"false".equals(val);
-        }
-        catch (SecurityException se) {
-            debug = false;
-        }
-    }
-
-    private static void dPrint(Supplier<String> msgGen) {
-        if (debug) {
-            System.err.println("JAXP: " + msgGen.get());
-        }
-    }
-
-    
-    static private Class getProviderClass(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException {
-        try {
-            if (cl == null) {
-                if (useBSClsLoader) {
-                    return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-                } else {
-                    cl = getContextClassLoader();
-                    if (cl == null) {
-                        throw new ClassNotFoundException();
-                    }
-                    else {
-                        return Class.forName(className, false, cl);
-                    }
-                }
-            }
-            else {
-                return Class.forName(className, false, cl);
-            }
-        }
-        catch (ClassNotFoundException e1) {
-            if (doFallback) {
-                return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-            }
-            else {
-                throw e1;
-            }
-        }
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback) throws FactoryConfigurationError {
-        return newInstance(type, className, cl, doFallback, false);
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws FactoryConfigurationError {
-        assert type != null;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                cl = null;
-                useBSClsLoader = true;
-            }
-        }
-        try {
-            Class<?> providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
-            if (!type.isAssignableFrom(providerClass)) {
-                throw new ClassCastException(className + " cannot be cast to " + type.getName());
-            }
-            Object instance = providerClass.getConstructor().newInstance();
-            final ClassLoader clD = cl;
-            dPrint(()->"created new instance of " + providerClass + " using ClassLoader: " + clD);
-            return type.cast(instance);
-        }
-        catch (ClassNotFoundException x) {
-            throw new FactoryConfigurationError(x, "Provider " + className + " not found");
-        }
-        catch (Exception x) {
-            throw new FactoryConfigurationError(x, "Provider " + className + " could not be instantiated: " + x);
-        }
-    }
-
-
-    static <T> T find(Class<T> type, String fallbackClassName) throws FactoryConfigurationError {
-        return find(type, type.getName(), null, fallbackClassName);
-    }
-
-    static <T> T find(Class<T> type, String factoryId, ClassLoader cl, String fallbackClassName) throws FactoryConfigurationError
-    {
-        try {
-            // If we are deployed into an OSGi environment, leverage it
-            Class<? extends T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(type, factoryId);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable e) {
-        }
-
-        try {
-            final String systemProp;
-            if (type.getName().equals(factoryId)) {
-                systemProp = getSystemProperty(factoryId);
-            } else {
-                systemProp = System.getProperty(factoryId);
-            }
-            if (systemProp != null) {
-                dPrint(()->"found system property, value=" + systemProp);
-                return newInstance(type, systemProp, cl, true);
-            }
-        }
-        catch (SecurityException se) {
-            throw new FactoryConfigurationError(se, "Failed to read factoryId '" + factoryId + "'");
-        }
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        firstTime = false;
-                        String javaHome = getSystemProperty("java.home");
-                        String configFile;
-                        configFile = javaHome + File.separator + "conf" + File.separator + "jaxp.properties";
-                        File jaxp = new File(configFile);
-                        if (doesFileExist(jaxp)) {
-                            cacheProps.load(getFileInputStream(jaxp));
-                        }
-                        configFile = javaHome + File.separator + "conf" + File.separator + "stax.properties";
-                        File stax = new File(configFile);
-                        if (doesFileExist(stax)) {
-                            cacheProps.load(getFileInputStream(stax));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(factoryId);
-            if (factoryClassName != null) {
-                return newInstance(type, factoryClassName, cl, true);
-            }
-        }
-        catch (Exception ex) {
-            if (debug) ex.printStackTrace();
-        }
-        if (type.getName().equals(factoryId)) {
-            final T provider = findServiceProvider(type, cl);
-            if (provider != null) {
-                return provider;
-            }
-        } else {
-            assert fallbackClassName == null;
-        }
-        if (fallbackClassName == null) {
-            throw new FactoryConfigurationError("Provider for " + factoryId + " cannot be found");
-        }
-        dPrint(()->"loaded from fallback value: " + fallbackClassName);
-        return newInstance(type, fallbackClassName, cl, true);
-    }
-
-    
-    private static <T> T findServiceProvider(final Class<T> type, final ClassLoader cl) {
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<T>) () -> {
-                final ServiceLoader<T> serviceLoader;
-                if (cl == null) {
-                    serviceLoader = ServiceLoader.load(type);
-                } else {
-                    serviceLoader = ServiceLoader.load(type, cl);
-                }
-                final Iterator<T> iterator = serviceLoader.iterator();
-                if (iterator.hasNext()) {
-                    return iterator.next();
-                } else {
-                    return null;
-                }
-            });
-        } catch(ServiceConfigurationError e) {
-            final RuntimeException x = new RuntimeException("Provider for " + type + " cannot be created", e);
-            throw new FactoryConfigurationError(x, x.getMessage());
-          }
-      }
-
-    private static ClassLoader getContextClassLoader() throws SecurityException{
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException)e.getException();
-        }
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java b/specs/javaxml/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java
deleted file mode 100644
index 1a6865e46e..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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 javax.xml.parsers;
-
-import javax.xml.validation.Schema;
-
-
-public abstract class DocumentBuilderFactory {
-
-    private static final String DEFAULT_IMPL = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
-
-    private boolean validating = false;
-    private boolean namespaceAware = false;
-    private boolean whitespace = false;
-    private boolean expandEntityRef = true;
-    private boolean ignoreComments = false;
-    private boolean coalescing = false;
-
-    protected DocumentBuilderFactory() {
-    }
-
-    public static DocumentBuilderFactory newDefaultInstance() {
-        return $FactoryFinder.newInstance(DocumentBuilderFactory.class, DEFAULT_IMPL, null, false, true);
-    }
-
-    public static DocumentBuilderFactory newInstance() {
-        return $FactoryFinder.find(DocumentBuilderFactory.class, DEFAULT_IMPL);
-    }
-
-    public static DocumentBuilderFactory newInstance(String factoryClassName, ClassLoader classLoader) {
-        return $FactoryFinder.newInstance(DocumentBuilderFactory.class, factoryClassName, classLoader, false);
-    }
-
-    public abstract DocumentBuilder newDocumentBuilder() throws ParserConfigurationException;
-
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    public void setNamespaceAware(boolean awareness) {
-        this.namespaceAware = awareness;
-    }
-
-    public boolean isValidating() {
-        return validating;
-    }
-
-    public void setValidating(boolean validating) {
-        this.validating = validating;
-    }
-
-    public boolean isIgnoringElementContentWhitespace() {
-        return whitespace;
-    }
-
-    public void setIgnoringElementContentWhitespace(boolean whitespace) {
-        this.whitespace = whitespace;
-    }
-
-    public boolean isExpandEntityReferences() {
-        return expandEntityRef;
-    }
-
-    public void setExpandEntityReferences(boolean expandEntityRef) {
-        this.expandEntityRef = expandEntityRef;
-    }
-
-    public boolean isIgnoringComments() {
-        return ignoreComments;
-    }
-
-    public void setIgnoringComments(boolean ignoreComments) {
-        this.ignoreComments = ignoreComments;
-    }
-
-    public boolean isCoalescing() {
-        return coalescing;
-    }
-
-    public void setCoalescing(boolean coalescing) {
-        this.coalescing = coalescing;
-    }
-
-    public abstract void setAttribute(String name, Object value) throws IllegalArgumentException;
-
-    public abstract Object getAttribute(String name) throws IllegalArgumentException;
-
-    public abstract void setFeature(String name, boolean value) throws ParserConfigurationException;
-
-    public abstract boolean getFeature(String name) throws ParserConfigurationException;
-
-
-    public Schema getSchema() {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-
-    }
-
-    public void setSchema(Schema schema) {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-    }
-
-    public boolean isXIncludeAware() {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-    }
-
-    public void setXIncludeAware(final boolean state) {
-        if (state) {
-            throw new UnsupportedOperationException(" setXIncludeAware " +
-                    "is not supported on this JAXP" +
-                    " implementation or earlier: " + this.getClass());
-        }
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/parsers/SAXParserFactory.java b/specs/javaxml/src/main/java/javax/xml/parsers/SAXParserFactory.java
deleted file mode 100644
index 4ff834387c..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/parsers/SAXParserFactory.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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 javax.xml.parsers;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-import javax.xml.validation.Schema;
-
-public abstract class SAXParserFactory {
-
-    private static final String DEFAULT_IMPL = "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
-
-    private boolean validating = false;
-
-    private boolean namespaceAware = false;
-
-    protected SAXParserFactory() {
-
-    }
-
-    public static SAXParserFactory newDefaultInstance() {
-        return $FactoryFinder.newInstance(SAXParserFactory.class, DEFAULT_IMPL, null, false, true);
-    }
-
-
-    public static SAXParserFactory newInstance() {
-        return $FactoryFinder.find(SAXParserFactory.class, DEFAULT_IMPL);
-    }
-
-    public static SAXParserFactory newInstance(String factoryClassName, ClassLoader classLoader) {
-        return $FactoryFinder.newInstance(SAXParserFactory.class, factoryClassName, classLoader, false);
-    }
-
-
-    public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException;
-
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    public void setNamespaceAware(boolean awareness) {
-        this.namespaceAware = awareness;
-    }
-
-    public boolean isValidating() {
-        return validating;
-    }
-
-    public void setValidating(boolean validating) {
-        this.validating = validating;
-    }
-
-    public abstract void setFeature(String name, boolean value)
-            throws ParserConfigurationException, SAXNotRecognizedException,
-            SAXNotSupportedException;
-
-    public abstract boolean getFeature(String name)
-            throws ParserConfigurationException, SAXNotRecognizedException,
-            SAXNotSupportedException;
-
-
-    public Schema getSchema() {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-    }
-
-    public void setSchema(Schema schema) {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-    }
-
-    public boolean isXIncludeAware() {
-        throw new UnsupportedOperationException(
-                "This parser does not support specification \""
-                        + this.getClass().getPackage().getSpecificationTitle()
-                        + "\" version \""
-                        + this.getClass().getPackage().getSpecificationVersion()
-                        + "\""
-        );
-    }
-
-    public void setXIncludeAware(final boolean state) {
-        if (state) {
-            throw new UnsupportedOperationException(" setXIncludeAware " +
-                    "is not supported on this JAXP" +
-                    " implementation or earlier: " + this.getClass());
-        }
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/stream/$FactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/stream/$FactoryFinder.java
deleted file mode 100644
index 919cba8d99..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/stream/$FactoryFinder.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * 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 javax.xml.stream;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class $FactoryFinder {
-    
-    private static final String DEFAULT_PACKAGE = "com.sun.xml.internal.";
-    
-    private static final Logger LOGGER = Logger.getLogger("javax.xml.stream");
-    
-    final private static Properties cacheProps = new Properties();
-    
-    private static volatile boolean firstTime = true;
-    
-    static private Class getProviderClass(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException {
-        try {
-            if (cl == null) {
-                if (useBSClsLoader) {
-                    return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-                } else {
-                    cl = getContextClassLoader();
-                    if (cl == null) {
-                        throw new ClassNotFoundException();
-                    }
-                    else {
-                        return Class.forName(className, false, cl);
-                    }
-                }
-            }
-            else {
-                return Class.forName(className, false, cl);
-            }
-        }
-        catch (ClassNotFoundException e1) {
-            if (doFallback) {
-                return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-            }
-            else {
-                throw e1;
-            }
-        }
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback) throws FactoryConfigurationError {
-        return newInstance(type, className, cl, doFallback, false);
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws FactoryConfigurationError {
-        assert type != null;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                cl = null;
-                useBSClsLoader = true;
-            }
-        }
-        try {
-            Class<?> providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
-            if (!type.isAssignableFrom(providerClass)) {
-                throw new ClassCastException(className + " cannot be cast to " + type.getName());
-            }
-            Object instance = providerClass.getConstructor().newInstance();
-            final ClassLoader clD = cl;
-            LOGGER.fine(() -> "created new instance of " + providerClass + " using ClassLoader: " + clD);
-            return type.cast(instance);
-        }
-        catch (ClassNotFoundException x) {
-            throw new FactoryConfigurationError("Provider " + className + " not found", x);
-        }
-        catch (Exception x) {
-            throw new FactoryConfigurationError("Provider " + className + " could not be instantiated: " + x, x);
-        }
-    }
-
-
-    static <T> T find(Class<T> type, String fallbackClassName) throws FactoryConfigurationError {
-        return find(type, type.getName(), null, fallbackClassName);
-    }
-
-    static <T> T find(Class<T> type, String factoryId, ClassLoader cl, String fallbackClassName) throws FactoryConfigurationError
-    {
-        try {
-            // If we are deployed into an OSGi environment, leverage it
-            Class<? extends T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(type, factoryId);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable e) {
-        }
-
-        try {
-            final String systemProp;
-            if (type.getName().equals(factoryId)) {
-                systemProp = getSystemProperty(factoryId);
-            } else {
-                systemProp = System.getProperty(factoryId);
-            }
-            if (systemProp != null) {
-                LOGGER.fine(() -> "found system property, value=" + systemProp);
-                return newInstance(type, systemProp, cl, true);
-            }
-        }
-        catch (SecurityException se) {
-            throw new FactoryConfigurationError("Failed to read factoryId '" + factoryId + "'", se);
-        }
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        firstTime = false;
-                        String javaHome = getSystemProperty("java.home");
-                        String configFile;
-                        configFile = javaHome + File.separator + "conf" + File.separator + "jaxp.properties";
-                        File jaxp = new File(configFile);
-                        if (doesFileExist(jaxp)) {
-                            cacheProps.load(getFileInputStream(jaxp));
-                        }
-                        configFile = javaHome + File.separator + "conf" + File.separator + "stax.properties";
-                        File stax = new File(configFile);
-                        if (doesFileExist(stax)) {
-                            cacheProps.load(getFileInputStream(stax));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(factoryId);
-            if (factoryClassName != null) {
-                return newInstance(type, factoryClassName, cl, true);
-            }
-        }
-        catch (Exception ex) {
-            LOGGER.log(Level.FINE, "Error loading JDK properties file", ex);
-        }
-        if (type.getName().equals(factoryId)) {
-            final T provider = findServiceProvider(type, cl);
-            if (provider != null) {
-                return provider;
-            }
-        } else {
-            assert fallbackClassName == null;
-        }
-        if (fallbackClassName == null) {
-            throw new FactoryConfigurationError("Provider for " + factoryId + " cannot be found", null);
-        }
-        LOGGER.fine(() -> "loaded from fallback value: " + fallbackClassName);
-        return newInstance(type, fallbackClassName, cl, true);
-    }
-
-    
-    private static <T> T findServiceProvider(final Class<T> type, final ClassLoader cl) {
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<T>) () -> {
-                final ServiceLoader<T> serviceLoader;
-                serviceLoader = ServiceLoader.load(type, cl != null ? cl : Thread.currentThread().getContextClassLoader());
-                final Iterator<T> iterator = serviceLoader.iterator();
-                if (iterator.hasNext()) {
-                    return iterator.next();
-                } else {
-                    return null;
-                }
-            });
-        } catch(ServiceConfigurationError e) {
-            final RuntimeException x = new RuntimeException("Provider for " + type + " cannot be created", e);
-            throw new FactoryConfigurationError(x, x.getMessage());
-          }
-      }
-
-    private static ClassLoader getContextClassLoader() throws SecurityException{
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException)e.getException();
-        }
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/stream/XMLEventFactory.java b/specs/javaxml/src/main/java/javax/xml/stream/XMLEventFactory.java
deleted file mode 100644
index f08eadd29e..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/stream/XMLEventFactory.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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 javax.xml.stream;
-
-import java.util.Iterator;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.events.*;
-
-public abstract class XMLEventFactory {
-
-    private static final String DEFAULT_IMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
-
-    protected XMLEventFactory(){}
-
-    public static XMLEventFactory newDefaultFactory() {
-        return $FactoryFinder.newInstance(XMLEventFactory.class, DEFAULT_IMPL, null, false, true);
-    }
-
-    public static XMLEventFactory newInstance() throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLEventFactory.class, DEFAULT_IMPL);
-    }
-
-    public static XMLEventFactory newFactory() throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLEventFactory.class, DEFAULT_IMPL);
-    }
-
-    @Deprecated
-    public static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
-    }
-
-    public static XMLEventFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
-    }
-
-    public abstract void setLocation(Location location);
-
-    public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value);
-
-    public abstract Attribute createAttribute(String localName, String value);
-
-    public abstract Attribute createAttribute(QName name, String value);
-
-    public abstract Namespace createNamespace(String namespaceURI);
-    
-    public abstract Namespace createNamespace(String prefix, String namespaceUri);
-
-    public abstract StartElement createStartElement(QName name, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> namespaces);
-
-    public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName);
-    
-    public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> namespaces);
-
-    public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> namespaces, NamespaceContext context);
-
-    public abstract EndElement createEndElement(QName name, Iterator<? extends Namespace> namespaces);
-
-    public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName);
-    
-    public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator<? extends Namespace> namespaces);
-
-    public abstract Characters createCharacters(String content);
-
-    public abstract Characters createCData(String content);
-
-    public abstract Characters createSpace(String content);
-    
-    public abstract Characters createIgnorableSpace(String content);
-
-    public abstract StartDocument createStartDocument();
-
-    public abstract StartDocument createStartDocument(String encoding, String version, boolean standalone);
-
-    public abstract StartDocument createStartDocument(String encoding, String version);
-
-    public abstract StartDocument createStartDocument(String encoding);
-
-    public abstract EndDocument createEndDocument();
-
-    public abstract EntityReference createEntityReference(String name, EntityDeclaration declaration);
-    
-    public abstract Comment createComment(String text);
-
-    public abstract ProcessingInstruction createProcessingInstruction(String target, String data);
-
-    public abstract DTD createDTD(String dtd);
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/stream/XMLInputFactory.java b/specs/javaxml/src/main/java/javax/xml/stream/XMLInputFactory.java
deleted file mode 100644
index 1b87e3c3b3..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/stream/XMLInputFactory.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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 javax.xml.stream;
-
-import javax.xml.stream.util.XMLEventAllocator;
-import javax.xml.transform.Source;
-
-public abstract class XMLInputFactory {
-    
-    public static final String IS_NAMESPACE_AWARE= "javax.xml.stream.isNamespaceAware";
-
-    public static final String IS_VALIDATING= "javax.xml.stream.isValidating";
-
-    public static final String IS_COALESCING= "javax.xml.stream.isCoalescing";
-
-    public static final String IS_REPLACING_ENTITY_REFERENCES= "javax.xml.stream.isReplacingEntityReferences";
-
-    public static final String IS_SUPPORTING_EXTERNAL_ENTITIES= "javax.xml.stream.isSupportingExternalEntities";
-
-    public static final String SUPPORT_DTD= "javax.xml.stream.supportDTD";
-
-    public static final String REPORTER= "javax.xml.stream.reporter";
-
-    public static final String RESOLVER= "javax.xml.stream.resolver";
-
-    public static final String ALLOCATOR= "javax.xml.stream.allocator";
-
-    private static final String DEFAULT_IMPL = "com.sun.xml.internal.stream.XMLInputFactoryImpl";
-
-    protected XMLInputFactory(){}
-
-    private static void setProperties(XMLInputFactory factory) {
-        factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);
-        factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
-        factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
-        factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
-        factory.setXMLResolver((publicID, systemID, baseURI, namespace) -> {
-            throw new XMLStreamException("Reading external entities is disabled");
-        });
-    }
-    
-    public static XMLInputFactory newDefaultFactory() {
-        XMLInputFactory factory = $FactoryFinder.newInstance(XMLInputFactory.class, DEFAULT_IMPL, null, false, true);
-        setProperties(factory);
-        return factory;
-    }
-    
-    public static XMLInputFactory newInstance() throws FactoryConfigurationError {
-        XMLInputFactory factory = $FactoryFinder.find(XMLInputFactory.class, DEFAULT_IMPL);
-        setProperties(factory);
-        return factory;
-    }
-
-    @Deprecated
-    public static XMLInputFactory newFactory() throws FactoryConfigurationError {
-        return newInstance();
-    }
-
-    public static XMLInputFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        XMLInputFactory factory = $FactoryFinder.find(XMLInputFactory.class, factoryId, classLoader, null);
-        setProperties(factory);
-        return factory;
-    }
-
-    @Deprecated
-    public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        return newFactory(factoryId, classLoader);
-    }
-    
-    public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException;
-    
-    public abstract XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException;
-    
-    public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException;
-
-    public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, String encoding) throws XMLStreamException;
-    
-    public abstract XMLStreamReader createXMLStreamReader(String systemId, java.io.InputStream stream) throws XMLStreamException;
-
-    public abstract XMLStreamReader createXMLStreamReader(String systemId, java.io.Reader reader) throws XMLStreamException;
-
-    public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException;
-
-    public abstract XMLEventReader createXMLEventReader(String systemId, java.io.Reader reader) throws XMLStreamException;
-    
-    public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException;
-
-    public abstract XMLEventReader createXMLEventReader(Source source) throws XMLStreamException;
-
-    public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) throws XMLStreamException;
-    
-    public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) throws XMLStreamException;
-    
-    public abstract XMLEventReader createXMLEventReader(String systemId, java.io.InputStream stream) throws XMLStreamException;
-
-    public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException;
-    
-    public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException;
-    
-    public abstract XMLResolver getXMLResolver();
-
-    public abstract void  setXMLResolver(XMLResolver resolver);
-    
-    public abstract XMLReporter getXMLReporter();
-
-    public abstract void setXMLReporter(XMLReporter reporter);
-
-    public abstract void setProperty(java.lang.String name, Object value) throws IllegalArgumentException;
-    
-    public abstract Object getProperty(java.lang.String name) throws IllegalArgumentException;
-
-    public abstract boolean isPropertySupported(String name);
-
-    public abstract void setEventAllocator(XMLEventAllocator allocator);
-
-    public abstract XMLEventAllocator getEventAllocator();
-
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/stream/XMLOutputFactory.java b/specs/javaxml/src/main/java/javax/xml/stream/XMLOutputFactory.java
deleted file mode 100644
index 69ccca38f2..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/stream/XMLOutputFactory.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 javax.xml.stream;
-
-import javax.xml.transform.Result;
-import java.io.OutputStream;
-import java.io.Writer;
-
-public abstract class XMLOutputFactory {
-
-    public static final String IS_REPAIRING_NAMESPACES = "javax.xml.stream.isRepairingNamespaces";
-
-    private static final String DEFAULT_IMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl";
-
-    protected XMLOutputFactory() {
-    }
-
-    public static XMLOutputFactory newDefaultFactory() {
-        return $FactoryFinder.newInstance(XMLOutputFactory.class, DEFAULT_IMPL, null, false, true);
-    }
-
-    public static XMLOutputFactory newInstance() throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLOutputFactory.class, DEFAULT_IMPL);
-    }
-
-    public static XMLOutputFactory newFactory() throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLOutputFactory.class, DEFAULT_IMPL);
-    }
-
-    @Deprecated
-    public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLInputFactory.class, factoryId, classLoader, null);
-    }
-
-    public static XMLOutputFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError {
-        return $FactoryFinder.find(XMLOutputFactory.class, factoryId, classLoader, null);
-    }
-
-    public abstract XMLStreamWriter createXMLStreamWriter(Writer stream) throws XMLStreamException;
-
-    public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream) throws XMLStreamException;
-
-    public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream, String encoding) throws XMLStreamException;
-
-    public abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException;
-
-    public abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException;
-
-    public abstract XMLEventWriter createXMLEventWriter(OutputStream stream) throws XMLStreamException;
-
-    public abstract XMLEventWriter createXMLEventWriter(OutputStream stream, String encoding) throws XMLStreamException;
-
-    public abstract XMLEventWriter createXMLEventWriter(Writer stream) throws XMLStreamException;
-
-    public abstract void setProperty(String name, Object value) throws IllegalArgumentException;
-
-    public abstract Object getProperty(String name) throws IllegalArgumentException;
-
-    public abstract boolean isPropertySupported(String name);
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/transform/$FactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/transform/$FactoryFinder.java
deleted file mode 100644
index 20f3b87720..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/transform/$FactoryFinder.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * 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 javax.xml.transform;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.function.Supplier;
-
-class $FactoryFinder {
-
-    private static final String DEFAULT_PACKAGE = "com.sun.xml.internal.";
-
-    private static boolean debug;
-
-    final private static Properties cacheProps = new Properties();
-
-    private static volatile boolean firstTime = true;
-
-    static {
-        try {
-            String val = getSystemProperty("jaxp.debug");
-            debug = val != null && !"false".equals(val);
-        } catch (SecurityException se) {
-            debug = false;
-        }
-    }
-
-    private static void dPrint(Supplier<String> msgGen) {
-        if (debug) {
-            System.err.println("JAXP: " + msgGen.get());
-        }
-    }
-
-
-    static private Class getProviderClass(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException {
-        try {
-            if (cl == null) {
-                if (useBSClsLoader) {
-                    return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-                } else {
-                    cl = getContextClassLoader();
-                    if (cl == null) {
-                        throw new ClassNotFoundException();
-                    } else {
-                        return Class.forName(className, false, cl);
-                    }
-                }
-            } else {
-                return Class.forName(className, false, cl);
-            }
-        } catch (ClassNotFoundException e1) {
-            if (doFallback) {
-                return Class.forName(className, false, $FactoryFinder.class.getClassLoader());
-            } else {
-                throw e1;
-            }
-        }
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback) {
-        return newInstance(type, className, cl, doFallback, false);
-    }
-
-
-    static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) {
-        assert type != null;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                cl = null;
-                useBSClsLoader = true;
-            }
-        }
-        try {
-            Class<?> providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
-            if (!type.isAssignableFrom(providerClass)) {
-                throw new ClassCastException(className + " cannot be cast to " + type.getName());
-            }
-            Object instance = providerClass.getConstructor().newInstance();
-            final ClassLoader clD = cl;
-            dPrint(() -> "created new instance of " + providerClass + " using ClassLoader: " + clD);
-            return type.cast(instance);
-        } catch (ClassNotFoundException x) {
-            throw new TransformerFactoryConfigurationError(x, "Provider " + className + " not found");
-        } catch (Exception x) {
-            throw new TransformerFactoryConfigurationError(x, "Provider " + className + " could not be instantiated: " + x);
-        }
-    }
-
-
-    static <T> T find(Class<T> type, String fallbackClassName) {
-        return find(type, type.getName(), null, fallbackClassName);
-    }
-
-    static <T> T find(Class<T> type, String factoryId, ClassLoader cl, String fallbackClassName) {
-        try {
-            // If we are deployed into an OSGi environment, leverage it
-            Class<? extends T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(type, factoryId);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable e) {
-        }
-
-        try {
-            final String systemProp;
-            if (type.getName().equals(factoryId)) {
-                systemProp = getSystemProperty(factoryId);
-            } else {
-                systemProp = System.getProperty(factoryId);
-            }
-            if (systemProp != null) {
-                dPrint(() -> "found system property, value=" + systemProp);
-                return newInstance(type, systemProp, cl, true);
-            }
-        } catch (SecurityException se) {
-            throw new TransformerFactoryConfigurationError(se, "Failed to read factoryId '" + factoryId + "'");
-        }
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        firstTime = false;
-                        String javaHome = getSystemProperty("java.home");
-                        String configFile;
-                        configFile = javaHome + File.separator + "conf" + File.separator + "jaxp.properties";
-                        File jaxp = new File(configFile);
-                        if (doesFileExist(jaxp)) {
-                            cacheProps.load(getFileInputStream(jaxp));
-                        }
-                        configFile = javaHome + File.separator + "conf" + File.separator + "stax.properties";
-                        File stax = new File(configFile);
-                        if (doesFileExist(stax)) {
-                            cacheProps.load(getFileInputStream(stax));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(factoryId);
-            if (factoryClassName != null) {
-                return newInstance(type, factoryClassName, cl, true);
-            }
-        } catch (Exception ex) {
-            if (debug) ex.printStackTrace();
-        }
-        if (type.getName().equals(factoryId)) {
-            final T provider = findServiceProvider(type, cl);
-            if (provider != null) {
-                return provider;
-            }
-        } else {
-            assert fallbackClassName == null;
-        }
-        if (fallbackClassName == null) {
-            throw new TransformerFactoryConfigurationError("Provider for " + factoryId + " cannot be found");
-        }
-        dPrint(() -> "loaded from fallback value: " + fallbackClassName);
-        return newInstance(type, fallbackClassName, cl, true);
-    }
-
-
-    private static <T> T findServiceProvider(final Class<T> type, final ClassLoader cl) {
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<T>) () -> {
-                final ServiceLoader<T> serviceLoader;
-                if (cl == null) {
-                    serviceLoader = ServiceLoader.load(type);
-                } else {
-                    serviceLoader = ServiceLoader.load(type, cl);
-                }
-                final Iterator<T> iterator = serviceLoader.iterator();
-                if (iterator.hasNext()) {
-                    return iterator.next();
-                } else {
-                    return null;
-                }
-            });
-        } catch (ServiceConfigurationError e) {
-            final RuntimeException x = new RuntimeException("Provider for " + type + " cannot be created", e);
-            throw new TransformerFactoryConfigurationError(x, x.getMessage());
-        }
-    }
-
-    private static ClassLoader getContextClassLoader() throws SecurityException {
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException) e.getException();
-        }
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/transform/TransformerFactory.java b/specs/javaxml/src/main/java/javax/xml/transform/TransformerFactory.java
deleted file mode 100644
index 886b07b0db..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/transform/TransformerFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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 javax.xml.transform;
-
-public abstract class TransformerFactory {
-
-    private static final String DEFAULT_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
-
-    protected TransformerFactory() {
-    }
-
-    public static TransformerFactory newDefaultInstance() {
-        return $FactoryFinder.newInstance(TransformerFactory.class, DEFAULT_IMPL, null, false, true);
-    }
-
-    public static TransformerFactory newInstance() throws TransformerFactoryConfigurationError {
-        return $FactoryFinder.find(TransformerFactory.class, DEFAULT_IMPL);
-    }
-
-    public static TransformerFactory newInstance(String factoryClassName, ClassLoader classLoader) throws TransformerFactoryConfigurationError {
-        return $FactoryFinder.newInstance(TransformerFactory.class, factoryClassName, classLoader, false, false);
-    }
-
-    public abstract Transformer newTransformer(Source source) throws TransformerConfigurationException;
-
-    public abstract Transformer newTransformer() throws TransformerConfigurationException;
-
-    public abstract Templates newTemplates(Source source) throws TransformerConfigurationException;
-
-    public abstract Source getAssociatedStylesheet(Source source, String media, String title, String charset) throws TransformerConfigurationException;
-
-    public abstract void setURIResolver(URIResolver resolver);
-
-    public abstract URIResolver getURIResolver();
-
-    public abstract void setFeature(String name, boolean value) throws TransformerConfigurationException;
-
-    public abstract boolean getFeature(String name);
-
-    public abstract void setAttribute(String name, Object value);
-
-    public abstract Object getAttribute(String name);
-
-    public abstract void setErrorListener(ErrorListener listener);
-
-    public abstract ErrorListener getErrorListener();
-
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/validation/$SchemaFactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/validation/$SchemaFactoryFinder.java
deleted file mode 100644
index d96ccfd0a8..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/validation/$SchemaFactoryFinder.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * 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 javax.xml.validation;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-import java.security.*;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.function.Supplier;
-
-class $SchemaFactoryFinder {
-
-    private static boolean debug = false;
-    private static final String DEFAULT_PACKAGE = "com.sun.org.apache.xerces.internal";
-    private static final Properties cacheProps = new Properties();
-
-    private static volatile boolean firstTime = true;
-
-    static {
-        try {
-            debug = getSystemProperty("jaxp.debug") != null;
-        } catch (Exception unused) {
-            debug = false;
-        }
-    }
-
-    private static void debugPrintln(Supplier<String> msgGen) {
-        if (debug) {
-            System.err.println("JAXP: " + msgGen.get());
-        }
-    }
-
-    private final ClassLoader classLoader;
-
-    public $SchemaFactoryFinder(ClassLoader loader) {
-        this.classLoader = loader;
-        if (debug) {
-            debugDisplayClassLoader();
-        }
-    }
-
-    private void debugDisplayClassLoader() {
-        try {
-            if (classLoader == getContextClassLoader()) {
-                debugPrintln(() -> "using thread context class loader (" + classLoader + ") for search");
-                return;
-            }
-        } catch (Throwable unused) {
-        }
-
-        if (classLoader == ClassLoader.getSystemClassLoader()) {
-            debugPrintln(() -> "using system class loader (" + classLoader + ") for search");
-            return;
-        }
-
-        debugPrintln(() -> "using class loader (" + classLoader + ") for search");
-    }
-
-    public SchemaFactory newFactory(String schemaLanguage) {
-        if (schemaLanguage == null) {
-            throw new NullPointerException();
-        }
-        SchemaFactory f = _newFactory(schemaLanguage);
-        if (f != null) {
-            debugPrintln(() -> "factory '" + f.getClass().getName() + "' was found for " + schemaLanguage);
-        } else {
-            debugPrintln(() -> "unable to find a factory for " + schemaLanguage);
-        }
-        return f;
-    }
-
-    private SchemaFactory _newFactory(String schemaLanguage) {
-        SchemaFactory sf;
-
-        String propertyName = SERVICE_CLASS.getName() + ":" + schemaLanguage;
-
-        try {
-            debugPrintln(() -> "Looking up system property '" + propertyName + "'");
-            String r = getSystemProperty(propertyName);
-            if (r != null) {
-                debugPrintln(() -> "The value is '" + r + "'");
-                sf = createInstance(r, true);
-                if (sf != null) return sf;
-            } else
-                debugPrintln(() -> "The property is undefined.");
-        } catch (Throwable t) {
-            if (debug) {
-                debugPrintln(() -> "failed to look up system property '" + propertyName + "'");
-                t.printStackTrace();
-            }
-        }
-
-        String javah = getSystemProperty("java.home");
-        String configFile = javah + File.separator +
-                "conf" + File.separator + "jaxp.properties";
-
-
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        File f = new File(configFile);
-                        firstTime = false;
-                        if (doesFileExist(f)) {
-                            debugPrintln(() -> "Read properties file " + f);
-                            cacheProps.load(getFileInputStream(f));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(propertyName);
-            debugPrintln(() -> "found " + factoryClassName + " in $java.home/conf/jaxp.properties");
-
-            if (factoryClassName != null) {
-                sf = createInstance(factoryClassName, true);
-                if (sf != null) {
-                    return sf;
-                }
-            }
-        } catch (Exception ex) {
-            if (debug) {
-                ex.printStackTrace();
-            }
-        }
-
-        final SchemaFactory factoryImpl = findServiceProvider(schemaLanguage);
-
-
-        if (factoryImpl != null) {
-            return factoryImpl;
-        }
-
-        if (schemaLanguage.equals("http://www.w3.org/2001/XMLSchema")) {
-            debugPrintln(() -> "attempting to use the platform default XML Schema validator");
-            return createInstance("com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory", true);
-        }
-
-        debugPrintln(() -> "all things were tried, but none was found. bailing out.");
-        return null;
-    }
-
-    private Class<?> createClass(String className) {
-        Class<?> clazz;
-        boolean internal = false;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                internal = true;
-            }
-        }
-
-        try {
-            if (classLoader != null && !internal) {
-                clazz = Class.forName(className, false, classLoader);
-            } else {
-                clazz = Class.forName(className);
-            }
-        } catch (Throwable t) {
-            if (debug) {
-                t.printStackTrace();
-            }
-            return null;
-        }
-
-        return clazz;
-    }
-
-    SchemaFactory createInstance(String className) {
-        return createInstance(className, false);
-    }
-
-    SchemaFactory createInstance(String className, boolean useServicesMechanism) {
-        SchemaFactory schemaFactory = null;
-
-        debugPrintln(() -> "createInstance(" + className + ")");
-
-        Class<?> clazz = createClass(className);
-        if (clazz == null) {
-            debugPrintln(() -> "failed to getClass(" + className + ")");
-            return null;
-        }
-        debugPrintln(() -> "loaded " + className + " from " + which(clazz));
-
-        try {
-            if (!SchemaFactory.class.isAssignableFrom(clazz)) {
-                throw new ClassCastException(clazz.getName()
-                        + " cannot be cast to " + SchemaFactory.class);
-            }
-            if (!useServicesMechanism) {
-                schemaFactory = newInstanceNoServiceLoader(clazz);
-            }
-            if (schemaFactory == null) {
-                schemaFactory = (SchemaFactory) clazz.newInstance();
-            }
-        } catch (ClassCastException | IllegalAccessException | InstantiationException classCastException) {
-            debugPrintln(() -> "could not instantiate " + clazz.getName());
-            if (debug) {
-                classCastException.printStackTrace();
-            }
-            return null;
-        }
-
-        return schemaFactory;
-    }
-
-    private static SchemaFactory newInstanceNoServiceLoader(
-            Class<?> providerClass
-    ) {
-        if (System.getSecurityManager() == null) {
-            return null;
-        }
-        try {
-            final Method creationMethod =
-                    providerClass.getDeclaredMethod(
-                            "newXMLSchemaFactoryNoServiceLoader"
-                    );
-            final int modifiers = creationMethod.getModifiers();
-
-            if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
-                return null;
-            }
-
-            // Only calls "newXMLSchemaFactoryNoServiceLoader" if it's
-            final Class<?> returnType = creationMethod.getReturnType();
-            if (SERVICE_CLASS.isAssignableFrom(returnType)) {
-                return SERVICE_CLASS.cast(creationMethod.invoke(null, (Object[]) null));
-            } else {
-                throw new ClassCastException(returnType
-                        + " cannot be cast to " + SERVICE_CLASS);
-            }
-        } catch (ClassCastException e) {
-            throw new SchemaFactoryConfigurationError(e.getMessage(), e);
-        } catch (Exception exc) {
-            return null;
-        }
-    }
-
-    private boolean isSchemaLanguageSupportedBy(final SchemaFactory factory,
-                                                final String schemaLanguage,
-                                                AccessControlContext acc) {
-        return AccessController.doPrivileged(
-            (PrivilegedAction<Boolean>) () -> factory.isSchemaLanguageSupported(schemaLanguage), acc);
-    }
-
-    private SchemaFactory findServiceProvider(final String schemaLanguage) {
-        assert schemaLanguage != null;
-        final AccessControlContext acc = AccessController.getContext();
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<SchemaFactory>) () -> {
-                final ServiceLoader<SchemaFactory> loader =
-                        ServiceLoader.load(SERVICE_CLASS);
-                for (SchemaFactory factory : loader) {
-                    if (isSchemaLanguageSupportedBy(factory, schemaLanguage, acc)) {
-                        return factory;
-                    }
-                }
-                return null;
-            });
-        } catch (ServiceConfigurationError error) {
-            throw new SchemaFactoryConfigurationError(
-                    "Provider for " + SERVICE_CLASS + " cannot be created", error);
-        }
-    }
-
-    private static final Class<SchemaFactory> SERVICE_CLASS = SchemaFactory.class;
-
-
-    private static String which(Class<?> clazz) {
-        return getClassSource(clazz);
-    }
-
-    static ClassLoader getContextClassLoader() throws SecurityException {
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException)e.getException();
-        }
-    }
-
-    private static String getClassSource(Class<?> cls) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> {
-            CodeSource cs = cls.getProtectionDomain().getCodeSource();
-            if (cs != null) {
-                URL loc = cs.getLocation();
-                return loc != null ? loc.toString() : "(no location)";
-            } else {
-                return "(no code source)";
-            }
-        });
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/validation/SchemaFactory.java b/specs/javaxml/src/main/java/javax/xml/validation/SchemaFactory.java
deleted file mode 100644
index da93cc62e4..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/validation/SchemaFactory.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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 javax.xml.validation;
-
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import java.io.File;
-import java.net.URL;
-
-public abstract class SchemaFactory {
-
-    private static final String DEFAULT_IMPL = "com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory";
-
-    protected SchemaFactory() {
-    }
-
-    public static SchemaFactory newDefaultInstance() {
-        return new $SchemaFactoryFinder(null).createInstance(DEFAULT_IMPL, true);
-    }
-
-    public static SchemaFactory newInstance(String schemaLanguage) {
-        ClassLoader cl = $SchemaFactoryFinder.getContextClassLoader();
-        if (cl == null) {
-            cl = SchemaFactory.class.getClassLoader();
-        }
-        SchemaFactory f = new $SchemaFactoryFinder(cl).newFactory(schemaLanguage);
-        if (f == null) {
-            throw new IllegalArgumentException(
-                    "No SchemaFactory"
-                            + " that implements the schema language specified by: " + schemaLanguage
-                            + " could be loaded");
-        }
-        return f;
-    }
-
-    public static SchemaFactory newInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader) {
-        ClassLoader cl = classLoader;
-        if (cl == null) {
-            cl = $SchemaFactoryFinder.getContextClassLoader();
-        }
-        SchemaFactory f = new $SchemaFactoryFinder(cl).createInstance(factoryClassName);
-        if (f == null) {
-            throw new IllegalArgumentException(
-                    "Factory " + factoryClassName
-                            + " could not be loaded to implement the schema language specified by: " + schemaLanguage);
-        }
-        if (f.isSchemaLanguageSupported(schemaLanguage)) {
-            return f;
-        } else {
-            throw new IllegalArgumentException(
-                    "Factory " + f.getClass().getName()
-                            + " does not implement the schema language specified by: " + schemaLanguage);
-        }
-
-    }
-
-    public abstract boolean isSchemaLanguageSupported(String schemaLanguage);
-
-    public boolean getFeature(String name)
-            throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (name == null) {
-            throw new NullPointerException("the name parameter is null");
-        }
-        throw new SAXNotRecognizedException(name);
-    }
-
-    public void setFeature(String name, boolean value)
-            throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (name == null) {
-            throw new NullPointerException("the name parameter is null");
-        }
-        throw new SAXNotRecognizedException(name);
-    }
-
-    public void setProperty(String name, Object object)
-            throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (name == null) {
-            throw new NullPointerException("the name parameter is null");
-        }
-        throw new SAXNotRecognizedException(name);
-    }
-
-    public Object getProperty(String name)
-            throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (name == null) {
-            throw new NullPointerException("the name parameter is null");
-        }
-        throw new SAXNotRecognizedException(name);
-    }
-
-    public abstract void setErrorHandler(ErrorHandler errorHandler);
-
-    public abstract ErrorHandler getErrorHandler();
-
-    public abstract void setResourceResolver(LSResourceResolver resourceResolver);
-
-    public abstract LSResourceResolver getResourceResolver();
-
-    public Schema newSchema(Source schema) throws SAXException {
-        return newSchema(new Source[]{schema});
-    }
-
-    public Schema newSchema(File schema) throws SAXException {
-        return newSchema(new StreamSource(schema));
-    }
-
-    public Schema newSchema(URL schema) throws SAXException {
-        return newSchema(new StreamSource(schema.toExternalForm()));
-    }
-
-    public abstract Schema newSchema(Source[] schemas) throws SAXException;
-
-    public abstract Schema newSchema() throws SAXException;
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/xpath/$XPathFactoryFinder.java b/specs/javaxml/src/main/java/javax/xml/xpath/$XPathFactoryFinder.java
deleted file mode 100644
index f6cc156bf3..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/xpath/$XPathFactoryFinder.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * 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 javax.xml.xpath;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-import java.security.*;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.function.Supplier;
-
-class $XPathFactoryFinder {
-    private static final String DEFAULT_PACKAGE = "com.sun.org.apache.xpath.internal";
-
-    private static boolean debug = false;
-
-    static {
-        try {
-            debug = getSystemProperty("jaxp.debug") != null;
-        } catch (Exception unused) {
-            debug = false;
-        }
-    }
-
-    private static final Properties cacheProps = new Properties();
-
-    private volatile static boolean firstTime = true;
-
-    private static void debugPrintln(Supplier<String> msgGen) {
-        if (debug) {
-            System.err.println("JAXP: " + msgGen.get());
-        }
-    }
-
-    private final ClassLoader classLoader;
-
-    public $XPathFactoryFinder(ClassLoader loader) {
-        this.classLoader = loader;
-        if (debug) {
-            debugDisplayClassLoader();
-        }
-    }
-
-    private void debugDisplayClassLoader() {
-        try {
-            if (classLoader == getContextClassLoader()) {
-                debugPrintln(() -> "using thread context class loader (" + classLoader + ") for search");
-                return;
-            }
-        } catch (Throwable unused) {
-        }
-
-        if (classLoader == ClassLoader.getSystemClassLoader()) {
-            debugPrintln(() -> "using system class loader (" + classLoader + ") for search");
-            return;
-        }
-
-        debugPrintln(() -> "using class loader (" + classLoader + ") for search");
-    }
-
-    public XPathFactory newFactory(String uri) throws XPathFactoryConfigurationException {
-        if (uri == null) {
-            throw new NullPointerException();
-        }
-        XPathFactory f = _newFactory(uri);
-        if (f != null) {
-            debugPrintln(() -> "factory '" + f.getClass().getName() + "' was found for " + uri);
-        } else {
-            debugPrintln(() -> "unable to find a factory for " + uri);
-        }
-        return f;
-    }
-
-    private XPathFactory _newFactory(String uri) throws XPathFactoryConfigurationException {
-        XPathFactory xpathFactory = null;
-
-        String propertyName = SERVICE_CLASS.getName() + ":" + uri;
-
-        try {
-            debugPrintln(() -> "Looking up system property '" + propertyName + "'");
-            String r = getSystemProperty(propertyName);
-            if (r != null) {
-                debugPrintln(() -> "The value is '" + r + "'");
-                xpathFactory = createInstance(r, true);
-                if (xpathFactory != null) {
-                    return xpathFactory;
-                }
-            } else
-                debugPrintln(() -> "The property is undefined.");
-        } catch (Throwable t) {
-            if (debug) {
-                debugPrintln(() -> "failed to look up system property '" + propertyName + "'");
-                t.printStackTrace();
-            }
-        }
-
-        String javah = getSystemProperty("java.home");
-        String configFile = javah + File.separator +
-                "conf" + File.separator + "jaxp.properties";
-
-        try {
-            if (firstTime) {
-                synchronized (cacheProps) {
-                    if (firstTime) {
-                        File f = new File(configFile);
-                        firstTime = false;
-                        if (doesFileExist(f)) {
-                            debugPrintln(() -> "Read properties file " + f);
-                            cacheProps.load(getFileInputStream(f));
-                        }
-                    }
-                }
-            }
-            final String factoryClassName = cacheProps.getProperty(propertyName);
-            debugPrintln(() -> "found " + factoryClassName + " in $java.home/conf/jaxp.properties");
-
-            if (factoryClassName != null) {
-                xpathFactory = createInstance(factoryClassName, true);
-                if (xpathFactory != null) {
-                    return xpathFactory;
-                }
-            }
-        } catch (Exception ex) {
-            if (debug) {
-                ex.printStackTrace();
-            }
-        }
-
-        assert xpathFactory == null;
-        xpathFactory = findServiceProvider(uri);
-
-
-        if (xpathFactory != null) {
-            return xpathFactory;
-        }
-
-        if (uri.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) {
-            debugPrintln(() -> "attempting to use the platform default W3C DOM XPath lib");
-            return createInstance("com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", true);
-        }
-
-        debugPrintln(() -> "all things were tried, but none was found. bailing out.");
-        return null;
-    }
-
-    private Class<?> createClass(String className) {
-        Class clazz;
-        boolean internal = false;
-        if (System.getSecurityManager() != null) {
-            if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
-                internal = true;
-            }
-        }
-
-        try {
-            if (classLoader != null && !internal) {
-                clazz = Class.forName(className, false, classLoader);
-            } else {
-                clazz = Class.forName(className);
-            }
-        } catch (Throwable t) {
-            if (debug) {
-                t.printStackTrace();
-            }
-            return null;
-        }
-
-        return clazz;
-    }
-
-    XPathFactory createInstance(String className)
-            throws XPathFactoryConfigurationException {
-        return createInstance(className, false);
-    }
-
-    XPathFactory createInstance(String className, boolean useServicesMechanism)
-            throws XPathFactoryConfigurationException {
-        XPathFactory xPathFactory = null;
-
-        debugPrintln(() -> "createInstance(" + className + ")");
-
-        Class<?> clazz = createClass(className);
-        if (clazz == null) {
-            debugPrintln(() -> "failed to getClass(" + className + ")");
-            return null;
-        }
-        debugPrintln(() -> "loaded " + className + " from " + which(clazz));
-
-        try {
-            if (!useServicesMechanism) {
-                xPathFactory = newInstanceNoServiceLoader(clazz);
-            }
-            if (xPathFactory == null) {
-                xPathFactory = (XPathFactory) clazz.newInstance();
-            }
-        } catch (ClassCastException | IllegalAccessException | InstantiationException classCastException) {
-            debugPrintln(() -> "could not instantiate " + clazz.getName());
-            if (debug) {
-                classCastException.printStackTrace();
-            }
-            return null;
-        }
-
-        return xPathFactory;
-    }
-
-    private static XPathFactory newInstanceNoServiceLoader(
-            Class<?> providerClass
-    ) throws XPathFactoryConfigurationException {
-        if (System.getSecurityManager() == null) {
-            return null;
-        }
-        try {
-            Method creationMethod =
-                    providerClass.getDeclaredMethod(
-                            "newXPathFactoryNoServiceLoader"
-                    );
-            final int modifiers = creationMethod.getModifiers();
-
-            // Do not call "newXPathFactoryNoServiceLoader" if it's
-            if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
-                return null;
-            }
-
-            // Only calls "newXPathFactoryNoServiceLoader" if it's
-            final Class<?> returnType = creationMethod.getReturnType();
-            if (SERVICE_CLASS.isAssignableFrom(returnType)) {
-                return SERVICE_CLASS.cast(creationMethod.invoke(null, (Object[]) null));
-            } else {
-                throw new ClassCastException(returnType
-                        + " cannot be cast to " + SERVICE_CLASS);
-            }
-        } catch (ClassCastException e) {
-            throw new XPathFactoryConfigurationException(e);
-        } catch (Exception exc) {
-            return null;
-        }
-    }
-
-    private boolean isObjectModelSupportedBy(final XPathFactory factory,
-                                             final String objectModel,
-                                             AccessControlContext acc) {
-        return AccessController.doPrivileged(
-            (PrivilegedAction<Boolean>) () -> factory.isObjectModelSupported(objectModel), acc);
-    }
-
-    private XPathFactory findServiceProvider(final String objectModel)
-            throws XPathFactoryConfigurationException {
-
-        assert objectModel != null;
-        final AccessControlContext acc = AccessController.getContext();
-        try {
-            return AccessController.doPrivileged((PrivilegedAction<XPathFactory>) () -> {
-                final ServiceLoader<XPathFactory> loader =
-                        ServiceLoader.load(SERVICE_CLASS);
-                for (XPathFactory factory : loader) {
-                    if (isObjectModelSupportedBy(factory, objectModel, acc)) {
-                        return factory;
-                    }
-                }
-                return null;
-            });
-        } catch (ServiceConfigurationError error) {
-            throw new XPathFactoryConfigurationException(error);
-        }
-    }
-
-    private static final Class<XPathFactory> SERVICE_CLASS = XPathFactory.class;
-
-    private static String which(Class<?> clazz) {
-        return getClassSource(clazz);
-    }
-
-    static ClassLoader getContextClassLoader() throws SecurityException{
-        return AccessController.doPrivileged((PrivilegedAction<ClassLoader>) () -> {
-            ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            if (cl == null) {
-                cl = ClassLoader.getSystemClassLoader();
-            }
-            return cl;
-        });
-    }
-
-    private static String getSystemProperty(final String propName) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(propName));
-    }
-
-    private static FileInputStream getFileInputStream(final File file) throws FileNotFoundException {
-        try {
-            return AccessController.doPrivileged((PrivilegedExceptionAction<FileInputStream>) () -> new FileInputStream(file));
-        } catch (PrivilegedActionException e) {
-            throw (FileNotFoundException)e.getException();
-        }
-    }
-
-    private static String getClassSource(Class<?> cls) {
-        return AccessController.doPrivileged((PrivilegedAction<String>) () -> {
-            CodeSource cs = cls.getProtectionDomain().getCodeSource();
-            if (cs != null) {
-                URL loc = cs.getLocation();
-                return loc != null ? loc.toString() : "(no location)";
-            } else {
-                return "(no code source)";
-            }
-        });
-    }
-
-    private static boolean doesFileExist(final File f) {
-        return AccessController.doPrivileged((PrivilegedAction<Boolean>) f::exists);
-    }
-}
diff --git a/specs/javaxml/src/main/java/javax/xml/xpath/XPathFactory.java b/specs/javaxml/src/main/java/javax/xml/xpath/XPathFactory.java
deleted file mode 100644
index c236a7c0ad..0000000000
--- a/specs/javaxml/src/main/java/javax/xml/xpath/XPathFactory.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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 javax.xml.xpath;
-
-public abstract class XPathFactory {
-
-    public static final String DEFAULT_PROPERTY_NAME = "javax.xml.xpath.XPathFactory";
-
-    public static final String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom";
-
-    private static final String DEFAULT_IMPL = "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl";
-
-    protected XPathFactory() {
-    }
-
-    public static XPathFactory newDefaultInstance() {
-        try {
-            return new $XPathFactoryFinder(null).createInstance(DEFAULT_IMPL, true);
-        } catch (XPathFactoryConfigurationException e) {
-            throw new RuntimeException(
-                    "XPathFactory#newInstance() failed to create an XPathFactory for the default object model: "
-                            + DEFAULT_OBJECT_MODEL_URI
-                            + " with the XPathFactoryConfigurationException: "
-                            + e.getMessage(), e
-            );
-        }
-    }
-
-    public static XPathFactory newInstance() {
-        try {
-            return newInstance(DEFAULT_OBJECT_MODEL_URI);
-        } catch (XPathFactoryConfigurationException e) {
-            throw new RuntimeException(
-                    "XPathFactory#newInstance() failed to create an XPathFactory for the default object model: "
-                            + DEFAULT_OBJECT_MODEL_URI
-                            + " with the XPathFactoryConfigurationException: "
-                            + e.getMessage(), e
-            );
-        }
-    }
-
-    public static XPathFactory newInstance(final String uri) throws XPathFactoryConfigurationException {
-        if (uri == null) {
-            throw new NullPointerException(
-                    "XPathFactory#newInstance(String uri) cannot be called with uri == null");
-        }
-        if (uri.length() == 0) {
-            throw new IllegalArgumentException(
-                    "XPathFactory#newInstance(String uri) cannot be called with uri == \"\"");
-        }
-        ClassLoader classLoader = $XPathFactoryFinder.getContextClassLoader();
-        if (classLoader == null) {
-            classLoader = XPathFactory.class.getClassLoader();
-        }
-        XPathFactory xpathFactory = new $XPathFactoryFinder(classLoader).newFactory(uri);
-        if (xpathFactory == null) {
-            throw new XPathFactoryConfigurationException(
-                    "No XPathFactory implementation found for the object model: "
-                            + uri);
-        }
-        return xpathFactory;
-    }
-
-    public static XPathFactory newInstance(String uri, String factoryClassName, ClassLoader classLoader) throws XPathFactoryConfigurationException {
-        ClassLoader cl = classLoader;
-        if (uri == null) {
-            throw new NullPointerException("XPathFactory#newInstance(String uri) cannot be called with uri == null");
-        }
-        if (uri.length() == 0) {
-            throw new IllegalArgumentException("XPathFactory#newInstance(String uri) cannot be called with uri == \"\"");
-        }
-        if (cl == null) {
-            cl = $XPathFactoryFinder.getContextClassLoader();
-        }
-        XPathFactory f = new $XPathFactoryFinder(cl).createInstance(factoryClassName);
-
-        if (f == null) {
-            throw new XPathFactoryConfigurationException(
-                    "No XPathFactory implementation found for the object model: "
-                            + uri);
-        }
-        if (f.isObjectModelSupported(uri)) {
-            return f;
-        } else {
-            throw new XPathFactoryConfigurationException("Factory "
-                    + factoryClassName + " doesn't support given " + uri
-                    + " object model");
-        }
-
-    }
-
-    public abstract boolean isObjectModelSupported(String objectModel);
-
-    public abstract void setFeature(String name, boolean value)
-            throws XPathFactoryConfigurationException;
-
-    public abstract boolean getFeature(String name)
-            throws XPathFactoryConfigurationException;
-
-    public abstract void setXPathVariableResolver(XPathVariableResolver resolver);
-
-    public abstract void setXPathFunctionResolver(XPathFunctionResolver resolver);
-
-    public abstract XPath newXPath();
-
-}
diff --git a/specs/javaxml/src/main/java/org/w3c/dom/ElementTraversal.java b/specs/javaxml/src/main/java/org/w3c/dom/ElementTraversal.java
deleted file mode 100644
index 16406b532d..0000000000
--- a/specs/javaxml/src/main/java/org/w3c/dom/ElementTraversal.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2009 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom;
-
-/**
- * The <code>ElementTraversal</code> interface is a set of read-only attributes
- * which allow an author to easily navigate between elements in a document.
- * <p>In conforming implementations of Element Traversal, all objects that
- * implement {@link Element} must also implement the
- * <code>ElementTraversal</code> interface. Four of the methods,
- * {@link #getFirstElementChild}, {@link #getLastElementChild},
- * {@link #getPreviousElementSibling}, and {@link #getNextElementSibling},
- * each return a live reference to another element with the defined
- * relationship to the current element, if the related element exists. The
- * fifth method, {@link #getChildElementCount}, exposes the number of child
- * elements of an element, for preprocessing before navigation.
- * <p>See also the
- * <a href='http://www.w3.org/TR/ElementTraversal/'><cite>Element Traversal Specification</cite></a>.
- */
-public interface ElementTraversal {
-
-    /**
-     * Returns the first child element node of this element. <code>null</code>
-     * if this element has no child elements.
-     */
-    Element getFirstElementChild();
-
-    /**
-     * Returns the last child element node of this element. <code>null</code>
-     * if this element has no child elements.
-     */
-    Element getLastElementChild();
-
-    /**
-     * Returns the previous sibling element node of this element.
-     * <code>null</code> if this element has no element sibling nodes that
-     * come before this one in the document tree.
-     */
-    Element getPreviousElementSibling();
-
-    /**
-     * Returns the next sibling element node of this element.
-     * <code>null</code> if this element has no element sibling nodes that
-     * come after this one in the document tree.
-     */
-    Element getNextElementSibling();
-
-    /**
-     * Returns the current number of element nodes that are children of this
-     * element. <code>0</code> if this element has no child nodes that are of
-     * <code>nodeType</code> <code>1</code>.
-     */
-    int getChildElementCount();
-}
diff --git a/specs/javaxmlws/pom.xml b/specs/javaxmlws/pom.xml
deleted file mode 100644
index 47f5b455cb..0000000000
--- a/specs/javaxmlws/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.specs</groupId>
-        <artifactId>specs</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
-    <name>Apache Karaf :: Specs :: Java Xml WS</name>
-
-    <properties>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.apache.karaf</groupId>
-                <artifactId>karaf-bom</artifactId>
-                <version>${project.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-saaj_1.3_spec</artifactId>
-            <version>1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
-            <version>1.2</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-saaj_1.3_spec</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-stax_1.0_spec</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-activation_1.1_spec</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.xml.bind</groupId>
-                    <artifactId>jaxb-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.karaf.specs</groupId>
-            <artifactId>org.apache.karaf.specs.locator</artifactId>
-        </dependency>
-    </dependencies>
-
-</project>
diff --git a/specs/javaxmlws/src/main/java/javax/xml/soap/$FactoryFinder.java b/specs/javaxmlws/src/main/java/javax/xml/soap/$FactoryFinder.java
deleted file mode 100644
index 65938dd9f7..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/soap/$FactoryFinder.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * 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 javax.xml.soap;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-class $FactoryFinder {
-
-    private static final Logger LOGGER = Logger.getLogger("javax.xml.soap");
-
-    @SuppressWarnings("unchecked")
-    static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback, String deprecatedFactoryId) throws SOAPException {
-        ClassLoader tccl = contextClassLoader();
-
-        String factoryId = factoryClass.getName();
-        String className = fromSystemProperty(factoryId, deprecatedFactoryId);
-        if (className != null) {
-            Object result = newInstance(className, defaultClassName, tccl);
-            return (T) result;
-         }
-
-        className = fromJDKProperties(factoryId, deprecatedFactoryId);
-        if (className != null) {
-            Object result = newInstance(className, defaultClassName, tccl);
-            return (T) result;
-        }
-
-        try {
-            Class<T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(factoryClass);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable t) {
-        }
-
-        T factory = firstByServiceLoader(factoryClass);
-        if (factory != null) {
-            return factory;
-        }
-
-        className = fromMetaInfServices(deprecatedFactoryId, tccl);
-        if (className != null) {
-            LOGGER.log(Level.WARNING,
-                    "Using deprecated META-INF/services mechanism with non-standard property: {0}. " +
-                            "Property {1} should be used instead.",
-                    new Object[]{deprecatedFactoryId, factoryId});
-            Object result = newInstance(className, defaultClassName, tccl);
-            return (T) result;
-        }
-
-        if (!tryFallback)
-            return null;
-
-        if (defaultClassName == null) {
-            throw new SOAPException("Provider for " + factoryId + " cannot be found", null);
-        }
-        return (T) newInstance(defaultClassName, defaultClassName, tccl);
-    }
-
-    static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException {
-        return find(factoryClass, defaultClassName, tryFallback, null);
-    }
-
-    private static String fromMetaInfServices(String deprecatedFactoryId, ClassLoader tccl) {
-        String serviceId = "META-INF/services/" + deprecatedFactoryId;
-        LOGGER.log(Level.FINE, "Checking deprecated {0} resource", serviceId);
-
-        try (InputStream is =
-                     tccl == null
-                             ? ClassLoader.getSystemResourceAsStream(serviceId)
-                             : tccl.getResourceAsStream(serviceId)) {
-
-            if (is != null) {
-                String factoryClassName;
-                try (InputStreamReader isr = new InputStreamReader(is, StandardCharsets.UTF_8);
-                     BufferedReader rd = new BufferedReader(isr)) {
-                    factoryClassName = rd.readLine();
-                }
-
-                logFound(factoryClassName);
-                if (factoryClassName != null && !"".equals(factoryClassName)) {
-                    return factoryClassName;
-                }
-            }
-        } catch (IOException e) {
-        }
-        return null;
-    }
-
-    private static String fromJDKProperties(String factoryId, String deprecatedFactoryId) {
-        Path path = null;
-        try {
-            String JAVA_HOME = getSystemProperty("java.home");
-            path = Paths.get(JAVA_HOME, "conf", "jaxm.properties");
-            LOGGER.log(Level.FINE, "Checking configuration in {0}", path);
-
-            if (!Files.exists(path)) {
-                path = Paths.get(JAVA_HOME, "lib", "jaxm.properties");
-            }
-
-            LOGGER.log(Level.FINE, "Checking configuration in {0}", path);
-            if (Files.exists(path)) {
-                Properties props = new Properties();
-                try (InputStream inputStream = Files.newInputStream(path)) {
-                    props.load(inputStream);
-                }
-
-                LOGGER.log(Level.FINE, "Checking property {0}", factoryId);
-                String factoryClassName = props.getProperty(factoryId);
-                logFound(factoryClassName);
-                if (factoryClassName != null) {
-                    return factoryClassName;
-                }
-
-                if (deprecatedFactoryId != null) {
-                    LOGGER.log(Level.FINE, "Checking deprecated property {0}", deprecatedFactoryId);
-                    factoryClassName = props.getProperty(deprecatedFactoryId);
-                    logFound(factoryClassName);
-                    if (factoryClassName != null) {
-                        LOGGER.log(Level.WARNING,
-                                "Using non-standard property: {0}. Property {1} should be used instead.",
-                                new Object[]{deprecatedFactoryId, factoryId});
-                        return factoryClassName;
-                    }
-                }
-            }
-        } catch (Exception ignored) {
-            LOGGER.log(Level.SEVERE, "Error reading SAAJ configuration from ["  + path +
-                    "] file. Check it is accessible and has correct format.", ignored);
-        }
-        return null;
-    }
-
-    private static String fromSystemProperty(String factoryId, String deprecatedFactoryId) {
-        String systemProp = getSystemProperty(factoryId);
-        if (systemProp != null) {
-            return systemProp;
-        }
-        if (deprecatedFactoryId != null) {
-            systemProp = getSystemProperty(deprecatedFactoryId);
-            if (systemProp != null) {
-                LOGGER.log(Level.WARNING,
-                        "Using non-standard property: {0}. Property {1} should be used instead.",
-                        new Object[] {deprecatedFactoryId, factoryId});
-                return systemProp;
-            }
-        }
-        return null;
-    }
-
-    private static String getSystemProperty(final String property) {
-        LOGGER.log(Level.FINE, "Checking system property {0}", property);
-        String value = AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(property));
-        logFound(value);
-        return value;
-    }
-
-    private static void logFound(String value) {
-        if (value != null) {
-            LOGGER.log(Level.FINE, "  found {0}", value);
-        } else {
-            LOGGER.log(Level.FINE, "  not found");
-        }
-    }
-
-    private static <T> T firstByServiceLoader(Class<T> spiClass) throws SOAPException {
-        LOGGER.log(Level.FINE, "Using java.util.ServiceLoader to find {0}", spiClass.getName());
-        try {
-            ServiceLoader<T> serviceLoader = ServiceLoader.load(spiClass);
-            for (T impl : serviceLoader) {
-                LOGGER.fine("ServiceProvider loading Facility used; returning object [" + impl.getClass().getName() + "]");
-                return impl;
-            }
-        } catch (Throwable t) {
-            throw new SOAPException("Error while searching for service [" + spiClass.getName() + "]", t);
-        }
-        return null;
-    }
-
-    private static void checkPackageAccess(String className) {
-        SecurityManager s = System.getSecurityManager();
-        if (s != null) {
-            int i = className.lastIndexOf('.');
-            if (i != -1) {
-                s.checkPackageAccess(className.substring(0, i));
-            }
-        }
-    }
-
-    private static Class nullSafeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
-        if (classLoader == null) {
-            return Class.forName(className);
-        } else {
-            return classLoader.loadClass(className);
-        }
-    }
-
-    static Object newInstance(String className, String defaultImplClassName, ClassLoader classLoader) throws SOAPException {
-        try {
-            return safeLoadClass(className, defaultImplClassName, classLoader).getConstructor().newInstance();
-        } catch (ClassNotFoundException x) {
-            throw new SOAPException("Provider " + className + " not found", x);
-        } catch (Exception x) {
-            throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
-        }
-    }
-
-    private static Class<?> safeLoadClass(String className, String defaultImplClassName, ClassLoader classLoader) throws ClassNotFoundException {
-        try {
-            checkPackageAccess(className);
-        } catch (SecurityException se) {
-            if (defaultImplClassName != null && defaultImplClassName.equals(className)) {
-                return Class.forName(className);
-            }
-            throw se;
-        }
-        return nullSafeLoadClass(className, classLoader);
-    }
-
-    private static ClassLoader contextClassLoader() throws SOAPException {
-        try {
-            return Thread.currentThread().getContextClassLoader();
-        } catch (Exception x) {
-            throw new SOAPException(x.toString(), x);
-        }
-    }
-
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/soap/MessageFactory.java b/specs/javaxmlws/src/main/java/javax/xml/soap/MessageFactory.java
deleted file mode 100644
index 6f0686a68b..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/soap/MessageFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 javax.xml.soap;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public abstract class MessageFactory {
-
-    private static final String DEFAULT_MESSAGE_FACTORY = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl";
-
-    public static MessageFactory newInstance() throws SOAPException {
-        try {
-            MessageFactory factory = $FactoryFinder.find(MessageFactory.class, DEFAULT_MESSAGE_FACTORY, false);
-            if (factory != null) {
-                return factory;
-            }
-            return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
-        } catch (Exception ex) {
-            throw new SOAPException("Unable to create message factory for SOAP: " + ex.getMessage(), ex);
-        }
-
-    }
-
-    public static MessageFactory newInstance(String protocol) throws SOAPException {
-        return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
-    }
-
-    public abstract SOAPMessage createMessage() throws SOAPException;
-
-    public abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPException;
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/soap/SAAJMetaFactory.java b/specs/javaxmlws/src/main/java/javax/xml/soap/SAAJMetaFactory.java
deleted file mode 100644
index cf83c554a1..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/soap/SAAJMetaFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 javax.xml.soap;
-
-public abstract class SAAJMetaFactory {
-
-    private static final String META_FACTORY_DEPRECATED_CLASS_PROPERTY = "javax.xml.soap.MetaFactory";
-
-    private static final String DEFAULT_META_FACTORY_CLASS = "com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl";
-
-    static SAAJMetaFactory getInstance() throws SOAPException {
-        try {
-            return $FactoryFinder.find(SAAJMetaFactory.class, DEFAULT_META_FACTORY_CLASS, true, META_FACTORY_DEPRECATED_CLASS_PROPERTY);
-        } catch (Exception e) {
-            throw new SOAPException("Unable to create SAAJ meta-factory: " + e.getMessage(), e);
-        }
-    }
-
-    protected SAAJMetaFactory() { }
-
-    protected abstract MessageFactory newMessageFactory(String protocol) throws SOAPException;
-
-    protected abstract SOAPFactory newSOAPFactory(String protocol) throws SOAPException;
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPConnectionFactory.java b/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
deleted file mode 100644
index 9466f2d99c..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 javax.xml.soap;
-
-public abstract class SOAPConnectionFactory {
-
-    private static final String DEFAULT_SOAP_CONNECTION_FACTORY = "com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory";
-
-    public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException {
-        try {
-            return $FactoryFinder.find(SOAPConnectionFactory.class, DEFAULT_SOAP_CONNECTION_FACTORY, true);
-        } catch (Exception ex) {
-            throw new SOAPException("Unable to create SOAP connection factory: " + ex.getMessage(), ex);
-        }
-    }
-
-    public abstract SOAPConnection createConnection() throws SOAPException;
-
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPFactory.java b/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPFactory.java
deleted file mode 100644
index eebdcc5f8c..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/soap/SOAPFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 javax.xml.soap;
-
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-
-public abstract class SOAPFactory {
-
-    private static final String DEFAULT_SOAP_FACTORY = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl";
-
-    public SOAPElement createElement(Element domElement) throws SOAPException {
-        throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
-    }
-
-    public abstract SOAPElement createElement(Name name) throws SOAPException;
-
-    public SOAPElement createElement(QName qname) throws SOAPException {
-        throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
-    }
-
-    public abstract SOAPElement createElement(String localName) throws SOAPException;
-
-
-    public abstract SOAPElement createElement(String localName, String prefix, String uri) throws SOAPException;
-
-    public abstract Detail createDetail() throws SOAPException;
-
-    public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
-
-    public abstract SOAPFault createFault() throws SOAPException;
-
-    public abstract Name createName(String localName, String prefix, String uri) throws SOAPException;
-
-    public abstract Name createName(String localName) throws SOAPException;
-
-    public static SOAPFactory newInstance() throws SOAPException {
-        try {
-            SOAPFactory factory = $FactoryFinder.find(SOAPFactory.class, DEFAULT_SOAP_FACTORY, false);
-            if (factory != null) {
-                return factory;
-            }
-            return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
-        } catch (Exception ex) {
-            throw new SOAPException("Unable to create SOAP Factory: " + ex.getMessage(), ex);
-        }
-
-    }
-
-    public static SOAPFactory newInstance(String protocol) throws SOAPException {
-        return SAAJMetaFactory.getInstance().newSOAPFactory(protocol);
-    }
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/ws/spi/$FactoryFinder.java b/specs/javaxmlws/src/main/java/javax/xml/ws/spi/$FactoryFinder.java
deleted file mode 100644
index 12bce644fa..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/ws/spi/$FactoryFinder.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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 javax.xml.ws.spi;
-
-import javax.xml.ws.WebServiceException;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class $FactoryFinder {
-
-    private static final Logger LOGGER = Logger.getLogger("javax.xml.ws");
-
-    @SuppressWarnings("unchecked")
-    static <T> T find(Class<T> factoryClass, String fallbackClassName) {
-        ClassLoader classLoader = contextClassLoader();
-
-        T provider = firstByServiceLoader(factoryClass);
-        if (provider != null) {
-            return provider;
-        }
-
-        String factoryId = factoryClass.getName();
-
-        provider = (T) fromJDKProperties(factoryId, fallbackClassName, classLoader);
-        if (provider != null) {
-            return provider;
-        }
-
-        provider = (T) fromSystemProperty(factoryId, fallbackClassName, classLoader);
-        if (provider != null) {
-            return provider;
-        }
-
-        try {
-            Class<T> spiClass = org.apache.karaf.specs.locator.OsgiLocator.locate(factoryClass);
-            if (spiClass != null) {
-                return spiClass.getConstructor().newInstance();
-            }
-        } catch (Throwable t) {
-        }
-
-        if (fallbackClassName == null) {
-            throw new WebServiceException("Provider for " + factoryId + " cannot be found", null);
-        }
-
-        return (T) newInstance(fallbackClassName, fallbackClassName, classLoader);
-    }
-
-    private static Object fromSystemProperty(String factoryId, String fallbackClassName, ClassLoader classLoader) {
-        try {
-            String systemProp = System.getProperty(factoryId);
-            if (systemProp != null) {
-                return newInstance(systemProp, fallbackClassName, classLoader);
-            }
-        } catch (SecurityException ignored) {
-        }
-        return null;
-    }
-
-    private static Object fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader) {
-        Path path = null;
-        try {
-            String JAVA_HOME = System.getProperty("java.home");
-            path = Paths.get(JAVA_HOME, "conf", "jaxws.properties");
-            if (!Files.exists(path)) {
-                path = Paths.get(JAVA_HOME, "lib", "jaxws.properties");
-            }
-            if (Files.exists(path)) {
-                Properties props = new Properties();
-                try (InputStream inStream = Files.newInputStream(path)) {
-                    props.load(inStream);
-                }
-                String factoryClassName = props.getProperty(factoryId);
-                return newInstance(factoryClassName, fallbackClassName, classLoader);
-            }
-        } catch (Exception ignored) {
-            LOGGER.log(Level.SEVERE, "Error reading JAX-WS configuration from ["  + path +
-                    "] file. Check it is accessible and has correct format.", ignored);
-        }
-        return null;
-    }
-
-    private static <T> T firstByServiceLoader(Class<T> spiClass) throws WebServiceException {
-        LOGGER.log(Level.FINE, "Using java.util.ServiceLoader to find {0}", spiClass.getName());
-        try {
-            ServiceLoader<T> serviceLoader = ServiceLoader.load(spiClass);
-            for (T impl : serviceLoader) {
-                LOGGER.fine("ServiceProvider loading Facility used; returning object [" + impl.getClass().getName() + "]");
-                return impl;
-            }
-        } catch (Throwable t) {
-            throw new WebServiceException("Error while searching for service [" + spiClass.getName() + "]", t);
-        }
-        return null;
-    }
-
-    private static void checkPackageAccess(String className) {
-        SecurityManager s = System.getSecurityManager();
-        if (s != null) {
-            int i = className.lastIndexOf('.');
-            if (i != -1) {
-                s.checkPackageAccess(className.substring(0, i));
-            }
-        }
-    }
-
-    private static Class nullSafeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
-        if (classLoader == null) {
-            return Class.forName(className);
-        } else {
-            return classLoader.loadClass(className);
-        }
-    }
-
-    private static Object newInstance(String className, String defaultImplClassName, ClassLoader classLoader) throws WebServiceException {
-        try {
-            return safeLoadClass(className, defaultImplClassName, classLoader).getConstructor().newInstance();
-        } catch (ClassNotFoundException x) {
-            throw new WebServiceException("Provider " + className + " not found", x);
-        } catch (Exception x) {
-            throw new WebServiceException("Provider " + className + " could not be instantiated: " + x, x);
-        }
-    }
-
-    private static Class<?> safeLoadClass(String className, String defaultImplClassName, ClassLoader classLoader) throws ClassNotFoundException {
-        try {
-            checkPackageAccess(className);
-        } catch (SecurityException se) {
-            if (defaultImplClassName != null && defaultImplClassName.equals(className)) {
-                return Class.forName(className);
-            }
-            throw se;
-        }
-        return nullSafeLoadClass(className, classLoader);
-    }
-
-    private static ClassLoader contextClassLoader() throws WebServiceException {
-        try {
-            return Thread.currentThread().getContextClassLoader();
-        } catch (Exception x) {
-            throw new WebServiceException(x.toString(), x);
-        }
-    }
-
-}
diff --git a/specs/javaxmlws/src/main/java/javax/xml/ws/spi/Provider.java b/specs/javaxmlws/src/main/java/javax/xml/ws/spi/Provider.java
deleted file mode 100644
index 9eca1402a9..0000000000
--- a/specs/javaxmlws/src/main/java/javax/xml/ws/spi/Provider.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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 javax.xml.ws.spi;
-
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.*;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-
-public abstract class Provider {
-
-    private static final String DEFAULT_JAXWSPROVIDER = "com.sun.xml.internal.ws.spi.ProviderImpl";
-
-    protected Provider() {
-    }
-
-    public static Provider provider() {
-        try {
-            return $FactoryFinder.find(Provider.class, DEFAULT_JAXWSPROVIDER);
-        } catch (WebServiceException ex) {
-            throw ex;
-        } catch (Exception ex) {
-            throw new WebServiceException("Unable to createEndpointReference Provider", ex);
-        }
-    }
-
-    public abstract ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName,
-                                                          Class<? extends Service> serviceClass);
-
-    public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName,
-                                                 Class<? extends Service> serviceClass, WebServiceFeature... features) {
-        throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
-    }
-
-    public abstract Endpoint createEndpoint(String bindingId, Object implementor);
-
-    public abstract Endpoint createAndPublishEndpoint(String address, Object implementor);
-
-    public abstract EndpointReference readEndpointReference(Source eprInfoset);
-
-    public abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface,
-                                  WebServiceFeature... features);
-
-    public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName,
-                                                                    QName portName, List<Element> metadata,
-                                                                    String wsdlDocumentLocation,
-                                                                    List<Element> referenceParameters);
-
-    public W3CEndpointReference createW3CEndpointReference(String address,
-                                                           QName interfaceName, QName serviceName, QName portName,
-                                                           List<Element> metadata, String wsdlDocumentLocation,
-                                                           List<Element> referenceParameters,
-                                                           List<Element> elements, Map<QName, String> attributes) {
-        throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
-    }
-
-    public Endpoint createAndPublishEndpoint(String address, Object implementor, WebServiceFeature... features) {
-        throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
-    }
-
-    public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {
-        throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
-    }
-
-    public Endpoint createEndpoint(String bindingId, Class<?> implementorClass,
-                                   Invoker invoker, WebServiceFeature... features) {
-        throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
-    }
-
-}
diff --git a/specs/locator/pom.xml b/specs/locator/pom.xml
deleted file mode 100644
index 6722210a18..0000000000
--- a/specs/locator/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.specs</groupId>
-        <artifactId>specs</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>org.apache.karaf.specs.locator</artifactId>
-    <name>Apache Karaf :: Specs :: Locator</name>
-
-    <properties>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
-</project>
diff --git a/specs/locator/src/main/java/org/apache/karaf/specs/locator/OsgiLocator.java b/specs/locator/src/main/java/org/apache/karaf/specs/locator/OsgiLocator.java
deleted file mode 100644
index cbc2b7c02d..0000000000
--- a/specs/locator/src/main/java/org/apache/karaf/specs/locator/OsgiLocator.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-public class OsgiLocator {
-
-    public static final long DEFAULT_TIMEOUT = 0L;
-    public static final String TIMEOUT = "org.apache.karaf.specs.timeout";
-
-    private static final Map<String, List<Callable<Class>>> FACTORIES = new HashMap<>();
-    
-    private static final ReadWriteLock LOCK = new ReentrantReadWriteLock();
-
-    private OsgiLocator() {
-    }
-
-    public static void unregister(String id, Callable<Class> factory) {
-        LOCK.writeLock().lock();
-        try {
-            List<Callable<Class>> l = FACTORIES.get(id);
-            if (l != null) {
-                l.remove(factory);
-            }
-        } finally {
-            LOCK.writeLock().unlock();
-        }
-    }
-
-    public static void register(String id, Callable<Class> factory) {
-        LOCK.writeLock().lock();
-        try {
-            FACTORIES.computeIfAbsent(id, k -> new ArrayList<>())
-                    .add(0, factory);
-            synchronized (LOCK) {
-                LOCK.notifyAll();
-            }
-        } finally {
-            LOCK.writeLock().unlock();
-        }
-    }
-
-
-    public static <T> Class<T> locate(Class<T> factoryId) {
-        return locate(factoryId, factoryId.getName());
-    }
-
-    private static long getTimeout() {
-        long timeout = DEFAULT_TIMEOUT;
-        try {
-            String prop = System.getProperty(TIMEOUT);
-            if (prop != null) {
-                timeout = Long.parseLong(prop);
-            }
-        } catch (Throwable t) { }
-        return timeout;
-    }
-
-    public static <T> Class<T> locate(Class<T> factoryClass, String factoryId) {
-        long timeout = getTimeout();
-        if (timeout <= 0) {
-            return doLocate(factoryClass, factoryId);
-        }
-        long t0 = System.currentTimeMillis();
-        long t1 = t0;
-        while (t1 - t0 < timeout) {
-            Class<T> impl = doLocate(factoryClass, factoryId);
-            if (impl != null) {
-                return impl;
-            }
-            synchronized (LOCK) {
-                try {
-                    LOCK.wait(timeout - (t1 - t0));
-                } catch (InterruptedException e) {
-                    return null;
-                }
-            }
-            t1 = System.currentTimeMillis();
-        }
-        return null;
-    }
-
-    private static <T> Class<T> doLocate(Class<T> factoryClass, String factoryId) {
-        LOCK.readLock().lock();
-        try {
-            List<Callable<Class>> l = FACTORIES.get(factoryId);
-            if (l != null && !l.isEmpty()) {
-                // look up the System property first
-                String factoryClassName = System.getProperty(factoryId);
-                try {
-                    for (Callable<Class> i : l) {
-                        Class c = null;
-                        try {
-                            c = i.call();
-                        } catch (Exception ex) {
-                            // do nothing here
-                        }
-                        if (c != null && factoryClass == c.getClassLoader().loadClass(factoryClass.getName())
-                                 && (factoryClassName == null || c.getName().equals(factoryClassName)))
-                        {
-                            return c;
-                        }
-                    }
-                } catch (Exception ex) {
-                    // do nothing here
-                }
-            }
-            return null;
-        } finally {
-            LOCK.readLock().unlock();
-        }
-    }
-
-    public static <T> List<Class<? extends T>> locateAll(Class<T> factoryId) {
-        return locateAll(factoryId, factoryId.getName());
-    }
-
-    public static <T> List<Class<? extends T>> locateAll(Class<T> factoryClass, String factoryId) {
-        LOCK.readLock().lock();
-        try {
-            List<Class<? extends T>> classes = new ArrayList<>();
-            List<Callable<Class>> l = FACTORIES.get(factoryId);
-            if (l != null) {
-                for (Callable<Class> i : l) {
-                    try {
-                        Class c = i.call();
-                        if (c != null && factoryClass.isAssignableFrom(c)) {
-                            classes.add(c);
-                        }
-                    } catch (Exception e) {
-                    }
-                }
-            }
-            return classes;
-        } finally {
-            LOCK.readLock().unlock();
-        }
-    }
-
-}
diff --git a/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java b/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java
deleted file mode 100644
index 092d5bdd00..0000000000
--- a/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import java.util.concurrent.Callable;
-
-public class MockCallable implements Callable<Class> {
-   
-    public Class call() throws Exception {
-        return this.getClass();
-    }
-
-}
diff --git a/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java b/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java
deleted file mode 100644
index 7fba2f4ad2..0000000000
--- a/specs/locator/src/test/java/org/apache/karaf/specs/locator/MockCallable2.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import java.util.concurrent.Callable;
-
-public class MockCallable2 implements Callable<Class> {
-   
-    public Class call() throws Exception {
-        return this.getClass();
-    }
-
-}
diff --git a/specs/locator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java b/specs/locator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java
deleted file mode 100644
index 7fc9dbdf77..0000000000
--- a/specs/locator/src/test/java/org/apache/karaf/specs/locator/OsgiLocatorTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.karaf.specs.locator;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class OsgiLocatorTest extends Assert {
-    
-    @BeforeClass
-    public static void setup() {
-        OsgiLocator.register("Factory", new MockCallable());
-        OsgiLocator.register("Factory", new MockCallable2());
-    }
-
-    @Test
-    public void testLocatorWithSystemProperty() {
-        System.setProperty(OsgiLocator.TIMEOUT, "0");
-        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable.class.getName(), clazz.getName());
-
-        System.setProperty("Factory", "org.apache.karaf.specs.locator");
-        clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNull("Did not expect to find a class", clazz);
-    }
-
-    @Test
-    public void testLocatorWithoutSystemProperty() {
-        System.setProperty(OsgiLocator.TIMEOUT, "0");
-        System.clearProperty("Factory");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
-    }
-
-    @Test
-    public void testLocatorWithSystemPropertyAndTimeout() {
-        long timeout = 1000;
-        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
-        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class.", MockCallable.class.getName(), clazz.getName());
-
-        System.setProperty("Factory", "org.apache.karaf.specs.locator");
-        long t0 = System.currentTimeMillis();
-        clazz = OsgiLocator.locate(Object.class, "Factory");
-        long t1 = System.currentTimeMillis();
-        assertNull("Did not expect to find a class", clazz);
-        assertTrue("Timeout issue", (t1 - t0) > timeout / 2);
-    }
-
-    @Test
-    public void testLocatorWithoutSystemPropertyAndTimeout() {
-        long timeout = 1000;
-        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
-        System.clearProperty("Factory");
-        long t0 = System.currentTimeMillis();
-        Class clazz = OsgiLocator.locate(Object.class, "Factory");
-        long t1 = System.currentTimeMillis();
-        assertNotNull("Expected to find a class", clazz);
-        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
-        assertTrue("Timeout issue", (t1 - t0) < timeout / 2);
-    }
-
-}
diff --git a/specs/pom.xml b/specs/pom.xml
deleted file mode 100644
index 45ed552ba5..0000000000
--- a/specs/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf</groupId>
-        <artifactId>karaf</artifactId>
-        <version>4.5.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <groupId>org.apache.karaf.specs</groupId>
-    <artifactId>specs</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Karaf :: Specs</name>
-
-    <modules>
-        <module>locator</module>
-        <module>activator</module>
-        <module>javaxml</module>
-        <module>javaxmlws</module>
-    </modules>
-
-</project>
-