syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1615910 [1/12] - in /syncope/trunk: ./ archetype/src/main/resources/ archetype/src/main/resources/archetype-resources/console/ archetype/src/main/resources/archetype-resources/core/ build-tools/src/main/resources/ client/src/main/java/org/...
Date Tue, 05 Aug 2014 11:20:02 GMT
Author: ilgrosso
Date: Tue Aug  5 11:20:00 2014
New Revision: 1615910

URL: http://svn.apache.org/r1615910
Log:
Merge from 1_2_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml
    syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml
    syncope/trunk/archetype/src/main/resources/meta-pom.xml
    syncope/trunk/build-tools/src/main/resources/content.ldif
    syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeClientCompositeException.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeClientException.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/SyncopeConstants.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/annotation/ClassList.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/annotation/FormAttributeField.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/annotation/SchemaList.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AbstractAttributableMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/AttributeMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/MembershipMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/RoleMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/UserMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/AbstractReportletConf.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/ReportletConf.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/StaticReportletConf.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConnectorService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/EntitlementService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/LoggerService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/NotificationService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/PolicyService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ResourceService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractAttributableTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractExecTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractPolicyTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSyncTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AccountPolicyTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AttributeTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConfTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/LoggerTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingItemTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MappingTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/MembershipTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/NotificationTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PasswordPolicyTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatus.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PushTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportExecTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ReportTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ResourceTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/RoleTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchedTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncPolicyTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/SyncTaskTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskExecTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/UserTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormPropertyTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/WorkflowFormTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AbstractPolicySpec.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AccountPolicySpec.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributableType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AttributeSchemaType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/CipherAlgorithm.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ClientExceptionType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConflictResolutionAction.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfPropSchema.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnConfProperty.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnParameterType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ConnectorCapability.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/IntMappingType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerLevel.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/LoggerType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/MatchingRule.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PasswordPolicySpec.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PolicyType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationMode.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/PropagationTaskExecStatus.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecExportFormat.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ReportExecStatus.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceOperation.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SubjectType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncPolicySpec.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TaskType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/TraceLevel.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/UnmatchingRule.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/WorkflowFormPropertyType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/package-info.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/util/CollectionWrapper.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/CorrelationRuleClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/EntitlementTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/JobClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/MailTemplate.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/PropagationActionClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/PushActionClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/ReportletConfClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/SyncActionClass.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/wrap/Validator.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/AbstractSearchCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/AttributeCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/EntitlementCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/MembershipCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/ResourceCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/SearchCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/search/SubjectCond.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/QueryResourceInfoComparator.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ConfigurationServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ConnectorServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/EntitlementServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/PolicyServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ResourceServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/RoleServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/SchemaServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java
    syncope/trunk/core/src/test/resources/jboss/META-INF/MANIFEST.MF

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1615907-1615909

