Merge pull request #2511 from stianst/KEYCLOAK-2748

KEYCLOAK-2748
This commit is contained in:
Stian Thorgersen 2016-04-06 09:10:23 +02:00
commit 91cbfbd37f
27 changed files with 141 additions and 136 deletions

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,13 +15,16 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="com.google.zxing.core"> <module xmlns="urn:jboss:module:1.3" name="com.google.zxing.core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${com.google.zxing:core}"/> <artifact name="${com.google.zxing:core}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module>
</module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,14 +15,17 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="com.google.zxing.javase"> <module xmlns="urn:jboss:module:1.3" name="com.google.zxing.javase">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${com.google.zxing:javase}"/> <artifact name="${com.google.zxing:javase}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="com.google.zxing.core"/> <module name="com.google.zxing.core"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,14 +15,17 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.freemarker"> <module xmlns="urn:jboss:module:1.3" name="org.freemarker">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.freemarker:freemarker}"/> <artifact name="${org.freemarker:freemarker}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="javax.api"/> <module name="javax.api"/>
<module name="org.apache.log4j"/> <module name="org.apache.log4j"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -16,14 +15,12 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.jboss.as.product" slot="keycloak"> <module xmlns="urn:jboss:module:1.3" name="org.jboss.as.product" slot="keycloak">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<resource-root path="dir"/> <resource-root path="dir"/>
<!-- Insert resources here -->
</resources> </resources>
<dependencies>
</dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,16 +15,19 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-common"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-common">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-common}"/> <artifact name="${org.keycloak:keycloak-common}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.bouncycastle" /> <module name="org.bouncycastle" />
<module name="javax.api"/> <module name="javax.api"/>
<module name="javax.activation.api"/> <module name="javax.activation.api"/>
<module name="sun.jdk" optional="true" /> <module name="sun.jdk" optional="true" />
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-core"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-core}"/> <artifact name="${org.keycloak:keycloak-core}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="com.fasterxml.jackson.core.jackson-core"/> <module name="com.fasterxml.jackson.core.jackson-core"/>
<module name="com.fasterxml.jackson.core.jackson-annotations"/> <module name="com.fasterxml.jackson.core.jackson-annotations"/>
@ -34,5 +35,4 @@
<module name="javax.activation.api"/> <module name="javax.activation.api"/>
<module name="sun.jdk" optional="true" /> <module name="sun.jdk" optional="true" />
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,12 +15,12 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-js-adapter"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-js-adapter">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-js-adapter}"/> <artifact name="${org.keycloak:keycloak-js-adapter}"/>
</resources> </resources>
<dependencies>
</dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-kerberos-federation"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-kerberos-federation">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-kerberos-federation}"/> <artifact name="${org.keycloak:keycloak-kerberos-federation}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>
@ -32,5 +33,4 @@
<module name="org.jboss.logging"/> <module name="org.jboss.logging"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-ldap-federation"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-ldap-federation">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-ldap-federation}"/> <artifact name="${org.keycloak:keycloak-ldap-federation}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>
@ -33,5 +34,4 @@
<module name="org.jboss.logging"/> <module name="org.jboss.logging"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-infinispan"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-infinispan">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-model-infinispan}"/> <artifact name="${org.keycloak:keycloak-model-infinispan}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>
@ -31,5 +32,4 @@
<module name="org.jboss.logging"/> <module name="org.jboss.logging"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,14 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-jpa"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-jpa">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-model-jpa}"/> <artifact name="${org.keycloak:keycloak-model-jpa}"/>
</resources> </resources>
<exports>
<include path="META-INF/**"/>
</exports>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-mongo"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-model-mongo">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-model-mongo}"/> <artifact name="${org.keycloak:keycloak-model-mongo}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>
@ -35,5 +36,4 @@
<module name="com.fasterxml.jackson.core.jackson-databind"/> <module name="com.fasterxml.jackson.core.jackson-databind"/>
<module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider"/> <module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-saml-core"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-saml-core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-saml-core}"/> <artifact name="${org.keycloak:keycloak-saml-core}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.jboss.logging"/> <module name="org.jboss.logging"/>
@ -34,5 +35,4 @@
</module> </module>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-server-spi"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-server-spi">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-server-spi}"/> <artifact name="${org.keycloak:keycloak-server-spi}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.jboss.logging"/> <module name="org.jboss.logging"/>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
@ -32,5 +33,4 @@
<module name="javax.ws.rs.api"/> <module name="javax.ws.rs.api"/>
<module name="org.apache.httpcomponents"/> <module name="org.apache.httpcomponents"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -17,13 +17,13 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-server-subsystem.infinispan"> <module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-server-subsystem.dependencies">
<resources> <resources>
<!-- Insert resources here -->
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-services" export="true"/>
<module name="org.jboss.msc"/>
<module name="org.infinispan" export="true"/> <module name="org.infinispan" export="true"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -16,8 +15,10 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-server-subsystem"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-server-subsystem">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<resource-root path="."/> <resource-root path="."/>

