<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<module xmlns="urn:jboss:module:1.6" name="sun.jdk">
	<!--
		This module is deprecated and any use of it should be replaced
		with the use of a JPMS module provided by Java SE.
		
		The original purpose of this module was to make it possible for
		JBoss Modules modules to get access to various Java SE packages.
		However, since Java SE 9, Java SE has exposed these packages via
		SE's own JPMS modules, and JBoss Modules allows modules to declare
		dependencies on SE's JPMS modules in the same way dependencies
		on native JBoss Modules modules are declared. Simply use the name
		of the JPMS module in a 'module' element's 'name' attribute. 
		
		For example, to add a dependency on the Java SE jdk.security.jgss module:
		
		<module name="jdk.security.jgss"/>
		
		In the 'paths' section below, the various resource paths (i.e. packages)
		exposed by this module are grouped by the JPMS module that provides
		them, with a comment identifying the relevant JPMS module. Users
		moving away from use of this module can use this information to 
		identify the appropriate JPMS module(s) to use instead of this one.
	-->	
    <properties>
        <property name="jboss.api" value="deprecated"/>
    </properties>

    <resources>
        <!-- currently jboss modules has not way of importing services from
        classes.jar so we duplicate them here -->
        <resource-root path="service-loader-resources"/>
    </resources>
    <dependencies>
        <module name="sun.scripting" export="true"/>
        <system export="true">
            <paths>

                <!-- See below for replacement modules -->

                <!-- Internal to java.base -->

                <path name="com/sun/net/ssl/internal/ssl"/>
                <path name="com/sun/crypto/provider"/>
                <path name="sun/security/action"/>
                <path name="sun/security/ssl"/>
                <path name="sun/security/pkcs"/>
                <path name="sun/security/x509"/>
                <path name="sun/invoke"/>
                <path name="sun/nio"/>
                <path name="sun/nio/ch"/>
                <path name="sun/nio/cs"/>
                <path name="sun/nio/cs/ext"/>
                <path name="sun/security/util"/>
                <path name="sun/util"/>
                <path name="sun/util/calendar"/>
                <path name="sun/util/locale"/>
                <path name="sun/util/resources"/>
                <path name="sun/security/provider"/>
                <path name="sun/text"/>

                <!-- Module java.corba (should not be used) -->

                <path name="com/sun/jndi/url/corbaname"/>
                <path name="com/sun/jndi/url/iiop"/>
                <path name="com/sun/jndi/url/iiopname"/>

                <!-- Internal to java.desktop -->

                <path name="com/sun/imageio/plugins/bmp"/>
                <path name="com/sun/imageio/plugins/common"/>
                <path name="com/sun/imageio/plugins/gif"/>
                <path name="com/sun/imageio/plugins/jpeg"/>
                <path name="com/sun/imageio/plugins/png"/>
                <path name="com/sun/imageio/plugins/wbmp"/>
                <path name="com/sun/imageio/spi"/>
                <path name="com/sun/imageio/stream"/>
                <path name="com/sun/media/sound"/>
                <path name="sun/awt"/>
                <path name="sun/awt/color"/>
                <path name="sun/awt/datatransfer"/>
                <path name="sun/awt/dnd"/>
                <path name="sun/awt/event"/>
                <path name="sun/awt/geom"/>
                <path name="sun/awt/im"/>
                <path name="sun/awt/image"/>
                <path name="sun/awt/image/codec"/>
                <path name="sun/awt/motif"/>
                <path name="sun/awt/resources"/>
                <path name="sun/awt/shell"/>
                <path name="sun/awt/util"/>
                <path name="sun/awt/windows"/>
                <path name="sun/awt/X11"/>
                <path name="sun/dc"/>
                <path name="sun/print"/>
                <path name="sun/print/resources"/>
                <path name="sun/invoke"/>

                <!-- Internal to java.naming -->

                <path name="com/sun/jndi/ldap"/>
                <path name="com/sun/jndi/ldap/ext"/>
                <path name="com/sun/jndi/url/ldap"/>
                <path name="com/sun/jndi/url/ldaps"/>

                <!-- Internal to java.rmi -->

                <path name="sun/rmi/log"/>
                <path name="sun/rmi/registry"/>
                <path name="sun/rmi/runtime"/>
                <path name="sun/rmi/server"/>
                <path name="sun/rmi/transport"/>
                <path name="sun/rmi/transport/proxy"/>
                <path name="sun/rmi/transport/tcp"/>

                <!-- Internal to java.security.jgss -->

                <path name="sun/security/krb5"/>
                <path name="sun/security/krb5/internal"/>

                <!-- Internal to java.sql.rowset -->

                <path name="com/sun/rowset"/>
                <path name="com/sun/rowset/providers"/>

                <!-- Internal to java.xml -->

                <path name="com/sun/org/apache/bcel/internal/classfile"/>

                <!-- Internal to java.xml.crypto -->

                <path name="com/sun/org/apache/xml/internal/security/transforms/implementations"/>

                <!-- Module jdk.crypto.cryptoki -->

                <path name="sun/security/pkcs11"/>

                <!-- Internal to jdk.naming.dns -->

                <path name="com/sun/jndi/dns"/>
                <path name="com/sun/jndi/url/dns"/>

                <!-- Internal to jdk.naming.rmi -->

                <path name="com/sun/jndi/url/rmi"/>

                <!-- Module jdk.security.auth -->

                <path name="com/sun/security/auth"/>
                <path name="com/sun/security/auth/login"/>
                <path name="com/sun/security/auth/module"/>

                <!-- Module jdk.security.jgss -->

                <path name="com/sun/security/jgss"/>

                <!-- Module jdk.unsupported -->

                <path name="sun/misc"/>

                <!-- Module jdk.xml.bind -->

                <path name="com/sun/tools/internal/xjc"/>

                <!-- No equivalent module -->

                <path name="com/sun/image/codec/jpeg"/>
                <path name="sun/jdbc/odbc"/>
                <path name="sun/jdbc/odbc/ee"/>
                <path name="sun/io"/>
                <path name="sun/net/spi/nameservice"/>
                <path name="sun/net/spi/nameservice/dns"/>
                <path name="sun/security"/>
                <path name="META-INF/services"/>

            </paths>
            <exports>
                <include-set>
                    <path name="META-INF/services"/>
                </include-set>
            </exports>
        </system>
    </dependencies>
</module>
