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 2020/03/16 10:41:38 UTC

[syncope] branch SYNCOPE-1545 updated (13624ac -> 3d4e7c9)

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

ilgrosso pushed a change to branch SYNCOPE-1545
in repository https://gitbox.apache.org/repos/asf/syncope.git.


 discard 13624ac  [SYNCOPE-1545] Archetype
     new 3d4e7c9  [SYNCOPE-1545] Archetype

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (13624ac)
            \
             N -- N -- N   refs/heads/SYNCOPE-1545 (3d4e7c9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)


[syncope] 01/01: [SYNCOPE-1545] Archetype

Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch SYNCOPE-1545
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 3d4e7c9cc5ad808a9946cf62e2bd1ff8c5f36a9e
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Sun Mar 15 17:26:24 2020 +0100

    [SYNCOPE-1545] Archetype
---
 .travis.yml                                        |  15 ++-
 archetype/pom.xml                                  |  32 +++++
 .../META-INF/maven/archetype-metadata.xml          |  13 ++
 .../main/resources/archetype-resources/fit/pom.xml |  12 +-
 .../main/resources/archetype-resources/wa/pom.xml  | 134 +++++++++++++++++++++
 .../wa/src/test/resources/keymaster.properties     |  19 +++
 archetype/src/main/resources/meta-pom.xml          |   7 ++
 core/idrepo/logic/pom.xml                          |   8 --
 .../org/apache/syncope/fit/core/ReportITCase.java  |   7 +-
 pom.xml                                            |  33 -----
 wa/pom.xml                                         |   1 +
 11 files changed, 226 insertions(+), 55 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a1fa1b3..09de8a2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,12 +22,15 @@ cache:
   bundler: false
   cargo: false
   directories:
-    - $HOME/.m2
+    - '$HOME/.m2'
 git:
   depth: 2
 env:
   global:
   - MAVEN_OPTS="-Xmx4096M -Xss128M -XX:+CMSClassUnloadingEnabled -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -noverify"
+  - JAVAEE_CONTAINER=Tomcat
+  - DBMS=H2
+  - jaxrsContentType=application/json
 install: true
 notifications:
   email:
@@ -41,11 +44,11 @@ jobs:
   include:
     - stage: build
       name: "Build"
-      script: mvn -T 1C --quiet -P skipTests,all
+      script: mvn -T 1C -P skipTests,all
       #######################################################
     - stage: validate
       name: "Checkstyle, Legal Files, Modernizer and Release Audit Tool (RAT) Analysis"
-      script: mvn -T 1C checkstyle:check ianal:verify-legal-files modernizer:modernizer apache-rat:check --quiet
+      script: mvn -T 1C checkstyle:check ianal:verify-legal-files modernizer:modernizer apache-rat:check
       ######################################################
     - stage: test
       name: "Unit Tests"
@@ -53,11 +56,7 @@ jobs:
       ######################################################
     - stage: fit
       name: "Full Integration Tests: Apache Tomcat / H2 / JSON Content-Type"