View file

@ -14,37 +14,11 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<jboss-deployment-structure> <jboss-deployment-structure>
<deployment> <deployment>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common" services="import"/> <module name="org.keycloak.keycloak-server-subsystem.dependencies"/>
<module name="org.keycloak.keycloak-core" services="import"/>
<module name="org.keycloak.keycloak-themes" services="import"/>
<module name="org.keycloak.keycloak-js-adapter" services="import"/>
<module name="org.keycloak.keycloak-kerberos-federation" services="import"/>
<module name="org.keycloak.keycloak-ldap-federation" services="import"/>
<module name="org.keycloak.keycloak-server-spi" services="import"/>
<module name="org.keycloak.keycloak-model-jpa" services="import" meta-inf="import"/>
<module name="org.keycloak.keycloak-model-mongo" services="import"/>
<module name="org.keycloak.keycloak-model-infinispan" services="import"/>
<module name="org.keycloak.keycloak-services" export="true" services="import"/>
<module name="org.hibernate" services="import"/>
<module name="org.bouncycastle"/>
<module name="org.jboss.resteasy.resteasy-multipart-provider" services="import"/>
<module name="org.jboss.resteasy.resteasy-jaxrs"/>
<module name="org.jboss.msc"/>
<!-- suppress unsupported dependency 'org.infinispan:main' warning -->
<module name="org.keycloak.keycloak-server-subsystem.infinispan"/>
</dependencies> </dependencies>
<exclusions>
<!-- Exclude keycloak modules -->
<module name="org.keycloak.keycloak-common" />
<module name="org.keycloak.keycloak-core" />
</exclusions>
<exclude-subsystems> <exclude-subsystems>
<subsystem name="webservices"/> <subsystem name="webservices"/>
<subsystem name="weld"/> <subsystem name="weld"/>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-services"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-services">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-services}"/> <artifact name="${org.keycloak:keycloak-services}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common" services="import"/> <module name="org.keycloak.keycloak-common" services="import"/>
<module name="org.keycloak.keycloak-core" services="import"/> <module name="org.keycloak.keycloak-core" services="import"/>
@ -62,5 +63,4 @@
<module name="org.apache.httpcomponents"/> <module name="org.apache.httpcomponents"/>
<module name="org.twitter4j"/> <module name="org.twitter4j"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-themes"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-themes">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-themes}"/> <artifact name="${org.keycloak:keycloak-themes}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-server-spi"/> <module name="org.keycloak.keycloak-server-spi"/>
@ -32,5 +33,4 @@
<module name="org.freemarker"/> <module name="org.freemarker"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -15,12 +15,17 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-adduser"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-adduser">
<main-class name="org.keycloak.wildfly.adduser.AddUser"/> <main-class name="org.keycloak.wildfly.adduser.AddUser"/>
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-wildfly-adduser}"/> <artifact name="${org.keycloak:keycloak-wildfly-adduser}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>

View file

@ -15,11 +15,15 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-extensions"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-extensions">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.keycloak:keycloak-wildfly-extensions}"/> <artifact name="${org.keycloak:keycloak-wildfly-extensions}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.keycloak.keycloak-common"/> <module name="org.keycloak.keycloak-common"/>
<module name="org.keycloak.keycloak-core"/> <module name="org.keycloak.keycloak-core"/>

