You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/06/26 09:58:46 UTC
[1/2] syncope git commit: Ensuring Wildfly / JBoss compatibility
Repository: syncope
Updated Branches:
refs/heads/2_0_X 78e7208d6 -> 69d90cc93
refs/heads/master ed8e08129 -> 9442842a4
Ensuring Wildfly / JBoss compatibility
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9442842a
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9442842a
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9442842a
Branch: refs/heads/master
Commit: 9442842a4376a32d239dd434e8e421ef4f0350b0
Parents: ed8e081
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jun 26 11:56:35 2017 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jun 26 11:58:21 2017 +0200
----------------------------------------------------------------------
.../WEB-INF/jboss-deployment-structure.xml | 7 ++
fit/build-tools/src/main/webapp/WEB-INF/web.xml | 5 +-
fit/core-reference/pom.xml | 80 ++------------------
.../src/main/resources/jboss/domains.xml | 58 ++++++++++++++
.../resources/jboss/domains/MasterDomain.xml | 8 +-
.../main/resources/jboss/domains/TwoDomain.xml | 12 +--
.../src/main/resources/jboss/web.xml | 2 +-
.../WEB-INF/jboss-deployment-structure.xml | 4 +
.../systemadministration/javaeecontainer.adoc | 48 +++++-------
src/site/xdoc/building.xml | 5 ++
10 files changed, 115 insertions(+), 114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index 388b98b..a38b3ba 100644
--- a/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -21,15 +21,22 @@ under the License.
<deployment>
<exclude-subsystems>
<subsystem name="webservices"/>
+ <subsystem name="jaxrs"/>
+ <subsystem name="jaxws"/>
</exclude-subsystems>
<dependencies>
<module name="org.apache.xalan"/>
</dependencies>
<exclusions>
+ <module name="javax.ws.soap.api"/>
+ <module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
+ <module name="org.hibernate"/>
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
+ <module name="org.apache.log4j"/>
+ <module name="org.jboss.log4j.logmanager"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/build-tools/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/fit/build-tools/src/main/webapp/WEB-INF/web.xml b/fit/build-tools/src/main/webapp/WEB-INF/web.xml
index b1b6ec7..2a65975 100644
--- a/fit/build-tools/src/main/webapp/WEB-INF/web.xml
+++ b/fit/build-tools/src/main/webapp/WEB-INF/web.xml
@@ -25,7 +25,10 @@ under the License.
<context-param>
<param-name>contextConfigLocation</param-name>
- <param-value>classpath:/*Context.xml</param-value>
+ <param-value>
+ classpath*:/buildToolsContext.xml
+ classpath*:/cxfContext.xml
+ </param-value>
</context-param>
<listener>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 9652533..de67c2d 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -795,27 +795,9 @@ under the License.
</dependency>
<dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.bval</groupId>
- <artifactId>bval-jsr</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
</dependencies>
<build>
@@ -835,63 +817,8 @@ under the License.
</resource>
</webResources>
<webXml>${basedir}/src/main/resources/jboss/web.xml</webXml>
- <packagingExcludes>WEB-INF/lib/syncope-*-persistence-jpa-${project.version}.jar</packagingExcludes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>unpack-jpa-entities</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>remove-jpa-jar</id>
- <phase>package</phase>
- <configuration>
- <target>
- <delete>
- <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/lib" includes="syncope-*-persistence-jpa-${project.version}.jar" />
- </delete>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
@@ -926,6 +853,13 @@ under the License.
</excludes>
</resource>
<resource>
+ <directory>${basedir}/../../core/persistence-jpa/src/main/resources</directory>
+ <includes>
+ <include>persistenceContext.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
<directory>src/main/resources/jboss</directory>
<filtering>true</filtering>
</resource>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/src/main/resources/jboss/domains.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains.xml b/fit/core-reference/src/main/resources/jboss/domains.xml
new file mode 100644
index 0000000..d39ed70
--- /dev/null
+++ b/fit/core-reference/src/main/resources/jboss/domains.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <import resource="classpath:domains/*Domain.xml"/>
+
+ <bean class="org.apache.syncope.core.persistence.jpa.spring.DomainTransactionInterceptorInjector"/>
+
+ <bean id="commonEMFConf" class="org.apache.syncope.core.persistence.jpa.spring.CommonEntityManagerFactoryConf">
+ <property name="packagesToScan" value="org.apache.syncope.core.persistence.jpa.entity"/>
+ <property name="validationMode" value="NONE"/>
+ <property name="persistenceUnitPostProcessors">
+ <list>
+ <bean class="org.apache.syncope.core.persistence.jpa.spring.MultiJarAwarePersistenceUnitPostProcessor"/>
+ </list>
+ </property>
+ <property name="jpaPropertyMap">
+ <map>
+ <entry key="openjpa.Log" value="slf4j"/>
+ <!--<entry key="openjpa.Log" value="SQL=TRACE"/>
+ <entry key="openjpa.ConnectionFactoryProperties"
+ value="PrintParameters=true, PrettyPrint=true, PrettyPrintLineLength=80"/>-->
+
+ <entry key="openjpa.NontransactionalWrite" value="false"/>
+
+ <!-- Removed: see https://s.apache.org/openjpaSchemaFactory for more information
+ <entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>-->
+ <entry key="openjpa.jdbc.MappingDefaults"
+ value="ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict"/>
+
+ <entry key="openjpa.DataCache" value="true"/>
+ <entry key="openjpa.QueryCache" value="true"/>
+ <entry key="openjpa.RemoteCommitProvider" value="sjvm"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
index 12abefe..5daee06 100644
--- a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
+++ b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
@@ -43,7 +43,7 @@ under the License.
<!-- Use JNDI datasource as default but, when not available, revert to
local datasource, with different properties for execution and testing.
In any case, get all JDBC connections with a determined isolation level. -->
- <bean id="MasterDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <bean id="MasterDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" primary="true">
<property name="jndiName" value="java:comp/env/jdbc/syncopeMasterDataSource"/>
<property name="defaultObject" ref="localMasterDataSource"/>
</bean>
@@ -101,10 +101,10 @@ under the License.
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.MetaDataFactory"
- value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/classes, Resources=${Master.orm})"/>
+ value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/lib/syncope-core-persistence-jpa-${syncope.version}.jar, Resources=${Master.orm})"/>
</map>
</property>
- </bean>
+ </bean>
<bean id="MasterTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="MasterEntityManagerFactory"/>
@@ -113,4 +113,4 @@ under the License.
<tx:annotation-driven transaction-manager="MasterTransactionManager"/>
-</beans>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml b/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
index b259d0f..00c72d4 100644
--- a/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
+++ b/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
@@ -43,7 +43,7 @@ under the License.
<!-- Use JNDI datasource as default but, when not available, revert to
local datasource, with different properties for execution and testing.
In any case, get all JDBC connections with a determined isolation level. -->
- <bean id="TwoDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <bean id="TwoDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" primary="true">
<property name="jndiName" value="java:comp/env/jdbc/syncopeTwoDataSource"/>
<property name="defaultObject" ref="localTwoDataSource"/>
</bean>
@@ -58,8 +58,8 @@ under the License.
<util:constant static-field="${Two.pool.transactionIsolation:java.sql.Connection.TRANSACTION_READ_COMMITTED}"/>
</property>
<!-- connection pool configuration - default values taken from HikariConfig default values -->
- <property name="maximumPoolSize" value="${Master.pool.maxActive:8}"/>
- <property name="minimumIdle" value="${Master.pool.minIdle:0}"/>
+ <property name="maximumPoolSize" value="${Two.pool.maxActive:8}"/>
+ <property name="minimumIdle" value="${Two.pool.minIdle:0}"/>
</bean>
<bean class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
@@ -101,10 +101,10 @@ under the License.
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.MetaDataFactory"
- value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/classes, Resources=${Two.orm})"/>
+ value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/lib/syncope-core-persistence-jpa-${syncope.version}.jar, Resources=${Master.orm})"/>
</map>
</property>
- </bean>
+ </bean>
<bean id="TwoTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="TwoEntityManagerFactory"/>
@@ -112,5 +112,5 @@ under the License.
</bean>
<tx:annotation-driven transaction-manager="TwoTransactionManager"/>
-
+
</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/src/main/resources/jboss/web.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/web.xml b/fit/core-reference/src/main/resources/jboss/web.xml
index bc6f1fd..a3aa3a4 100644
--- a/fit/core-reference/src/main/resources/jboss/web.xml
+++ b/fit/core-reference/src/main/resources/jboss/web.xml
@@ -32,7 +32,7 @@ under the License.
classpath*:/securityContext.xml
classpath*:/logicContext.xml
classpath:/restCXFContext.xml
- classpath*:/persistenceContext.xml
+ classpath:/persistenceContext.xml
classpath*:/provisioning*Context.xml
classpath*:/workflow*Context.xml
</param-value>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index 8f753d9..6baecf6 100644
--- a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -22,11 +22,15 @@ under the License.
<exclude-subsystems>
<subsystem name="webservices"/>
<subsystem name="jaxrs"/>
+ <subsystem name="bean-validation"/>
</exclude-subsystems>
<dependencies>
<module name="org.apache.xalan"/>
</dependencies>
<exclusions>
+ <module name="javax.validation.api"/>
+ <module name="org.hibernate.validator"/>
+ <module name="org.hibernate.validator.cdi"/>
<module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
index 23cc56e..f857dc5 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
@@ -74,34 +74,6 @@ provides a datasource named `jdbc/syncopeMasterDataSource`.
===== Wildfly 9 and 10
-Replace
-
-[source,xml]
-....
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- </dependency>
-....
-
-with
-
-[source,xml]
-....
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.bval</groupId>
- <artifactId>bval-jsr</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-....
-
-in `core/pom.xml`.
-
Add
[source,xml]
@@ -154,7 +126,7 @@ classpath*:/coreContext.xml
classpath*:/securityContext.xml
classpath*:/logicContext.xml
classpath:/restCXFContext.xml
-classpath*:/persistenceContext.xml
+classpath:/persistenceContext.xml
classpath*:/provisioning*Context.xml
classpath*:/workflow*Context.xml
....
@@ -170,6 +142,24 @@ https://github.com/apache/syncope/blob/master/fit/core-reference/src/main/resour
endif::[]
and save it under `core/src/main/resources/`.
+Download
+ifeval::["{snapshotOrRelease}" == "release"]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/fit/core-reference/src/main/resources/jboss/domains.xml[domains.xml^]
+endif::[]
+ifeval::["{snapshotOrRelease}" == "snapshot"]
+https://github.com/apache/syncope/blob/master/fit/core-reference/src/main/resources/jboss/domains.xml[domains.xml^]
+endif::[]
+and save it under `core/src/main/resources/`.
+
+Download
+ifeval::["{snapshotOrRelease}" == "release"]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-jpa/src/main/resources/persistenceContext.xml[persistenceContext.xml^]
+endif::[]
+ifeval::["{snapshotOrRelease}" == "snapshot"]
+https://github.com/apache/syncope/blob/master/core/persistence-jpa/src/main/resources/persistenceContext.xml[persistenceContext.xml^]
+endif::[]
+and save it under `core/src/main/resources/`.
+
Finally, add
[source,xml]
http://git-wip-us.apache.org/repos/asf/syncope/blob/9442842a/src/site/xdoc/building.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
index 32718e7..91da18b 100644
--- a/src/site/xdoc/building.xml
+++ b/src/site/xdoc/building.xml
@@ -84,6 +84,11 @@ under the License.
subdirectory, not from top-level.
</p>
<subsection name="fit/core-reference">
+ <h4>All integration tests</h4>
+ In order to keep the overall build time under acceptable time limits on average hardware, not all the available
+ integration tests are run by default; in order to run them all, anyway, a specific build profile is provided.
+ <source>$ mvn clean verify -Pfull-it,all</source>
+
<h4>application/xml</h4>
By default, integration tests are run using <code>application/json</code> for both <code>Accept</code> and
<code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code>.
[2/2] syncope git commit: Ensuring Wildfly / JBoss compatibility
Posted by il...@apache.org.
Ensuring Wildfly / JBoss compatibility
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/69d90cc9
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/69d90cc9
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/69d90cc9
Branch: refs/heads/2_0_X
Commit: 69d90cc93ead7f2d8319f0799c2fde9628cb8e39
Parents: 78e7208
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jun 26 11:56:35 2017 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jun 26 11:58:40 2017 +0200
----------------------------------------------------------------------
.../WEB-INF/jboss-deployment-structure.xml | 7 ++
fit/build-tools/src/main/webapp/WEB-INF/web.xml | 5 +-
fit/core-reference/pom.xml | 80 ++------------------
.../src/main/resources/jboss/domains.xml | 58 ++++++++++++++
.../resources/jboss/domains/MasterDomain.xml | 8 +-
.../main/resources/jboss/domains/TwoDomain.xml | 12 +--
.../src/main/resources/jboss/web.xml | 2 +-
.../WEB-INF/jboss-deployment-structure.xml | 4 +
.../systemadministration/javaeecontainer.adoc | 48 +++++-------
src/site/xdoc/building.xml | 5 ++
10 files changed, 115 insertions(+), 114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index 388b98b..a38b3ba 100644
--- a/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/fit/build-tools/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -21,15 +21,22 @@ under the License.
<deployment>
<exclude-subsystems>
<subsystem name="webservices"/>
+ <subsystem name="jaxrs"/>
+ <subsystem name="jaxws"/>
</exclude-subsystems>
<dependencies>
<module name="org.apache.xalan"/>
</dependencies>
<exclusions>
+ <module name="javax.ws.soap.api"/>
+ <module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
+ <module name="org.hibernate"/>
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
+ <module name="org.apache.log4j"/>
+ <module name="org.jboss.log4j.logmanager"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/build-tools/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/fit/build-tools/src/main/webapp/WEB-INF/web.xml b/fit/build-tools/src/main/webapp/WEB-INF/web.xml
index b1b6ec7..2a65975 100644
--- a/fit/build-tools/src/main/webapp/WEB-INF/web.xml
+++ b/fit/build-tools/src/main/webapp/WEB-INF/web.xml
@@ -25,7 +25,10 @@ under the License.
<context-param>
<param-name>contextConfigLocation</param-name>
- <param-value>classpath:/*Context.xml</param-value>
+ <param-value>
+ classpath*:/buildToolsContext.xml
+ classpath*:/cxfContext.xml
+ </param-value>
</context-param>
<listener>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index ea247ce..f9a0f71 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -795,27 +795,9 @@ under the License.
</dependency>
<dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.bval</groupId>
- <artifactId>bval-jsr</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
</dependencies>
<build>
@@ -835,63 +817,8 @@ under the License.
</resource>
</webResources>
<webXml>${basedir}/src/main/resources/jboss/web.xml</webXml>
- <packagingExcludes>WEB-INF/lib/syncope-*-persistence-jpa-${project.version}.jar</packagingExcludes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>unpack-jpa-entities</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>remove-jpa-jar</id>
- <phase>package</phase>
- <configuration>
- <target>
- <delete>
- <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/lib" includes="syncope-*-persistence-jpa-${project.version}.jar" />
- </delete>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
@@ -926,6 +853,13 @@ under the License.
</excludes>
</resource>
<resource>
+ <directory>${basedir}/../../core/persistence-jpa/src/main/resources</directory>
+ <includes>
+ <include>persistenceContext.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
<directory>src/main/resources/jboss</directory>
<filtering>true</filtering>
</resource>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/src/main/resources/jboss/domains.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains.xml b/fit/core-reference/src/main/resources/jboss/domains.xml
new file mode 100644
index 0000000..d39ed70
--- /dev/null
+++ b/fit/core-reference/src/main/resources/jboss/domains.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <import resource="classpath:domains/*Domain.xml"/>
+
+ <bean class="org.apache.syncope.core.persistence.jpa.spring.DomainTransactionInterceptorInjector"/>
+
+ <bean id="commonEMFConf" class="org.apache.syncope.core.persistence.jpa.spring.CommonEntityManagerFactoryConf">
+ <property name="packagesToScan" value="org.apache.syncope.core.persistence.jpa.entity"/>
+ <property name="validationMode" value="NONE"/>
+ <property name="persistenceUnitPostProcessors">
+ <list>
+ <bean class="org.apache.syncope.core.persistence.jpa.spring.MultiJarAwarePersistenceUnitPostProcessor"/>
+ </list>
+ </property>
+ <property name="jpaPropertyMap">
+ <map>
+ <entry key="openjpa.Log" value="slf4j"/>
+ <!--<entry key="openjpa.Log" value="SQL=TRACE"/>
+ <entry key="openjpa.ConnectionFactoryProperties"
+ value="PrintParameters=true, PrettyPrint=true, PrettyPrintLineLength=80"/>-->
+
+ <entry key="openjpa.NontransactionalWrite" value="false"/>
+
+ <!-- Removed: see https://s.apache.org/openjpaSchemaFactory for more information
+ <entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>-->
+ <entry key="openjpa.jdbc.MappingDefaults"
+ value="ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict"/>
+
+ <entry key="openjpa.DataCache" value="true"/>
+ <entry key="openjpa.QueryCache" value="true"/>
+ <entry key="openjpa.RemoteCommitProvider" value="sjvm"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
index 12abefe..5daee06 100644
--- a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
+++ b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
@@ -43,7 +43,7 @@ under the License.
<!-- Use JNDI datasource as default but, when not available, revert to
local datasource, with different properties for execution and testing.
In any case, get all JDBC connections with a determined isolation level. -->
- <bean id="MasterDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <bean id="MasterDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" primary="true">
<property name="jndiName" value="java:comp/env/jdbc/syncopeMasterDataSource"/>
<property name="defaultObject" ref="localMasterDataSource"/>
</bean>
@@ -101,10 +101,10 @@ under the License.
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.MetaDataFactory"
- value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/classes, Resources=${Master.orm})"/>
+ value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/lib/syncope-core-persistence-jpa-${syncope.version}.jar, Resources=${Master.orm})"/>
</map>
</property>
- </bean>
+ </bean>
<bean id="MasterTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="MasterEntityManagerFactory"/>
@@ -113,4 +113,4 @@ under the License.
<tx:annotation-driven transaction-manager="MasterTransactionManager"/>
-</beans>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml b/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
index b259d0f..00c72d4 100644
--- a/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
+++ b/fit/core-reference/src/main/resources/jboss/domains/TwoDomain.xml
@@ -43,7 +43,7 @@ under the License.
<!-- Use JNDI datasource as default but, when not available, revert to
local datasource, with different properties for execution and testing.
In any case, get all JDBC connections with a determined isolation level. -->
- <bean id="TwoDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <bean id="TwoDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" primary="true">
<property name="jndiName" value="java:comp/env/jdbc/syncopeTwoDataSource"/>
<property name="defaultObject" ref="localTwoDataSource"/>
</bean>
@@ -58,8 +58,8 @@ under the License.
<util:constant static-field="${Two.pool.transactionIsolation:java.sql.Connection.TRANSACTION_READ_COMMITTED}"/>
</property>
<!-- connection pool configuration - default values taken from HikariConfig default values -->
- <property name="maximumPoolSize" value="${Master.pool.maxActive:8}"/>
- <property name="minimumIdle" value="${Master.pool.minIdle:0}"/>
+ <property name="maximumPoolSize" value="${Two.pool.maxActive:8}"/>
+ <property name="minimumIdle" value="${Two.pool.minIdle:0}"/>
</bean>
<bean class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
@@ -101,10 +101,10 @@ under the License.
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.MetaDataFactory"
- value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/classes, Resources=${Two.orm})"/>
+ value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly10x/deployments/syncope.war/WEB-INF/lib/syncope-core-persistence-jpa-${syncope.version}.jar, Resources=${Master.orm})"/>
</map>
</property>
- </bean>
+ </bean>
<bean id="TwoTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="TwoEntityManagerFactory"/>
@@ -112,5 +112,5 @@ under the License.
</bean>
<tx:annotation-driven transaction-manager="TwoTransactionManager"/>
-
+
</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/src/main/resources/jboss/web.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/web.xml b/fit/core-reference/src/main/resources/jboss/web.xml
index bc6f1fd..a3aa3a4 100644
--- a/fit/core-reference/src/main/resources/jboss/web.xml
+++ b/fit/core-reference/src/main/resources/jboss/web.xml
@@ -32,7 +32,7 @@ under the License.
classpath*:/securityContext.xml
classpath*:/logicContext.xml
classpath:/restCXFContext.xml
- classpath*:/persistenceContext.xml
+ classpath:/persistenceContext.xml
classpath*:/provisioning*Context.xml
classpath*:/workflow*Context.xml
</param-value>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index 8f753d9..6baecf6 100644
--- a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -22,11 +22,15 @@ under the License.
<exclude-subsystems>
<subsystem name="webservices"/>
<subsystem name="jaxrs"/>
+ <subsystem name="bean-validation"/>
</exclude-subsystems>
<dependencies>
<module name="org.apache.xalan"/>
</dependencies>
<exclusions>
+ <module name="javax.validation.api"/>
+ <module name="org.hibernate.validator"/>
+ <module name="org.hibernate.validator.cdi"/>
<module name="javax.ws.rs.api"/>
<module name="org.apache.cxf"/>
<module name="org.apache.cxf.impl"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
index d0eca2c..e2cc357 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
@@ -76,34 +76,6 @@ provides a datasource named `jdbc/syncopeMasterDataSource`.
===== Wildfly 9 and 10
-Replace
-
-[source,xml]
-....
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- </dependency>
-....
-
-with
-
-[source,xml]
-....
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.bval</groupId>
- <artifactId>bval-jsr</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-....
-
-in `core/pom.xml`.
-
Add
[source,xml]
@@ -156,7 +128,7 @@ classpath*:/coreContext.xml
classpath*:/securityContext.xml
classpath*:/logicContext.xml
classpath:/restCXFContext.xml
-classpath*:/persistenceContext.xml
+classpath:/persistenceContext.xml
classpath*:/provisioning*Context.xml
classpath*:/workflow*Context.xml
....
@@ -172,6 +144,24 @@ https://github.com/apache/syncope/tree/2_0_X/fit/core-reference/src/main/resourc
endif::[]
and save it under `core/src/main/resources/`.
+Download
+ifeval::["{snapshotOrRelease}" == "release"]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/fit/core-reference/src/main/resources/jboss/domains.xml[domains.xml^]
+endif::[]
+ifeval::["{snapshotOrRelease}" == "snapshot"]
+https://github.com/apache/syncope/blob/2_0_X/fit/core-reference/src/main/resources/jboss/domains.xml[domains.xml^]
+endif::[]
+and save it under `core/src/main/resources/`.
+
+Download
+ifeval::["{snapshotOrRelease}" == "release"]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/core/persistence-jpa/src/main/resources/persistenceContext.xml[persistenceContext.xml^]
+endif::[]
+ifeval::["{snapshotOrRelease}" == "snapshot"]
+https://github.com/apache/syncope/blob/2_0_X/core/persistence-jpa/src/main/resources/persistenceContext.xml[persistenceContext.xml^]
+endif::[]
+and save it under `core/src/main/resources/`.
+
Finally, add
[source,xml]
http://git-wip-us.apache.org/repos/asf/syncope/blob/69d90cc9/src/site/xdoc/building.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
index 32718e7..91da18b 100644
--- a/src/site/xdoc/building.xml
+++ b/src/site/xdoc/building.xml
@@ -84,6 +84,11 @@ under the License.
subdirectory, not from top-level.
</p>
<subsection name="fit/core-reference">
+ <h4>All integration tests</h4>
+ In order to keep the overall build time under acceptable time limits on average hardware, not all the available
+ integration tests are run by default; in order to run them all, anyway, a specific build profile is provided.
+ <source>$ mvn clean verify -Pfull-it,all</source>
+
<h4>application/xml</h4>
By default, integration tests are run using <code>application/json</code> for both <code>Accept</code> and
<code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code>.