directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject directory-kerby git commit: Finishing PMD work
Date Fri, 01 May 2015 08:59:12 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 588153ebd -> 14a1e2556


Finishing PMD work


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/14a1e255
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/14a1e255
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/14a1e255

Branch: refs/heads/master
Commit: 14a1e255631cb4e91ae4b37128bb10c9c0680a02
Parents: 588153e
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri May 1 09:58:59 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri May 1 09:58:59 2015 +0100

----------------------------------------------------------------------
 3rdparty/pom.xml                                | 13 +++++
 .../identitybackend/LdapIdentityBackend.java    |  6 +-
 .../kerberos/kdc/identitybackend/ZKConfKey.java |  2 +-
 .../kerberos/kdc/identitybackend/ZKUtil.java    |  2 +-
 .../ZookeeperIdentityBackend.java               |  4 +-
 pom.xml                                         | 59 ++++++++++++++++++++
 6 files changed, 80 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/3rdparty/pom.xml
----------------------------------------------------------------------
diff --git a/3rdparty/pom.xml b/3rdparty/pom.xml
index e1fa253..ebd5ede 100644
--- a/3rdparty/pom.xml
+++ b/3rdparty/pom.xml
@@ -37,4 +37,17 @@
     </dependency>
   </dependencies>
 
+  <profiles>
+    <profile>
+      <id>nochecks</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <pmd.skip>true</pmd.skip>
+      </properties>
+    </profile>
+  </profiles>
+
+
 </project>

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityBackend.java
b/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityBackend.java
index 54e3fb9..e84c04a 100644
--- a/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityBackend.java
+++ b/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityBackend.java
@@ -35,9 +35,9 @@ public class LdapIdentityBackend extends AbstractIdentityBackend {
 
     // the connection to the LDAP server
     // in case of ApacheDS this will be an instance of LdapCoreSessionConnection
-    private LdapConnection connection;
+    private LdapConnection connection; //NOPMD
 
-    private Dn baseDn;
+    private Dn baseDn; //NOPMD
 
     /**
      * Constructing an instance using specified config that contains anything
@@ -48,11 +48,13 @@ public class LdapIdentityBackend extends AbstractIdentityBackend {
         setConfig(config);
     }
 
+    /*
     public void initialize() {
         super.initialize();
 
         // init Ldap connection and baseDn.
     }
+    */
 
     @Override
     protected KrbIdentity doGetIdentity(String principalName) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
index fa16657..c159382 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKConfKey.java
@@ -25,7 +25,7 @@ import org.apache.kerby.config.ConfigKey;
  * Define all the ZK backend related configuration items with default values.
  */
 public enum ZKConfKey implements ConfigKey {
-    ZK_HOST("127.0.0.1"),
+    ZK_HOST("127.0.0.1"), //NOPMD
     ZK_PORT(2181),
     DATA_DIR,
     DATA_LOG_DIR

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
index 514574c..15bc0c0 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZKUtil.java
@@ -119,7 +119,7 @@ public class ZKUtil {
     /**
      * Returns the ACL list
      */
-    private static ArrayList<ACL> createACL(ZooKeeper zk, String node) {
+    private static ArrayList<ACL> createACL(ZooKeeper zk, String node) { //NOPMD
         return ZooDefs.Ids.OPEN_ACL_UNSAFE;//TODO
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
index b951043..743c2b9 100644
--- a/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
+++ b/kerby-backend/zookeeper-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/ZookeeperIdentityBackend.java
@@ -48,7 +48,7 @@ import java.util.Properties;
 public class ZookeeperIdentityBackend extends AbstractIdentityBackend
         implements Watcher {
     private static final Logger LOG = LoggerFactory.getLogger(ZookeeperIdentityBackend.class);
-    private Config config;
+    private Config config;      //NOPMD
     private String zkHost;
     private int zkPort;
     private File dataDir;
@@ -100,7 +100,7 @@ public class ZookeeperIdentityBackend extends AbstractIdentityBackend
      */
     public void load() throws IOException {
         // TODO: prepare zookeeper connection to the server.
-        ZooKeeper zooKeeper = null;
+        // ZooKeeper zooKeeper = null;
 
         // TODO: load the kdb file from zookeeper
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/14a1e255/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0e1ac6e..4ccd2e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,6 +172,42 @@
           <artifactId>maven-clean-plugin</artifactId>
           <version>2.6.1</version>
         </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-pmd-plugin</artifactId>
+          <version>3.4</version>
+          <dependencies>
+            <dependency>
+              <groupId>net.sourceforge.pmd</groupId>
+              <artifactId>pmd-core</artifactId>
+              <version>5.3.0</version>
+            </dependency>
+            <dependency>
+              <groupId>net.sourceforge.pmd</groupId>
+              <artifactId>pmd-java</artifactId>
+              <version>5.3.0</version>
+            </dependency>
+          </dependencies>
+
+          <configuration>
+            <linkXRef>false</linkXRef>
+            <sourceEncoding>utf-8</sourceEncoding>
+            <failOnViolation>true</failOnViolation>
+            <verbose>true</verbose>
+            <targetJdk>1.7</targetJdk>
+          </configuration>
+          <executions>
+            <execution>
+              <id>validate</id>
+              <phase>validate</phase>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
+       </plugin>
+
       </plugins>
     </pluginManagement>
 
@@ -193,6 +229,29 @@
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+
     </plugins>
   </build>
+
+  <profiles>
+    <profile>
+      <id>fastinstall</id>
+      <properties>
+        <maven.test.skip>true</maven.test.skip>
+        <pmd.skip>true</pmd.skip>
+      </properties>
+    </profile>
+    <profile>
+      <id>nochecks</id>
+      <properties>
+        <pmd.skip>true</pmd.skip>
+      </properties>
+    </profile>
+  </profiles>
+
 </project>


Mime
View raw message