You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sd...@apache.org on 2016/06/16 03:23:05 UTC
commons-crypto git commit: CRYPTO-66: Fix compiling warning
Repository: commons-crypto
Updated Branches:
refs/heads/master 1cc854857 -> f4513247a
CRYPTO-66: Fix compiling warning
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/f4513247
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/f4513247
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/f4513247
Branch: refs/heads/master
Commit: f4513247a5ef176cf768c354f7099b4bc9e1373c
Parents: 1cc8548
Author: Sun Dapeng <sd...@apache.org>
Authored: Tue Jun 14 10:13:40 2016 +0800
Committer: Sun Dapeng <sd...@apache.org>
Committed: Thu Jun 16 11:11:18 2016 +0800
----------------------------------------------------------------------
.travis.yml | 7 +++----
Makefile | 16 ++++------------
Makefile.common | 13 ++++---------
pom.xml | 2 +-
.../commons/crypto/random/CryptoRandomFactory.java | 4 ++--
5 files changed, 14 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f4513247/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index d23d5a5..0f5b2b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,9 +25,8 @@ before_install:
script:
- mvn apache-rat:check
- - mvn clean test
+ - mvn clean test package
- jdk_switcher use oraclejdk7
- - mvn test -Pfindbugs
+ - mvn verify site
- jdk_switcher use oraclejdk8
- - mvn test -Pfindbugs
- - mvn clean site
+ - mvn verify site
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f4513247/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 9759b06..69ce464 100644
--- a/Makefile
+++ b/Makefile
@@ -33,19 +33,11 @@ NATIVE_DLL:=$(NATIVE_TARGET_DIR)/$(LIBNAME)
all: $(NATIVE_DLL)
-$(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.class : $(SRC)/org/apache/commons/crypto/cipher/OpensslNative.java
- @mkdir -p $(TARGET)/jni-classes
- $(JAVAC) -source 1.6 -target 1.6 -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
+$(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.h: $(TARGET)/classes/org/apache/commons/crypto/cipher/OpensslNative.class
+ $(JAVAH) -force -classpath $(TARGET)/jni-classes:$(TARGET)/classes -o $@ org.apache.commons.crypto.cipher.OpensslNative
-$(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.class : $(SRC)/org/apache/commons/crypto/random/OpensslCryptoRandomNative.java
- @mkdir -p $(TARGET)/jni-classes
- $(JAVAC) -source 1.6 -target 1.6 -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
-
-$(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.h: $(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.class
- $(JAVAH) -force -classpath $(TARGET)/jni-classes -o $@ org.apache.commons.crypto.cipher.OpensslNative
-
-$(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h: $(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.class
- $(JAVAH) -force -classpath $(TARGET)/jni-classes -o $@ org.apache.commons.crypto.random.OpensslCryptoRandomNative
+$(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h: $(TARGET)/classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.class
+ $(JAVAH) -force -classpath $(TARGET)/jni-classes:$(TARGET)/classes -o $@ org.apache.commons.crypto.random.OpensslCryptoRandomNative
$(COMMONS_CRYPTO_OUT)/OpensslNative.o : $(SRC_NATIVE)/org/apache/commons/crypto/cipher/OpensslNative.c $(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.h
@mkdir -p $(@D)
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f4513247/Makefile.common
----------------------------------------------------------------------
diff --git a/Makefile.common b/Makefile.common
index 6c6bd46..f861319 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -33,16 +33,11 @@ JAVAC := "$$JAVA_HOME/bin/javac"
JAVAH := "$$JAVA_HOME/bin/javah"
OSINFO_CLASS := org.apache.commons.crypto.utils.OSInfo
-OSINFO_PROG := lib/org/apache/commons/crypto/utils/OSInfo.class
+OSINFO_PROG := $(TARGET)/classes/org/apache/commons/crypto/utils/OSInfo.class
-## building OSInfo.java
-$(info compiling OSInfo.java)
-$(shell mkdir -p lib)
-$(shell $(JAVAC) src/main/java/org/apache/commons/crypto/utils/OSInfo.java -d lib)
-
-OS_NAME := $(shell $(JAVA) -cp lib $(OSINFO_CLASS) --os)
-OS_ARCH := $(shell $(JAVA) -cp lib $(OSINFO_CLASS) --arch)
-LIB_FOLDER := $(shell $(JAVA) -cp lib $(OSINFO_CLASS))
+OS_NAME := $(shell $(JAVA) -cp $(TARGET)/classes $(OSINFO_CLASS) --os)
+OS_ARCH := $(shell $(JAVA) -cp $(TARGET)/classes $(OSINFO_CLASS) --arch)
+LIB_FOLDER := $(shell $(JAVA) -cp $(TARGET)/classes $(OSINFO_CLASS))
IBM_JDK_LIB := lib/inc_ibm
# Windows uses different path separators
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f4513247/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 641b266..4965a50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -332,7 +332,7 @@ The following provides more details on the included cryptographic software:
<executions>
<execution>
<id>make</id>
- <phase>generate-sources</phase>
+ <phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/f4513247/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java b/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
index e9b7a55..b299353 100644
--- a/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
+++ b/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
@@ -40,8 +40,8 @@ public class CryptoRandomFactory {
/**
* Gets a CryptoRandom instance for specified props.
- * Uses the {@link #COMMONS_CRYPTO_SECURE_RANDOM_CLASSES_KEY}
- * from the provided properties.
+ * Uses the COMMONS_CRYPTO_SECURE_RANDOM_CLASSES_KEY from the provided
+ * properties.
* If it is not set, then it checks the System properties.
* Failing that, it defaults to {@link JavaCryptoRandom}
* The properties are passed to the generated class.