Modified: syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml (original)
+++ syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml Tue Aug  5 11:20:00 2014
@@ -1,280 +1,280 @@
-<?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.
--->
-<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">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>${groupId}</groupId>
-    <artifactId>${rootArtifactId}</artifactId>
-    <version>${version}</version>
-  </parent>
-
-  <name>Apache Syncope sample project console</name>
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <packaging>war</packaging>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-client</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-console</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-console</artifactId>
-      <classifier>classes</classifier>
-    </dependency>
-
-    <!-- TEST -->
-    <dependency>
-      <groupId>org.activiti</groupId>
-      <artifactId>activiti-webapp-explorer2</artifactId>            
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-build-tools</artifactId>
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.h2database</groupId>
-      <artifactId>h2</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.soap</groupId>
-      <artifactId>wssample</artifactId>
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <!-- /TEST -->    
-  </dependencies>
-
-  <build>
-    <finalName>syncope-console</finalName>
-
-    <plugins>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>set-bundles</id>
-            <phase>process-test-resources</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-            
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>setupActivitiModeler</id>
-            <phase>process-test-resources</phase>
-            <configuration>
-              <target>
-                <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war"
-                       dest="${project.build.directory}/activiti-webapp-explorer2"/>
-                
-                <mkdir dir="${activiti-modeler.directory}"/>
-                
-                <mkdir dir="${activiti-modeler.directory}/editor"/>
-                <copy todir="${activiti-modeler.directory}/editor">
-                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor">
-                    <exclude name="oryx.js"/>
-                  </fileset>
-                </copy>
-                <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml"
-                      todir="${activiti-modeler.directory}/editor"/>
-                <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json"
-                      todir="${activiti-modeler.directory}/editor"/>
-                
-                <mkdir dir="${activiti-modeler.directory}/explorer"/>
-                <copy todir="${activiti-modeler.directory}/explorer">
-                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer"/>
-                </copy>
-                
-                <mkdir dir="${activiti-modeler.directory}/libs"/>
-                <copy todir="${activiti-modeler.directory}/libs">
-                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs"/>
-                </copy>
-                
-                <fixcrlf srcdir="${project.build.directory}/activiti-webapp-explorer2/editor/" 
-                         includes="oryx.debug.js"
-                         eol="unix"/>
-                <patch patchfile="${basedir}/src/main/resources/oryx.debug.js.patch"
-                       originalfile="${project.build.directory}/activiti-webapp-explorer2/editor/oryx.debug.js"
-                       destfile="${activiti-modeler.directory}/editor/oryx.debug.js"/>
-                
-                <delete dir="${project.build.directory}/activiti-webapp-explorer2"/>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>setupTestWebapp</id>
-            <phase>pre-integration-test</phase>
-            <configuration>
-              <target>
-                <unzip src="${basedir}/../core/target/syncope.war" dest="${cargo.run.dir}"/>
-                <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>setupCSV</id>
-            <phase>pre-integration-test</phase>
-            <configuration>
-              <target>
-                <copy file="${project.build.directory}/test-classes/test.csv" 
-                      todir="${test.csvdir.path}" 
-                      overwrite="true"/>
-              </target>    
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.cargo</groupId>
-        <artifactId>cargo-maven2-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <container>
-            <dependencies>
-              <dependency>
-                <groupId>com.h2database</groupId>
-                <artifactId>h2</artifactId>
-              </dependency>
-            </dependencies>
-          </container>
-          <configuration>
-            <type>standalone</type>
-            <properties>
-              <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
-              <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
-              <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
-
-              <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
-            </properties>
-          </configuration>
-          <deployables>
-            <deployable>
-              <location>${cargo.run.dir}</location>
-              <properties>
-                <context>syncope</context>
-              </properties>
-            </deployable>
-            <deployable>
-              <location>${project.build.directory}/${project.build.finalName}.war</location>
-              <properties>
-                <context>syncope-console</context>
-              </properties>
-            </deployable>
-            <deployable>
-              <groupId>org.connid.bundles.soap</groupId>
-              <artifactId>wssample</artifactId>
-              <type>war</type>
-              <properties>
-                <context>wssample</context>
-              </properties>
-            </deployable>
-            <deployable>
-              <groupId>org.apache.syncope</groupId>
-              <artifactId>syncope-build-tools</artifactId>
-              <type>war</type>
-              <properties>
-                <context>syncope-build-tools</context>
-              </properties>
-            </deployable>
-          </deployables>
-        </configuration>
-      </plugin>
-            
-    </plugins>
-
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-
-    <testResources>
-      <testResource>
-        <directory>src/test/resources</directory>
-        <filtering>true</filtering>
-      </testResource>
-      <testResource>
-        <directory>../core/src/test/resources</directory>
-        <filtering>true</filtering>
-      </testResource>
-    </testResources>
-  </build>
-    
-  <profiles>
-    <profile>
-      <id>embedded</id>
-      
-      <properties>
-        <conf.directory>${project.build.directory}/test-classes</conf.directory>
-        <skipTests>true</skipTests>
-      </properties>
-      
-      <build>
-        <defaultGoal>clean verify cargo:run</defaultGoal>    
-      </build>
-    </profile>    
-  </profiles>
-</project>
+<?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.
+-->
+<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">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>${groupId}</groupId>
+    <artifactId>${rootArtifactId}</artifactId>
+    <version>${version}</version>
+  </parent>
+
+  <name>Apache Syncope sample project console</name>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>war</packaging>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-client</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-console</artifactId>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-console</artifactId>
+      <classifier>classes</classifier>
+    </dependency>
+
+    <!-- TEST -->
+    <dependency>
+      <groupId>org.activiti</groupId>
+      <artifactId>activiti-webapp-explorer2</artifactId>            
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-build-tools</artifactId>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.connid.bundles.soap</groupId>
+      <artifactId>wssample</artifactId>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <!-- /TEST -->    
+  </dependencies>
+
+  <build>
+    <finalName>syncope-console</finalName>
+
+    <plugins>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>set-bundles</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+            
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>setupActivitiModeler</id>
+            <phase>process-test-resources</phase>
+            <configuration>
+              <target>
+                <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war"
+                       dest="${project.build.directory}/activiti-webapp-explorer2"/>
+                
+                <mkdir dir="${activiti-modeler.directory}"/>
+                
+                <mkdir dir="${activiti-modeler.directory}/editor"/>
+                <copy todir="${activiti-modeler.directory}/editor">
+                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor">
+                    <exclude name="oryx.js"/>
+                  </fileset>
+                </copy>
+                <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml"
+                      todir="${activiti-modeler.directory}/editor"/>
+                <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json"
+                      todir="${activiti-modeler.directory}/editor"/>
+                
+                <mkdir dir="${activiti-modeler.directory}/explorer"/>
+                <copy todir="${activiti-modeler.directory}/explorer">
+                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer"/>
+                </copy>
+                
+                <mkdir dir="${activiti-modeler.directory}/libs"/>
+                <copy todir="${activiti-modeler.directory}/libs">
+                  <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs"/>
+                </copy>
+                
+                <fixcrlf srcdir="${project.build.directory}/activiti-webapp-explorer2/editor/" 
+                         includes="oryx.debug.js"
+                         eol="unix"/>
+                <patch patchfile="${basedir}/src/main/resources/oryx.debug.js.patch"
+                       originalfile="${project.build.directory}/activiti-webapp-explorer2/editor/oryx.debug.js"
+                       destfile="${activiti-modeler.directory}/editor/oryx.debug.js"/>
+                
+                <delete dir="${project.build.directory}/activiti-webapp-explorer2"/>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>setupTestWebapp</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target>
+                <unzip src="${basedir}/../core/target/syncope.war" dest="${cargo.run.dir}"/>
+                <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>setupCSV</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target>
+                <copy file="${project.build.directory}/test-classes/test.csv" 
+                      todir="${test.csvdir.path}" 
+                      overwrite="true"/>
+              </target>    
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.cargo</groupId>
+        <artifactId>cargo-maven2-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <container>
+            <dependencies>
+              <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+              </dependency>
+            </dependencies>
+          </container>
+          <configuration>
+            <type>standalone</type>
+            <properties>
+              <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
+              <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
+              <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
+
+              <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+            </properties>
+          </configuration>
+          <deployables>
+            <deployable>
+              <location>${cargo.run.dir}</location>
+              <properties>
+                <context>syncope</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <location>${project.build.directory}/${project.build.finalName}.war</location>
+              <properties>
+                <context>syncope-console</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <groupId>org.connid.bundles.soap</groupId>
+              <artifactId>wssample</artifactId>
+              <type>war</type>
+              <properties>
+                <context>wssample</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <groupId>org.apache.syncope</groupId>
+              <artifactId>syncope-build-tools</artifactId>
+              <type>war</type>
+              <properties>
+                <context>syncope-build-tools</context>
+              </properties>
+            </deployable>
+          </deployables>
+        </configuration>
+      </plugin>
+            
+    </plugins>
+
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+      <testResource>
+        <directory>../core/src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+    </testResources>
+  </build>
+    
+  <profiles>
+    <profile>
+      <id>embedded</id>
+      
+      <properties>
+        <conf.directory>${project.build.directory}/test-classes</conf.directory>
+        <skipTests>true</skipTests>
+      </properties>
+      
+      <build>
+        <defaultGoal>clean verify cargo:run</defaultGoal>    
+      </build>
+    </profile>    
+  </profiles>
+</project>

