syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/4] syncope git commit: [SYNCOPE-657] Checkstyle enabled in all profiles but skipTests
Date Wed, 06 May 2015 08:37:54 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 3fc2f962b -> 62193429f


http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
b/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
index 4ccc0d2..77391c3 100644
--- a/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
+++ b/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
@@ -36,15 +36,15 @@ import org.apache.syncope.installer.utilities.InstallLog;
 import org.apache.syncope.installer.utilities.MavenUtils;
 import org.xml.sax.SAXException;
 
-public class ContainerProcess extends BaseProcess {
+public final class ContainerProcess extends BaseProcess {
 
-    private final static String HTTP = "http";
+    private static final String HTTP = "http";
 
-    private final static String HTTPS = "https";
+    private static final String HTTPS = "https";
 
-    private final static String DEFAULT_HOST = "localhost";
+    private static final String DEFAULT_HOST = "localhost";
 
-    private final static String DEFAULT_PORT = "8080";
+    private static final String DEFAULT_PORT = "8080";
 
     private String installPath;
 
@@ -148,7 +148,7 @@ public class ContainerProcess extends BaseProcess {
             switch (selectedContainer) {
                 case GLASSFISH:
                     final File glassfishCoreWebXmlFile =
-                            new File(syncopeInstallDir + properties.getProperty("glassfishCoreWebXmlFile"));
+                            new File(syncopeInstallDir + PROPERTIES.getProperty("glassfishCoreWebXmlFile"));
                     final String contentGlassfishWebXmlFile = fileSystemUtils.readFile(glassfishCoreWebXmlFile);
                     fileSystemUtils.writeToFile(glassfishCoreWebXmlFile,
                             contentGlassfishWebXmlFile.replace(GlassfishCoreWebXml.PLACEHOLDER,
@@ -160,8 +160,8 @@ public class ContainerProcess extends BaseProcess {
         }
 
         final File consolePropertiesFile = new File(syncopeInstallDir
-                + properties.getProperty("consoleResDirectory")
-                + File.separator + properties.getProperty("consolePropertiesFile"));
+                + PROPERTIES.getProperty("consoleResDirectory")
+                + File.separator + PROPERTIES.getProperty("consolePropertiesFile"));
         final String contentConsolePropertiesFile = fileSystemUtils.readFile(consolePropertiesFile);
 
         final String scheme;
@@ -267,6 +267,7 @@ public class ContainerProcess extends BaseProcess {
                     InstallLog.getInstance().error(messageError);
                 }
                 break;
+
             case JBOSS:
                 final JBoss jBoss = new JBoss(
                         jbossSsl, jbossHost, jbossManagementPort, jbossAdminUsername,
@@ -292,6 +293,7 @@ public class ContainerProcess extends BaseProcess {
                     InstallLog.getInstance().error(messageError);
                 }
                 break;
+
             case GLASSFISH:
                 final String createJavaOptCommand = "sh " + glassfishDir + Glassfish.CREATE_JAVA_OPT_COMMAND;
                 fileSystemUtils.exec(createJavaOptCommand, null);
@@ -303,6 +305,8 @@ public class ContainerProcess extends BaseProcess {
                 fileSystemUtils.exec("sh " + glassfishDir
                         + Glassfish.DEPLOY_COMMAND + glassfish.deployConsole(), null);
                 break;
+
+            default:
         }
     }
 
@@ -310,13 +314,18 @@ public class ContainerProcess extends BaseProcess {
             final FileSystemUtils fileSystemUtils, final AbstractUIProcessHandler handler)
{
         fileSystemUtils.copyFileFromResources("/jboss/persistenceContextEMFactory.xml",
                 syncopeInstallDir
-                + properties.getProperty("persistenceContextEMFactoryFile"), handler);
+                + PROPERTIES.getProperty("persistenceContextEMFactoryFile"), handler);
         final File persistenceContextEMFactoryFile = new File(
-                syncopeInstallDir + properties.getProperty("persistenceContextEMFactoryFile"));
+                syncopeInstallDir + PROPERTIES.getProperty("persistenceContextEMFactoryFile"));
         final String contentPersistenceContextEMFactory = fileSystemUtils.readFile(persistenceContextEMFactoryFile);
         fileSystemUtils.writeToFile(
                 persistenceContextEMFactoryFile,
                 contentPersistenceContextEMFactory.replace(PersistenceContextEMFactoryXml.PLACEHOLDER,
                         PersistenceContextEMFactoryXml.JBOSS));
     }
+
+    private ContainerProcess() {
+        super();
+        // private constructor for static utility class
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
index ba2cd4b..af5adbf 100644
--- a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
+++ b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
@@ -66,6 +66,7 @@ public class PersistenceProcess extends BaseProcess {
                 persistenceProperties.append(String.format(
                         PersistenceProperties.POSTGRES, persistenceUrl, persistenceUser,
persistencePassword));
                 break;
+
             case MYSQL:
                 persistenceProperties.append(String.format(
                         PersistenceProperties.MYSQL, persistenceUrl, persistenceUser, persistencePassword));
@@ -75,23 +76,28 @@ public class PersistenceProcess extends BaseProcess {
                     persistenceProperties.append(PersistenceProperties.MYSQL_QUARTZ);
                 }
                 break;
+
             case MARIADB:
                 persistenceProperties.append(String.format(
                         PersistenceProperties.MARIADB, persistenceUrl, persistenceUser, persistencePassword));
                 break;
+
             case ORACLE:
                 persistenceProperties.append(String.format(
                         PersistenceProperties.ORACLE, persistenceUrl, persistenceUser, persistencePassword,
                         oracleTableSpace));
                 break;
+
             case SQLSERVER:
                 persistenceProperties.append(String.format(
                         PersistenceProperties.SQLSERVER, persistenceUrl, persistenceUser,
persistencePassword));
                 break;
+
+            default:
         }
 
         fileSystemUtils.writeToFile(new File(
-                syncopeInstallDir + properties.getProperty("persistencePropertiesFile")),
+                syncopeInstallDir + PROPERTIES.getProperty("persistencePropertiesFile")),
                 persistenceProperties.toString());
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
index 64e02f7..8564c41 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.installer.utilities;
 
 import java.net.Authenticator;
-import java.net.MalformedURLException;
 import java.net.PasswordAuthentication;
 import org.apache.syncope.installer.enums.DBs;
 import java.net.URL;
@@ -28,13 +27,13 @@ import java.sql.Driver;
 
 public final class DriverLoader extends URLClassLoader {
 
-    private final static String POSTGRES_JAR =
+    private static final String POSTGRES_JAR =
             "http://repo1.maven.org/maven2/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar";
 
-    private final static String MYSQL_JAR =
+    private static final String MYSQL_JAR =
             "http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar";
 
-    private final static String MARIADB_JAR =
+    private static final String MARIADB_JAR =
             "http://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/1.1.8/mariadb-java-client-1.1.8.jar";
 
     private static final String POSTGRES_CLASS_DRIVER = "org.postgresql.Driver";
@@ -48,10 +47,11 @@ public final class DriverLoader extends URLClassLoader {
         addURL(urls[0]);
     }
 
-    private static DriverLoader driverLoader;
+    private static DriverLoader DRIVER_LOADER;
 
     public static Driver load(final DBs selectedDB, final boolean isProxyEnabled, final String
proxyHost,
             final String proxyPort, final String proxyUser, final String proxyPwd) {
+
         Driver driver = null;
         switch (selectedDB) {
             case POSTGRES:
@@ -79,6 +79,7 @@ public final class DriverLoader extends URLClassLoader {
     private static Driver downloadDriver(final String driverUrl, final String driverClassName,
             final boolean isProxyEnabled, final String proxyHost, final String proxyPort,
final String proxyUser,
             final String proxyPwd) {
+
         Driver driver = null;
         try {
             if (isProxyEnabled) {
@@ -97,12 +98,10 @@ public final class DriverLoader extends URLClassLoader {
                 }
             }
             final URL[] url = { new URL(driverUrl) };
-            driverLoader = new DriverLoader(url);
-            driver = (Driver) driverLoader.loadClass(driverClassName).newInstance();
-        } catch (ClassNotFoundException e) {
-        } catch (InstantiationException ex) {
-        } catch (IllegalAccessException ex) {
-        } catch (MalformedURLException ex) {
+            DRIVER_LOADER = new DriverLoader(url);
+            driver = (Driver) DRIVER_LOADER.loadClass(driverClassName).newInstance();
+        } catch (Exception e) {
+            // ignore
         }
 
         return driver;

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
index 1e8e94c..023ce7a 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
@@ -21,9 +21,6 @@ package org.apache.syncope.installer.utilities;
 import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
 import java.io.File;
 import java.io.IOException;
-import java.security.KeyManagementException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
@@ -190,6 +187,7 @@ public class HttpUtils {
                         new HttpGet(String.format(HTTP_URL_TEMPLATE, host, port))).getStatusLine().getStatusCode();
             }
         } catch (IOException ex) {
+            // ignore
         }
 
         return status;
@@ -203,10 +201,10 @@ public class HttpUtils {
             chc = HttpClients.custom().setSSLSocketFactory(
                     new SSLConnectionSocketFactory(builder.build(),
                             SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER)).build();
-        } catch (KeyManagementException ex) {
-        } catch (NoSuchAlgorithmException ex) {
-        } catch (KeyStoreException ex) {
+        } catch (Exception ex) {
+            // ignore
         }
+
         return chc;
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
index 91c03df..2893e82 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
@@ -22,9 +22,9 @@ import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
 import java.io.File;
 import java.util.Date;
 
-public class InstallLog {
+public final class InstallLog {
 
-    private static InstallLog installLog = null;
+    private static InstallLog INSTANCE = null;
 
     private final File log;
 
@@ -40,15 +40,15 @@ public class InstallLog {
 
     public static InstallLog initialize(final String installPath, final AbstractUIProcessHandler
handler) {
         synchronized (InstallLog.class) {
-            if (installLog == null) {
-                installLog = new InstallLog(installPath, handler);
+            if (INSTANCE == null) {
+                INSTANCE = new InstallLog(installPath, handler);
             }
         }
-        return installLog;
+        return INSTANCE;
     }
 
     public static InstallLog getInstance() {
-        return installLog;
+        return INSTANCE;
     }
 
     public void error(final String msg) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
index f8f6b64..c41ff9f 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
@@ -24,25 +24,33 @@ import java.io.IOException;
 import org.apache.syncope.installer.containers.jboss.JBossAddResponse;
 import org.apache.syncope.installer.containers.jboss.JBossDeployRequestContent;
 
-public class JsonUtils {
+public final class JsonUtils {
 
-    private final static ObjectMapper objectMapper = new ObjectMapper();
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
 
     public static JBossAddResponse jBossAddResponse(final String responseBodyAsString) {
         JBossAddResponse jBossAddResponse = null;
         try {
-            jBossAddResponse = objectMapper.readValue(responseBodyAsString, JBossAddResponse.class);
+            jBossAddResponse = OBJECT_MAPPER.readValue(responseBodyAsString, JBossAddResponse.class);
         } catch (IOException ioe) {
+            // ignore
         }
+
         return jBossAddResponse;
     }
 
     public static String jBossDeployRequestContent(final JBossDeployRequestContent jBossDeployRequestContent)
{
         String jBossDeployRequestContentString = "";
         try {
-            jBossDeployRequestContentString = objectMapper.writeValueAsString(jBossDeployRequestContent);
+            jBossDeployRequestContentString = OBJECT_MAPPER.writeValueAsString(jBossDeployRequestContent);
         } catch (JsonProcessingException ioe) {
+            // ignore
         }
+
         return jBossDeployRequestContentString;
     }
+
+    private JsonUtils() {
+        // private constructor for static utility class
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
index f39d4b4..24f85dc 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
@@ -82,7 +82,8 @@ public class MavenUtils {
         properties.setProperty("archetypeGroupId", "org.apache.syncope");
         properties.setProperty("archetypeArtifactId", "syncope-archetype");
         if (archetypeVersion.contains("SNAPSHOT")) {
-            properties.setProperty("archetypeRepository", "http://repository.apache.org/content/repositories/snapshots");
+            properties.setProperty("archetypeRepository",
+                    "http://repository.apache.org/content/repositories/snapshots");
         } else {
             properties.setProperty("archetypeRepository", "http://repo1.maven.org/maven2");
         }
@@ -94,7 +95,9 @@ public class MavenUtils {
         return properties;
     }
 
-    public void mvnCleanPackageWithProperties(final String path, final Properties properties,
final File customSettingsFile) {
+    public void mvnCleanPackageWithProperties(
+            final String path, final Properties properties, final File customSettingsFile)
{
+
         final InvocationRequest request = new DefaultInvocationRequest();
         request.setProperties(properties);
         if (customSettingsFile != null && FileUtils.sizeOf(customSettingsFile) >
0) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
index be661a7..79173a4 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
@@ -24,7 +24,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.apache.commons.codec.binary.Hex;
 
-public class PasswordGenerator {
+public final class PasswordGenerator {
 
     public static String password(final String password, final String digest) {
         String pwd = "";
@@ -38,4 +38,7 @@ public class PasswordGenerator {
         return pwd;
     }
 
+    private PasswordGenerator() {
+        // private constructor for static utility class
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
b/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
index 4fe3363..064a9cc 100644
--- a/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
+++ b/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
@@ -27,7 +27,6 @@ public class ArchetypeValidator extends AbstractValidator {
 
     @Override
     public Status validateData(final InstallData installData) {
-
         final String mavenDir = installData.getVariable("mvn.directory");
         final String mavenGroupId = installData.getVariable("mvn.groupid");
         final String mavenArtifactId = installData.getVariable("mvn.artifactid");
@@ -41,7 +40,7 @@ public class ArchetypeValidator extends AbstractValidator {
         if (isEmpty(mavenDir)) {
             error.append("Maven home directory\n");
             verified = false;
-        } else if (!new File(mavenDir + "/bin/mvn").exists()){
+        } else if (!new File(mavenDir + "/bin/mvn").exists()) {
             error.append("Maven home directory not valid, check it please...\n");
             verified = false;
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/installer/src/main/resources/installer.properties
----------------------------------------------------------------------
diff --git a/installer/src/main/resources/installer.properties b/installer/src/main/resources/installer.properties
index 6e33c6a..47a8aa6 100644
--- a/installer/src/main/resources/installer.properties
+++ b/installer/src/main/resources/installer.properties
@@ -24,4 +24,5 @@ persistenceContextEMFactoryFile=core/src/main/resources/persistenceContextEMFact
 coreMetaInfDirectory=core/src/main/resources/META-INF
 persistencePropertiesFile=core/src/main/resources/persistence.properties
 consolePropertiesFile=console.properties
-modelerPomFile=modelerPom.xml
\ No newline at end of file
+modelerPomFile=modelerPom.xml
+

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2dc8fbf..fa2e49a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -326,7 +326,7 @@ under the License.
     <connid.ldap.version>1.4.0</connid.ldap.version>
     <connid.ad.version>1.2.3</connid.ad.version>
 
-    <cxf.version>3.1.0-SNAPSHOT</cxf.version>
+    <cxf.version>3.1.0</cxf.version>
 
     <camel.version>2.15.2</camel.version>	
 
@@ -1213,18 +1213,6 @@ under the License.
             <targetJdk>${targetJdk}</targetJdk>
           </configuration>
         </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-pmd-plugin</artifactId>
-          <version>3.4</version>
-          <configuration>
-            <rulesets>
-              <rulesets>${rootpom.basedir}/src/main/resources/org/apache/syncope/pmd.xml</rulesets>
-            </rulesets>
-            <linkXRef>false</linkXRef>
-            <targetJdk>${targetJdk}</targetJdk>
-          </configuration>
-        </plugin>
         
         <plugin>
           <groupId>org.vafer</groupId>
@@ -1265,7 +1253,7 @@ under the License.
         </configuration>
         <executions>
           <execution>
-            <id>modernizer</id>
+            <id>modernizer-check</id>
             <phase>verify</phase>
             <goals>
               <goal>modernizer</goal>
@@ -1274,7 +1262,6 @@ under the License.
         </executions>
       </plugin>
 
-      <!-- Enable with SYNCOPE-657
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
@@ -1288,20 +1275,6 @@ under the License.
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-pmd-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>pmd-check</id>
-            <phase>verify</phase>
-            <goals>
-              <goal>check</goal>
-              <goal>cpd-check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>-->
 
       <plugin>
         <groupId>org.codehaus.gmaven</groupId>
@@ -1359,6 +1332,7 @@ under the License.
         </configuration>
         <executions>
           <execution>
+            <id>rat-check</id>
             <phase>verify</phase>
             <goals>
               <goal>check</goal>
@@ -1559,6 +1533,41 @@ under the License.
 
       <build>
         <defaultGoal>clean install</defaultGoal>
+        
+        <plugins>
+          <plugin>
+            <groupId>org.gaul</groupId>
+            <artifactId>modernizer-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>modernizer-check</id>
+                <phase>none</phase>
+              </execution>
+            </executions>
+          </plugin>
+
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>checkstyle-check</id>
+                <phase>none</phase>
+              </execution>
+            </executions>
+          </plugin>
+      
+          <plugin>
+            <groupId>org.apache.rat</groupId>
+            <artifactId>apache-rat-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>rat-check</id>
+                <phase>none</phase>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
       </build>
     </profile>
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/src/main/resources/org/apache/syncope/checkstyle.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/syncope/checkstyle.xml b/src/main/resources/org/apache/syncope/checkstyle.xml
index e912c8b..5251890 100644
--- a/src/main/resources/org/apache/syncope/checkstyle.xml
+++ b/src/main/resources/org/apache/syncope/checkstyle.xml
@@ -191,6 +191,7 @@ under the License.
     <module name="HiddenField">
       <property name="ignoreSetter" value="true"/>
       <property name="ignoreConstructorParameter" value="true"/>
+      <property name="tokens" value="VARIABLE_DEF"/>
     </module>
     <module name="IllegalInstantiation"/>
     <module name="InnerAssignment"/>

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/src/main/resources/org/apache/syncope/pmd.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/syncope/pmd.xml b/src/main/resources/org/apache/syncope/pmd.xml
deleted file mode 100644
index 5190d40..0000000
--- a/src/main/resources/org/apache/syncope/pmd.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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.
--->
-<ruleset name="Syncope"
-         xmlns="http://pmd.sf.net/ruleset/1.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-        
-  <rule ref="rulesets/java/basic.xml"/>
-  <rule ref="rulesets/java/naming.xml">
-    <exclude name="ShortVariable"/>
-    <exclude name="LongVariable"/>
-    <exclude name="ShortMethodName"/>
-    <exclude name="ShortClassName"/>
-    <exclude name="GenericsNaming"/>
-  </rule>
-  <rule ref="rulesets/java/unusedcode.xml"/>
-  <rule ref="rulesets/java/design.xml">
-    <exclude name="GodClass"/>
-    <exclude name="UseLocaleWithCaseConversions"/>
-    <exclude name="ConfusingTernary"/>
-    <exclude name="NonStaticInitializer"/>
-    <exclude name="AvoidConstantsInterface"/>
-    <exclude name="AvoidDeeplyNestedIfStmts"/>
-  </rule>
-  <rule ref="rulesets/java/imports.xml"/>
-  <rule ref="rulesets/java/strings.xml">
-    <exclude name="AvoidDuplicateLiterals"/>
-    <exclude name="AvoidStringBufferField"/>
-  </rule>
-  <rule ref="rulesets/java/codesize.xml">
-    <exclude name="TooManyFields"/>
-    <exclude name="TooManyMethods"/>
-    <exclude name="ExcessivePublicCount"/>
-    <exclude name="CyclomaticComplexity"/>
-    <exclude name="StdCyclomaticComplexity"/>
-    <exclude name="ModifiedCyclomaticComplexity"/>
-    <exclude name="NPathComplexity"/>
-    <exclude name="ExcessiveMethodLength"/>
-  </rule>
-  <rule ref="rulesets/java/javabeans.xml">
-    <exclude name="BeanMembersShouldSerialize"/>
-  </rule>
-  <rule ref="rulesets/java/coupling.xml">
-    <exclude name="LoosePackageCoupling"/>
-    <exclude name="LawOfDemeter"/>
-    <exclude name="ExcessiveImports"/>
-  </rule>
-  <rule ref="rulesets/java/controversial.xml">
-    <exclude name="NullAssignment"/>
-    <exclude name="DataflowAnomalyAnalysis"/>
-    <exclude name="AtLeastOneConstructor"/>
-    <exclude name="OnlyOneReturn"/>
-    <exclude name="UseConcurrentHashMap"/>
-    <exclude name="AvoidLiteralsInIfCondition"/>
-    <exclude name="UseObjectForClearerAPI"/>
-  </rule>
-  <rule ref="rulesets/java/strictexception.xml">
-    <exclude name="AvoidCatchingGenericException"/>
-  </rule>
-  <rule ref="rulesets/java/typeresolution.xml"/>
-    
-</ruleset>

http://git-wip-us.apache.org/repos/asf/syncope/blob/62193429/standalone/pom.xml
----------------------------------------------------------------------
diff --git a/standalone/pom.xml b/standalone/pom.xml
index a991f28..8976467 100644
--- a/standalone/pom.xml
+++ b/standalone/pom.xml
@@ -34,6 +34,8 @@ under the License.
   <packaging>jar</packaging>
   
   <properties>
+    <rootpom.basedir>${basedir}/..</rootpom.basedir>
+
     <connid.location>connid://${testconnectorserver.key}@localhost:${testconnectorserver.port}</connid.location>
     <log.directory>./logs</log.directory>
     <test.csvdir.path>./test-csvdir</test.csvdir.path>
@@ -200,6 +202,14 @@ under the License.
           </execution>
         </executions>
       </plugin>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <resourceIncludes>src/main/resources/**/*.properties</resourceIncludes>
+        </configuration>
+      </plugin>
     </plugins>
 
     <resources>


Mime
View raw message