diff --git a/pom.xml b/pom.xml
index 9d85030..8a5e310 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,8 +8,8 @@
This project implements the javax.crypto API using java.nio instead of java.io.
- 1.6
- 1.6
+ 1.7
+ 1.7
diff --git a/src/test/java/com/inteligr8/nio/StreamingCryptoByteChannelUnitTest.java b/src/test/java/com/inteligr8/nio/StreamingCryptoByteChannelUnitTest.java
index 522586b..71b0043 100644
--- a/src/test/java/com/inteligr8/nio/StreamingCryptoByteChannelUnitTest.java
+++ b/src/test/java/com/inteligr8/nio/StreamingCryptoByteChannelUnitTest.java
@@ -23,22 +23,24 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
-import com.inteligr8.nio.IVDecryptingByteChannel;
-import com.inteligr8.nio.IVEncryptingByteChannel;
-
public class StreamingCryptoByteChannelUnitTest {
+ private static File m2dir;
private static Key key;
@BeforeClass
public static void createKey() throws Exception {
+ String m2path = System.getProperty("user.m2path");
+ if (m2path == null)
+ m2path = System.getProperty("user.home") + "/.m2";
+ m2dir = new File(m2path);
+
key = KeyGenerator.getInstance("AES").generateKey();
}
@Test
public void streamNioCryptoJar100() throws IOException, InterruptedException, TimeoutException, ExecutionException {
- File userHome = new File(System.getProperty("user.home"));
- File jar = new File(userHome, ".m2/repository/org/alfresco/consulting/nio-crypto/1.0.0-SNAPSHOT/nio-crypto-1.0.0-SNAPSHOT.jar");
+ File jar = new File(m2dir, "repository/com/inteligr8/nio-crypto/1.0-SNAPSHOT/nio-crypto-1.0-SNAPSHOT.jar");
this.stream(jar, 16384);
this.stream(jar, 1024);
this.stream(jar, 32);
@@ -47,9 +49,8 @@ public class StreamingCryptoByteChannelUnitTest {
}
@Test
- public void streamAlfrescoWar50d() throws IOException, InterruptedException, TimeoutException, ExecutionException {
- File userHome = new File(System.getProperty("user.home"));
- File war = new File(userHome, ".m2/repository/org/alfresco/alfresco/5.0.d/alfresco-5.0.d.war");
+ public void streamAlfrescoPdfRenderer11() throws IOException, InterruptedException, TimeoutException, ExecutionException {
+ File war = new File(m2dir, "repository/org/alfresco/alfresco-pdf-renderer/1.1/alfresco-pdf-renderer-1.1-win64.tgz");
this.stream(war, 16384);
}