Modified: syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml (original)
+++ syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml Tue Aug  5 11:20:00 2014
@@ -1,322 +1,322 @@
-<?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.
--->
-<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">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>${groupId}</groupId>
-    <artifactId>${rootArtifactId}</artifactId>
-    <version>${version}</version>
-  </parent>
-
-  <name>Apache Syncope sample project core</name>
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <packaging>war</packaging>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-common</artifactId>
-      <classifier>javadoc</classifier>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-core</artifactId>
-      <type>war</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-core</artifactId>
-      <classifier>classes</classifier>
-    </dependency>
-
-    <!-- TEST -->
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-client</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.syncope</groupId>
-      <artifactId>syncope-build-tools</artifactId>
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.soap</groupId>
-      <artifactId>wssample</artifactId>
-      <type>war</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.h2database</groupId>
-      <artifactId>h2</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <!-- /TEST -->
-  </dependencies>
-
-  <build>
-    <finalName>syncope</finalName>
-
-    <plugins>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>set-bundles</id>
-            <phase>process-test-resources</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-            
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <systemPropertyVariables>
-            <jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
-          </systemPropertyVariables>
-        </configuration>
-        <executions>
-          <execution>
-            <id>verify</id>
-            <goals>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>setupTestWebapp</id>
-            <phase>pre-integration-test</phase>
-            <configuration>
-              <target>
-                <unzip src="${project.build.directory}/${project.build.finalName}.war" dest="${cargo.run.dir}"/>
-                <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>setupCSV</id>
-            <phase>pre-integration-test</phase>
-            <configuration>
-              <target>
-                <copy file="${project.build.directory}/test-classes/test.csv" 
-                      todir="${test.csvdir.path}" 
-                      overwrite="true"/>
-              </target>    
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.cargo</groupId>
-        <artifactId>cargo-maven2-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <container>
-            <dependencies>
-              <dependency>
-                <groupId>com.h2database</groupId>
-                <artifactId>h2</artifactId>
-              </dependency>
-            </dependencies>
-          </container>
-          <configuration>
-            <type>standalone</type>
-            <properties>
-              <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
-              <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
-            </properties>
-          </configuration>
-          <deployables>
-            <deployable>
-              <location>${cargo.run.dir}</location>
-              <properties>
-                <context>syncope</context>
-              </properties>
-            </deployable>
-            <deployable>
-              <groupId>org.connid.bundles.soap</groupId>
-              <artifactId>wssample</artifactId>
-              <type>war</type>
-              <properties>
-                <context>wssample</context>
-              </properties>
-            </deployable>
-            <deployable>
-              <groupId>org.apache.syncope</groupId>
-              <artifactId>syncope-build-tools</artifactId>
-              <type>war</type>
-              <properties>
-                <context>syncope-build-tools</context>
-              </properties>
-            </deployable>
-          </deployables>
-        </configuration>
-        <executions>
-          <execution>
-            <id>start-container</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>start</goal>
-            </goals>
-            <configuration>
-              <wait>false</wait>
-            </configuration>
-          </execution>
-          <execution>
-            <id>stop-container</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>stop</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-            
-      <plugin>
-        <groupId>org.apache.openjpa</groupId>
-        <artifactId>openjpa-maven-plugin</artifactId>
-        <inherited>true</inherited>
-        <dependencies>
-          <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <version>${h2.version}</version>
-          </dependency>
-        </dependencies>
-        <configuration>
-          <persistenceXmlFile>${project.basedir}/src/main/resources/META-INF/spring-persistence.xml</persistenceXmlFile>
-          <includes>org/apache/syncope/core/persistence/beans/**/*.class</includes>
-          <connectionDriverName>org.springframework.jdbc.datasource.DriverManagerDataSource</connectionDriverName>
-          <connectionProperties>
-            driverClassName=org.h2.Driver,
-            url=jdbc:h2:mem:syncopedb
-            username=sa,
-            password=
-          </connectionProperties>
-        </configuration>
-        <executions>
-          <execution>
-            <id>enhancer</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>enhance</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-    </plugins>
-
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-
-    <testResources>
-      <testResource>
-        <directory>src/test/resources</directory>
-        <filtering>true</filtering>
-      </testResource>
-    </testResources>
-  </build>
-  
-  <profiles>
-    <profile>
-      <id>debug</id>
-      
-      <properties>
-        <skipTests>true</skipTests>
-      </properties>
-      
-      <build>
-        <defaultGoal>clean verify cargo:run</defaultGoal>
-
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.cargo</groupId>
-            <artifactId>cargo-maven2-plugin</artifactId>
-            <inherited>true</inherited>
-            <configuration>
-              <configuration>
-                <properties>
-                  <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-                    -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
-                </properties>
-              </configuration>
-            </configuration>
-            <executions>
-              <execution>
-                <id>start-container</id>
-                <phase>none</phase>
-              </execution>
-              <execution>
-                <id>stop-container</id>
-                <phase>none</phase>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>
+<?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.
+-->
+<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">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>${groupId}</groupId>
+    <artifactId>${rootArtifactId}</artifactId>
+    <version>${version}</version>
+  </parent>
+
+  <name>Apache Syncope sample project core</name>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>war</packaging>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-common</artifactId>
+      <classifier>javadoc</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-core</artifactId>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-core</artifactId>
+      <classifier>classes</classifier>
+    </dependency>
+
+    <!-- TEST -->
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-client</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-build-tools</artifactId>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.connid.bundles.soap</groupId>
+      <artifactId>wssample</artifactId>
+      <type>war</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!-- /TEST -->
+  </dependencies>
+
+  <build>
+    <finalName>syncope</finalName>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>set-bundles</id>
+            <phase>process-test-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+            
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <systemPropertyVariables>
+            <jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
+          </systemPropertyVariables>
+        </configuration>
+        <executions>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <id>setupTestWebapp</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target>
+                <unzip src="${project.build.directory}/${project.build.finalName}.war" dest="${cargo.run.dir}"/>
+                <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}"/>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>setupCSV</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target>
+                <copy file="${project.build.directory}/test-classes/test.csv" 
+                      todir="${test.csvdir.path}" 
+                      overwrite="true"/>
+              </target>    
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.cargo</groupId>
+        <artifactId>cargo-maven2-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <container>
+            <dependencies>
+              <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+              </dependency>
+            </dependencies>
+          </container>
+          <configuration>
+            <type>standalone</type>
+            <properties>
+              <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
+              <cargo.jvmargs>-noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+            </properties>
+          </configuration>
+          <deployables>
+            <deployable>
+              <location>${cargo.run.dir}</location>
+              <properties>
+                <context>syncope</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <groupId>org.connid.bundles.soap</groupId>
+              <artifactId>wssample</artifactId>
+              <type>war</type>
+              <properties>
+                <context>wssample</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <groupId>org.apache.syncope</groupId>
+              <artifactId>syncope-build-tools</artifactId>
+              <type>war</type>
+              <properties>
+                <context>syncope-build-tools</context>
+              </properties>
+            </deployable>
+          </deployables>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-container</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start</goal>
+            </goals>
+            <configuration>
+              <wait>false</wait>
+            </configuration>
+          </execution>
+          <execution>
+            <id>stop-container</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+            
+      <plugin>
+        <groupId>org.apache.openjpa</groupId>
+        <artifactId>openjpa-maven-plugin</artifactId>
+        <inherited>true</inherited>
+        <dependencies>
+          <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>${h2.version}</version>
+          </dependency>
+        </dependencies>
+        <configuration>
+          <persistenceXmlFile>${project.basedir}/src/main/resources/META-INF/spring-persistence.xml</persistenceXmlFile>
+          <includes>org/apache/syncope/core/persistence/beans/**/*.class</includes>
+          <connectionDriverName>org.springframework.jdbc.datasource.DriverManagerDataSource</connectionDriverName>
+          <connectionProperties>
+            driverClassName=org.h2.Driver,
+            url=jdbc:h2:mem:syncopedb
+            username=sa,
+            password=
+          </connectionProperties>
+        </configuration>
+        <executions>
+          <execution>
+            <id>enhancer</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>enhance</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+    </testResources>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>debug</id>
+      
+      <properties>
+        <skipTests>true</skipTests>
+      </properties>
+      
+      <build>
+        <defaultGoal>clean verify cargo:run</defaultGoal>
+
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.cargo</groupId>
+            <artifactId>cargo-maven2-plugin</artifactId>
+            <inherited>true</inherited>
+            <configuration>
+              <configuration>
+                <properties>
+                  <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+                    -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
+                </properties>
+              </configuration>
+            </configuration>
+            <executions>
+              <execution>
+                <id>start-container</id>
+                <phase>none</phase>
+              </execution>
+              <execution>
+                <id>stop-container</id>
+                <phase>none</phase>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Modified: syncope/trunk/archetype/src/main/resources/meta-pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/archetype/src/main/resources/meta-pom.xml?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/archetype/src/main/resources/meta-pom.xml (original)
+++ syncope/trunk/archetype/src/main/resources/meta-pom.xml Tue Aug  5 11:20:00 2014
@@ -1,165 +1,165 @@
-<?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.
-
--->
-<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/maven-v4_0_0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.syncope</groupId>
-    <artifactId>syncope</artifactId>
-    <version></version>
-  </parent>
-
-  <properties>
-    <syncope.version></syncope.version>
-    <secretKey>${secretKey}</secretKey>
-    <anonymousKey>${anonymousKey}</anonymousKey>
-  </properties>
-
-  <name>Apache Syncope sample project</name>
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <version>${version}</version>
-  <packaging>pom</packaging>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-common</artifactId>
-        <version>${syncope.version}</version>
-      </dependency> 
- 
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-common</artifactId>
-        <version>${syncope.version}</version>
-        <classifier>javadoc</classifier>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-client</artifactId>
-        <version>${syncope.version}</version>
-      </dependency> 
-
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-build-tools</artifactId>
-        <version>${syncope.version}</version>
-        <type>war</type>
-        <scope>test</scope>
-      </dependency> 
-            
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-core</artifactId>
-        <version>${syncope.version}</version>
-        <type>war</type>
-      </dependency> 
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-core</artifactId>
-        <version>${syncope.version}</version>
-        <classifier>classes</classifier>
-        <scope>provided</scope>
-      </dependency> 
-
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-console</artifactId>
-        <version>${syncope.version}</version>
-        <type>war</type>
-      </dependency> 
-      <dependency>
-        <groupId>org.apache.syncope</groupId>
-        <artifactId>syncope-console</artifactId>
-        <version>${syncope.version}</version>
-        <classifier>classes</classifier>
-        <scope>provided</scope>
-      </dependency> 
-    </dependencies>
-  </dependencyManagement>
-    
-  <build>
-    
-    <pluginManagement>
-      <plugins>
-        <!-- Disable LICENSE / NOTICE inclusion: see SYNCOPE-84 -->
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-war-plugin</artifactId>
-          <inherited>false</inherited>
-          <configuration>
-            <webResources>
-              <resource>
-                <directory>src/main/webapp</directory>
-                <includes>
-                  <include>**/*.jsp</include>
-                </includes>
-                <filtering>true</filtering>
-              </resource>
-            </webResources>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    
-    <!-- Disable legal check for generated projects: see SYNCOPE-84 -->
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>ianal-maven-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>            
-            <goals>
-              <goal>verify-legal-files</goal>
-            </goals>
-            <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <goals>
-              <goal>check</goal>
-            </goals>
-            <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-    
-  <modules>
-    <module>core</module>
-    <module>console</module>
-  </modules>
-
-</project>
+<?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.
+
+-->
+<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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope</artifactId>
+    <version></version>
+  </parent>
+
+  <properties>
+    <syncope.version></syncope.version>
+    <secretKey>${secretKey}</secretKey>
+    <anonymousKey>${anonymousKey}</anonymousKey>
+  </properties>
+
+  <name>Apache Syncope sample project</name>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <version>${version}</version>
+  <packaging>pom</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-common</artifactId>
+        <version>${syncope.version}</version>
+      </dependency> 
+ 
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-common</artifactId>
+        <version>${syncope.version}</version>
+        <classifier>javadoc</classifier>
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-client</artifactId>
+        <version>${syncope.version}</version>
+      </dependency> 
+
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-build-tools</artifactId>
+        <version>${syncope.version}</version>
+        <type>war</type>
+        <scope>test</scope>
+      </dependency> 
+            
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-core</artifactId>
+        <version>${syncope.version}</version>
+        <type>war</type>
+      </dependency> 
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-core</artifactId>
+        <version>${syncope.version}</version>
+        <classifier>classes</classifier>
+        <scope>provided</scope>
+      </dependency> 
+
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-console</artifactId>
+        <version>${syncope.version}</version>
+        <type>war</type>
+      </dependency> 
+      <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-console</artifactId>
+        <version>${syncope.version}</version>
+        <classifier>classes</classifier>
+        <scope>provided</scope>
+      </dependency> 
+    </dependencies>
+  </dependencyManagement>
+    
+  <build>
+    
+    <pluginManagement>
+      <plugins>
+        <!-- Disable LICENSE / NOTICE inclusion: see SYNCOPE-84 -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <inherited>false</inherited>
+          <configuration>
+            <webResources>
+              <resource>
+                <directory>src/main/webapp</directory>
+                <includes>
+                  <include>**/*.jsp</include>
+                </includes>
+                <filtering>true</filtering>
+              </resource>
+            </webResources>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    
+    <!-- Disable legal check for generated projects: see SYNCOPE-84 -->
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>ianal-maven-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>            
+            <goals>
+              <goal>verify-legal-files</goal>
+            </goals>
+            <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <inherited>true</inherited>
+        <executions>
+          <execution>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+    
+  <modules>
+    <module>core</module>
+    <module>console</module>
+  </modules>
+
+</project>