-      env:
-       - JAVAEE_CONTAINER=Tomcat
-       - DBMS=H2
-       - jaxrsContentType=application/json
-      script: travis_wait 55 mvn -f fit/core-reference/pom.xml verify -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
+      script: mvn -f fit/core-reference/pom.xml verify -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
       after_failure:
        - cat fit/core-reference/target/log/*
        - cat fit/core-reference/target/failsafe-reports/org.apache.syncope.fit.*-output.txt
diff --git a/archetype/pom.xml b/archetype/pom.xml
index 54a749a..f500f59 100644
--- a/archetype/pom.xml
+++ b/archetype/pom.xml
@@ -354,6 +354,38 @@ under the License.
           <include>keymaster.properties</include>          
         </includes>
       </resource>
+
+      <resource>
+        <directory>../wa/src/main/resources</directory>
+        <targetPath>${project.build.outputDirectory}/archetype-resources/wa/src/main/resources</targetPath>
+      </resource>
+      <resource>
+        <directory>../wa/src/test/resources</directory>
+        <targetPath>${project.build.outputDirectory}/archetype-resources/wa/src/main/resources</targetPath>
+        <includes>
+          <include>keymaster.properties</include>          
+        </includes>
+      </resource>
+      <resource>
+        <directory>../fit/wa-reference/src/main/resources</directory>
+        <targetPath>${project.build.outputDirectory}/archetype-resources/wa/src/main/resources</targetPath>
+        <includes>
+          <include>application-embedded.properties</include>
+          <include>log4j2.xml</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>../fit/wa-reference/src/main/resources</directory>
+        <targetPath>${project.build.outputDirectory}/archetype-resources/wa/src/test/resources</targetPath>
+        <includes>
+          <include>wa</include>
+          <include>keymaster.properties</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>../fit/wa-reference/src/main/webapp/WEB-INF</directory>
+        <targetPath>${project.build.outputDirectory}/archetype-resources/wa/src/main/webapp/WEB-INF</targetPath>
+      </resource>
     </resources>
   </build>
   
diff --git a/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index f22b5fb..9fa586c 100644
--- a/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -79,6 +79,19 @@ under the License.
         </fileSet>
       </fileSets>
     </module>
+    <module id="syncope-wa" dir="wa" name="syncope-wa">
+      <fileSets>
+        <fileSet filtered="false" encoding="UTF-8">
+          <directory>src/main/resources</directory>
+        </fileSet>
+        <fileSet filtered="false" encoding="UTF-8">
+          <directory>src/main/webapp</directory>
+        </fileSet>
+        <fileSet filtered="false" encoding="UTF-8">
+          <directory>src/test/resources</directory>
+        </fileSet>
+      </fileSets>
+    </module>
     <module id="syncope-sra" dir="sra" name="syncope-sra">
       <fileSets>
         <fileSet filtered="false" encoding="UTF-8">
diff --git a/archetype/src/main/resources/archetype-resources/fit/pom.xml b/archetype/src/main/resources/archetype-resources/fit/pom.xml
index 53745a8..6be3d9d 100644
--- a/archetype/src/main/resources/archetype-resources/fit/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/fit/pom.xml
@@ -153,6 +153,10 @@ under the License.
                 <copy file="../enduser/target/test-classes/customTemplate.json" 
                       todir="../enduser/target/syncope-enduser/WEB-INF/classes" 
                       overwrite="true"/>
+
+                <copy file="../wa/target/test-classes/keymaster.properties" 
+                      todir="../wa/target/syncope-wa/WEB-INF/classes" 
+                      overwrite="true"/>
               </target>
             </configuration>
             <goals>
@@ -181,7 +185,7 @@ under the License.
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>java</executable>
+              <executable>${JAVA_HOME}/bin/java</executable>
               <arguments>
                 <argument>-jar</argument>
                 <argument>${basedir}/../sra/target/syncope-sra.jar</argument>
@@ -253,6 +257,12 @@ under the License.
                 <context>syncope-enduser</context>
               </properties>
             </deployable>
+            <deployable>
+              <location>../wa/target/syncope-wa</location>
+              <properties>
+                <context>syncope-wa</context>
+              </properties>
+            </deployable>
           </deployables>
         </configuration>
       </plugin>
diff --git a/archetype/src/main/resources/archetype-resources/wa/pom.xml b/archetype/src/main/resources/archetype-resources/wa/pom.xml
new file mode 100644
index 0000000..91b4a22
--- /dev/null
+++ b/archetype/src/main/resources/archetype-resources/wa/pom.xml
@@ -0,0 +1,134 @@
+<?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 - WA</name>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>war</packaging>
+
+  <properties>
+    <guava.version>28.2-jre</guava.version>
+    <opensaml.version>3.4.5</opensaml.version>
+    <bootstrap.version>4.4.1</bootstrap.version>
+    <slf4j.version>2.0.0-alpha1</slf4j.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${groupId}</groupId>
+      <artifactId>syncope-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>  
+    
+    <dependency>
+      <groupId>org.apache.syncope</groupId>
+      <artifactId>syncope-wa</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.syncope.ext.self-keymaster</groupId>
+      <artifactId>syncope-ext-self-keymaster-client</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.syncope.common.keymaster</groupId>
+      <artifactId>syncope-common-keymaster-client-zookeeper</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <finalName>syncope-wa</finalName>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <webResources>
+            <resource>
+              <directory>${basedir}/src/main/webapp/WEB-INF</directory>
+              <filtering>true</filtering>
+              <targetPath>WEB-INF</targetPath>
+              <includes>
+                <include>web.xml</include>
+              </includes>
+            </resource>
+          </webResources>
+        </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>
+    </testResources>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>executable</id>
+      
+      <dependencies>
+        <dependency>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+      </dependencies>
+        
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-maven-plugin</artifactId>
+            <configuration>
+              <mainClass>org.apache.syncope.wa.SyncopeWAApplication</mainClass>
+              <layout>ZIP</layout>
+            </configuration>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>repackage</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>
diff --git a/archetype/src/main/resources/archetype-resources/wa/src/test/resources/keymaster.properties b/archetype/src/main/resources/archetype-resources/wa/src/test/resources/keymaster.properties
new file mode 100644
index 0000000..033fe3b
--- /dev/null
+++ b/archetype/src/main/resources/archetype-resources/wa/src/test/resources/keymaster.properties
@@ -0,0 +1,19 @@
+# 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.
+keymaster.address=http://localhost:9080/syncope/rest/keymaster
+keymaster.username=${anonymousUser}
+keymaster.password=${anonymousKey}
diff --git a/archetype/src/main/resources/meta-pom.xml b/archetype/src/main/resources/meta-pom.xml
index 8eb4a43..fe5f3e8 100644
--- a/archetype/src/main/resources/meta-pom.xml
+++ b/archetype/src/main/resources/meta-pom.xml
@@ -89,6 +89,12 @@ under the License.
       </dependency>
 
       <dependency>
+        <groupId>org.apache.syncope</groupId>
+        <artifactId>syncope-wa</artifactId>
+        <version>${syncope.version}</version>
+      </dependency>
+
+      <dependency>
         <groupId>org.apache.syncope.ext.self-keymaster</groupId>
         <artifactId>syncope-ext-self-keymaster-rest-cxf</artifactId>
         <version>${syncope.version}</version>
@@ -135,6 +141,7 @@ under the License.
     <module>console</module>
     <module>enduser</module>
     <module>sra</module>
+    <module>wa</module>
     <module>fit</module>
   </modules>
 
diff --git a/core/idrepo/logic/pom.xml b/core/idrepo/logic/pom.xml
index 67df68e..cfc1aac 100644
--- a/core/idrepo/logic/pom.xml
+++ b/core/idrepo/logic/pom.xml
@@ -70,14 +70,6 @@ under the License.
       <groupId>org.apache.xmlgraphics</groupId>
       <artifactId>fop</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.xmlgraphics</groupId>
-      <artifactId>batik-i18n</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.xmlgraphics</groupId>
-      <artifactId>batik-constants</artifactId>
-    </dependency>
 
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
index 918175c..ab9e35e 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
@@ -238,8 +238,7 @@ public class ReportITCase extends AbstractITCase {
         assertNotNull(response);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusInfo().getStatusCode());
         assertNotNull(response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION));
-        assertTrue(response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION).
-                endsWith('.' + fmt.name().toLowerCase()));
+        assertTrue(response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION).endsWith('.' + fmt.name().toLowerCase()));
 
         Object entity = response.getEntity();
         assertTrue(entity instanceof InputStream);
@@ -249,7 +248,6 @@ public class ReportITCase extends AbstractITCase {
     @Test
     public void executeAndExport() throws IOException {
         ReportTO reportTO = reportService.read("0062ea9c-924d-4ecf-9961-4492a8cc6d1b");
-        reportTO.setKey(null);
         reportTO.setName("executeAndExport" + getUUIDString());
         reportTO.setActive(false);
         reportTO.getExecutions().clear();
@@ -282,10 +280,10 @@ public class ReportITCase extends AbstractITCase {
         try {
             Thread.sleep(1000);
         } catch (InterruptedException e) {
+            // ignore
         }
 
         ReportTO reportTO = reportService.read("0062ea9c-924d-4ecf-9961-4492a8cc6d1b");
-        reportTO.setKey(null);
         reportTO.setName("deleteExecutions" + getUUIDString());
         reportTO.getExecutions().clear();
         reportTO = createReport(reportTO);
@@ -379,7 +377,6 @@ public class ReportITCase extends AbstractITCase {
     public void issueSYNCOPE102() throws IOException {
         // Create
         ReportTO reportTO = reportService.read("0062ea9c-924d-4ecf-9961-4492a8cc6d1b");
-        reportTO.setKey(null);
         reportTO.setName("issueSYNCOPE102" + getUUIDString());
         reportTO = createReport(reportTO);
         assertNotNull(reportTO);
diff --git a/pom.xml b/pom.xml
index bfc1ce0..81ff696 100644
--- a/pom.xml
+++ b/pom.xml
@@ -422,7 +422,6 @@ under the License.
     <quartz.version>2.3.2</quartz.version>
 
     <cocoon.version>3.0.0-alpha-3</cocoon.version>
-    <batik.version>1.12</batik.version>
 
     <groovy.version>3.0.1</groovy.version>
 
@@ -1377,37 +1376,11 @@ under the License.
             <artifactId>xalan</artifactId>
           </exclusion>
           <exclusion>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-svg-dom</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-bridge</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-transcoder</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-extension</artifactId>
-          </exclusion>
-          <exclusion>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>
           </exclusion>
         </exclusions>
       </dependency>
-      <dependency>
-        <groupId>org.apache.xmlgraphics</groupId>
-        <artifactId>batik-i18n</artifactId>
-        <version>${batik.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xmlgraphics</groupId>
-        <artifactId>batik-constants</artifactId>
-        <version>${batik.version}</version>
-      </dependency>
 
       <!-- Flowable -->
       <dependency>
@@ -2126,12 +2099,6 @@ under the License.
         </plugin>
 
         <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>properties-maven-plugin</artifactId>
-          <version>1.0.0</version>
-        </plugin>
-
-        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
           <version>3.1.0</version>
diff --git a/wa/pom.xml b/wa/pom.xml
index fe7a713..b733af1 100644
--- a/wa/pom.xml
+++ b/wa/pom.xml
@@ -179,6 +179,7 @@ under the License.
       <groupId>org.apereo.cas</groupId>
       <artifactId>cas-server-webapp-config</artifactId>
     </dependency>
+
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-web</artifactId>