View file

@ -18,6 +18,9 @@
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-server-subsystem"> <module xmlns="urn:jboss:module:1.3" name="org.keycloak.keycloak-wildfly-server-subsystem">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<resource-root path="."/> <resource-root path="."/>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,14 +15,17 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.liquibase"> <module xmlns="urn:jboss:module:1.3" name="org.liquibase">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.liquibase:liquibase-core}"/> <artifact name="${org.liquibase:liquibase-core}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="org.apache.commons.logging"/> <module name="org.apache.commons.logging"/>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,13 +15,16 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.mongodb.mongo-java-driver"> <module xmlns="urn:jboss:module:1.3" name="org.mongodb.mongo-java-driver">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.mongodb:mongo-java-driver}"/> <artifact name="${org.mongodb:mongo-java-driver}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
@ -18,13 +15,16 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<module xmlns="urn:jboss:module:1.3" name="org.twitter4j"> <module xmlns="urn:jboss:module:1.3" name="org.twitter4j">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources> <resources>
<artifact name="${org.twitter4j:twitter4j-core}"/> <artifact name="${org.twitter4j:twitter4j-core}"/>
</resources> </resources>
<dependencies> <dependencies>
<module name="javax.api"/> <module name="javax.api"/>
</dependencies> </dependencies>
</module> </module>

View file

@ -24,15 +24,21 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence; import javax.persistence.Persistence;
import javax.persistence.spi.PersistenceUnitTransactionType;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl;
import org.hibernate.ejb.AvailableSettings; import org.hibernate.ejb.AvailableSettings;
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
import org.hibernate.jpa.boot.internal.PersistenceXmlParser;
import org.hibernate.jpa.boot.spi.Bootstrap;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.keycloak.Config; import org.keycloak.Config;
import org.keycloak.connections.jpa.updater.JpaUpdaterProvider; import org.keycloak.connections.jpa.updater.JpaUpdaterProvider;
@ -189,7 +195,7 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide
} }
logger.trace("Creating EntityManagerFactory"); logger.trace("Creating EntityManagerFactory");
emf = Persistence.createEntityManagerFactory(unitName, properties); emf = JpaUtils.createEntityManagerFactory(unitName, properties, getClass().getClassLoader());
logger.trace("EntityManagerFactory created"); logger.trace("EntityManagerFactory created");
if (globalStatsInterval != -1) { if (globalStatsInterval != -1) {

View file

@ -17,7 +17,16 @@
package org.keycloak.connections.jpa.util; package org.keycloak.connections.jpa.util;
import org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl;
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
import org.hibernate.jpa.boot.internal.PersistenceXmlParser;
import org.hibernate.jpa.boot.spi.Bootstrap;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.spi.PersistenceUnitTransactionType;
import java.util.List;
import java.util.Map;
/** /**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a> * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
@ -30,4 +39,15 @@ public class JpaUtils {
String schema = (String) em.getEntityManagerFactory().getProperties().get(HIBERNATE_DEFAULT_SCHEMA); String schema = (String) em.getEntityManagerFactory().getProperties().get(HIBERNATE_DEFAULT_SCHEMA);
return (schema==null) ? tableName : schema + "." + tableName; return (schema==null) ? tableName : schema + "." + tableName;
} }
public static EntityManagerFactory createEntityManagerFactory(String unitName, Map<String, Object> properties, ClassLoader classLoader) {
PersistenceXmlParser parser = new PersistenceXmlParser(new ClassLoaderServiceImpl(classLoader), PersistenceUnitTransactionType.RESOURCE_LOCAL);
List<ParsedPersistenceXmlDescriptor> persistenceUnits = parser.doResolve(properties);
for (ParsedPersistenceXmlDescriptor persistenceUnit : persistenceUnits) {
if (persistenceUnit.getName().equals(unitName)) {
return Bootstrap.getEntityManagerFactoryBuilder(persistenceUnit, properties, classLoader).build();
}
}
throw new RuntimeException("Persistence unit '" + unitName + "' not found");
}
} }