Modified: syncope/trunk/build-tools/src/main/resources/content.ldif
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/resources/content.ldif?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/resources/content.ldif (original)
+++ syncope/trunk/build-tools/src/main/resources/content.ldif Tue Aug  5 11:20:00 2014
@@ -45,13 +45,13 @@ uid: syncFromLDAP
 userpassword:: cGFzc3dvcmQxMjM=
 givenname: syncFromLDAP
 registeredAddress:  5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
-jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
- BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
- UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
- ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
- AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
- /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
- aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
- kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
- 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
+jpegPhoto:: /9j/4AAQSkZJRgABAQEBKwErAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoH
+ BwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQk
+ UDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wg
+ ARCAAEAAQDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQBAQAAAAAAAAAAAAAAA
+ AAAAAD/2gAMAwEAAhADEAAAAUuf/8QAFhABAQEAAAAAAAAAAAAAAAAAAwAS/9oACAEBAAEFAiLV
+ /8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/
+ aAAgBAgEBPwF//8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABESEiQf/aAAgBAQAGPwI9k2orq//EAB
+ kQAAMAAwAAAAAAAAAAAAAAAAERIQBBYf/aAAgBAQABPyF20CYlpT3P/9oADAMBAAIAAwAAABCf/
+ 8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPxB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/a
  AAgBAgEBPxB//8QAGhABAAIDAQAAAAAAAAAAAAAAAREhAEFRYf/aAAgBAQABPxCUKGDcAUFrvhoz/9k=

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java Tue Aug  5 11:20:00 2014
@@ -1,126 +1,126 @@
-/*
- * 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.syncope.client.rest;
-
-import java.security.AccessControlException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
-import javax.xml.ws.WebServiceException;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
-import org.apache.syncope.common.types.ClientExceptionType;
-import org.apache.syncope.common.types.RESTHeaders;
-import org.apache.syncope.common.SyncopeClientCompositeException;
-import org.apache.syncope.common.SyncopeClientException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Provider
-public class RestClientExceptionMapper implements ExceptionMapper<Exception>, ResponseExceptionMapper<Exception> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RestClientExceptionMapper.class);
-
-    @Override
-    public Response toResponse(final Exception exception) {
-        throw new UnsupportedOperationException(
-                "Call of toResponse() method is not expected in RestClientExceptionnMapper");
-    }
-
-    @Override
-    public Exception fromResponse(final Response response) {
-        final int statusCode = response.getStatus();
-        Exception ex;
-
-        // 1. Check for client (possibly composite) exception in HTTP header
-        SyncopeClientCompositeException scce = checkSyncopeClientCompositeException(response);
-        if (scce != null) {
-            if (scce.getExceptions().size() == 1) {
-                ex = scce.getExceptions().iterator().next();
-            } else {
-                ex = scce;
-            }
-        } // 2. Map SC_UNAUTHORIZED
-        else if (statusCode == Response.Status.UNAUTHORIZED.getStatusCode()) {
-            ex = new AccessControlException("Remote unauthorized exception");
-        } // 3. Map SC_BAD_REQUEST
-        else if (statusCode == Response.Status.BAD_REQUEST.getStatusCode()) {
-            ex = new BadRequestException();
-        } // 4. All other codes are mapped to runtime exception with HTTP code information
-        else {
-            ex = new WebServiceException(String.format("Remote exception with status code: %s",
-                    Response.Status.fromStatusCode(statusCode).name()));
-        }
-        LOG.error("Exception thrown by REST methods: " + ex.getMessage(), ex);
-        return ex;
-    }
-
-    private SyncopeClientCompositeException checkSyncopeClientCompositeException(final Response response) {
-        List<Object> exTypesInHeaders = response.getHeaders().get(RESTHeaders.ERROR_CODE);
-        if (exTypesInHeaders == null) {
-            LOG.debug("No " + RESTHeaders.ERROR_CODE + " provided");
-            return null;
-        }
-
-        final SyncopeClientCompositeException compException = SyncopeClientException.buildComposite();
-
-        final Set<String> handledExceptions = new HashSet<String>();
-        for (Object exceptionTypeValue : exTypesInHeaders) {
-            final String exTypeAsString = (String) exceptionTypeValue;
-            ClientExceptionType exceptionType = null;
-            try {
-                exceptionType = ClientExceptionType.fromHeaderValue(exTypeAsString);
-            } catch (IllegalArgumentException e) {
-                LOG.error("Unexpected value of " + RESTHeaders.ERROR_CODE + ": " + exTypeAsString, e);
-            }
-            if (exceptionType != null) {
-                handledExceptions.add(exTypeAsString);
-
-                final SyncopeClientException clientException = SyncopeClientException.build(exceptionType);
-
-                if (response.getHeaders().get(RESTHeaders.ERROR_INFO) != null
-                        && !response.getHeaders().get(RESTHeaders.ERROR_INFO).isEmpty()) {
-
-                    for (Object value : response.getHeaders().get(RESTHeaders.ERROR_INFO)) {
-                        final String element = value.toString();
-                        if (element.startsWith(exceptionType.getHeaderValue())) {
-                            clientException.getElements().add(StringUtils.substringAfter(value.toString(), ":"));
-                        }
-                    }
-                }
-                compException.addException(clientException);
-            }
-        }
-
-        exTypesInHeaders.removeAll(handledExceptions);
-        if (!exTypesInHeaders.isEmpty()) {
-            LOG.error("Unmanaged exceptions: " + exTypesInHeaders);
-        }
-
-        if (compException.hasExceptions()) {
-            return compException;
-        }
-
-        return null;
-    }
-}
+/*
+ * 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.syncope.client.rest;
+
+import java.security.AccessControlException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import javax.xml.ws.WebServiceException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
+import org.apache.syncope.common.types.ClientExceptionType;
+import org.apache.syncope.common.types.RESTHeaders;
+import org.apache.syncope.common.SyncopeClientCompositeException;
+import org.apache.syncope.common.SyncopeClientException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Provider
+public class RestClientExceptionMapper implements ExceptionMapper<Exception>, ResponseExceptionMapper<Exception> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(RestClientExceptionMapper.class);
+
+    @Override
+    public Response toResponse(final Exception exception) {
+        throw new UnsupportedOperationException(
+                "Call of toResponse() method is not expected in RestClientExceptionnMapper");
+    }
+
+    @Override
+    public Exception fromResponse(final Response response) {
+        final int statusCode = response.getStatus();
+        Exception ex;
+
+        // 1. Check for client (possibly composite) exception in HTTP header
+        SyncopeClientCompositeException scce = checkSyncopeClientCompositeException(response);
+        if (scce != null) {
+            if (scce.getExceptions().size() == 1) {
+                ex = scce.getExceptions().iterator().next();
+            } else {
+                ex = scce;
+            }
+        } // 2. Map SC_UNAUTHORIZED
+        else if (statusCode == Response.Status.UNAUTHORIZED.getStatusCode()) {
+            ex = new AccessControlException("Remote unauthorized exception");
+        } // 3. Map SC_BAD_REQUEST
+        else if (statusCode == Response.Status.BAD_REQUEST.getStatusCode()) {
+            ex = new BadRequestException();
+        } // 4. All other codes are mapped to runtime exception with HTTP code information
+        else {
+            ex = new WebServiceException(String.format("Remote exception with status code: %s",
+                    Response.Status.fromStatusCode(statusCode).name()));
+        }
+        LOG.error("Exception thrown by REST methods: " + ex.getMessage(), ex);
+        return ex;
+    }
+
+    private SyncopeClientCompositeException checkSyncopeClientCompositeException(final Response response) {
+        List<Object> exTypesInHeaders = response.getHeaders().get(RESTHeaders.ERROR_CODE);
+        if (exTypesInHeaders == null) {
+            LOG.debug("No " + RESTHeaders.ERROR_CODE + " provided");
+            return null;
+        }
+
+        final SyncopeClientCompositeException compException = SyncopeClientException.buildComposite();
+
+        final Set<String> handledExceptions = new HashSet<String>();
+        for (Object exceptionTypeValue : exTypesInHeaders) {
+            final String exTypeAsString = (String) exceptionTypeValue;
+            ClientExceptionType exceptionType = null;
+            try {
+                exceptionType = ClientExceptionType.fromHeaderValue(exTypeAsString);
+            } catch (IllegalArgumentException e) {
+                LOG.error("Unexpected value of " + RESTHeaders.ERROR_CODE + ": " + exTypeAsString, e);
+            }
+            if (exceptionType != null) {
+                handledExceptions.add(exTypeAsString);
+
+                final SyncopeClientException clientException = SyncopeClientException.build(exceptionType);
+
+                if (response.getHeaders().get(RESTHeaders.ERROR_INFO) != null
+                        && !response.getHeaders().get(RESTHeaders.ERROR_INFO).isEmpty()) {
+
+                    for (Object value : response.getHeaders().get(RESTHeaders.ERROR_INFO)) {
+                        final String element = value.toString();
+                        if (element.startsWith(exceptionType.getHeaderValue())) {
+                            clientException.getElements().add(StringUtils.substringAfter(value.toString(), ":"));
+                        }
+                    }
+                }
+                compException.addException(clientException);
+            }
+        }
+
+        exTypesInHeaders.removeAll(handledExceptions);
+        if (!exTypesInHeaders.isEmpty()) {
+            LOG.error("Unmanaged exceptions: " + exTypesInHeaders);
+        }
+
+        if (compException.hasExceptions()) {
+            return compException;
+        }
+
+        return null;
+    }
+}

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java?rev=1615910&r1=1615909&r2=1615910&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/AbstractBaseBean.java Tue Aug  5 11:20:00 2014
@@ -1,54 +1,54 @@
-/*
- * 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.syncope.common;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.syncope.common.to.AbstractTaskTO;
-import org.apache.syncope.common.to.ReportTO;
-import org.apache.syncope.common.to.RoleTO;
-import org.apache.syncope.common.to.UserTO;
-
-@XmlType
-// Reporting here only classes used via PagedResult
-@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, RoleTO.class, UserTO.class })
-public abstract class AbstractBaseBean implements Serializable {
-
-    private static final long serialVersionUID = 3119542005279892164L;
-
-    @Override
-    public boolean equals(final Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
-    }
-
-    @Override
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-
-    @Override
-    public String toString() {
-        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
-    }
-}
+/*
+ * 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.syncope.common;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.to.AbstractTaskTO;
+import org.apache.syncope.common.to.ReportTO;
+import org.apache.syncope.common.to.RoleTO;
+import org.apache.syncope.common.to.UserTO;
+
+@XmlType
+// Reporting here only classes used via PagedResult
+@XmlSeeAlso({ AbstractTaskTO.class, ReportTO.class, RoleTO.class, UserTO.class })
+public abstract class AbstractBaseBean implements Serializable {
+
+    private static final long serialVersionUID = 3119542005279892164L;
+
+    @Override
+    public boolean equals(final Object obj) {
+        return EqualsBuilder.reflectionEquals(this, obj);
+    }
+
+    @Override
+    public int hashCode() {
+        return HashCodeBuilder.reflectionHashCode(this);
+    }
+
+    @Override
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+    }
+}



Mime
View raw message