summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-04-20 10:38:26 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-04-20 10:38:31 -0500
commit4094dee63ac8324fdc47a8b8b04d99a0227b7ba6 (patch)
treee27f0668b4cebd49386d8808fa8345d2122db7b0
parent80289990b4f5aa507c8bcef128509d2bd7802b8b (diff)
Add missing jar compiles
Issue-ID: AAF-256 Change-Id: Iafdfb11fca2455a0b062447a4a4bbf6b13cf11e0 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
-rw-r--r--auth/auth-cass/docker/dinstall.sh2
-rw-r--r--auth/auth-core/pom.xml6
-rw-r--r--cadi/aaf/pom.xml42
-rw-r--r--cadi/aaf/src/assemble/cadi-aaf.xml31
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java11
-rw-r--r--cadi/aaf/src/test/java/org/onap/aaf/cadi/cm/test/JU_Factory.java29
-rw-r--r--cadi/core/pom.xml1
-rw-r--r--cadi/shiro-osgi-bundle/.gitignore5
-rw-r--r--cadi/shiro-osgi-bundle/pom.xml2
9 files changed, 94 insertions, 35 deletions
diff --git a/auth/auth-cass/docker/dinstall.sh b/auth/auth-cass/docker/dinstall.sh
index 3726b6d2..7a3009db 100644
--- a/auth/auth-cass/docker/dinstall.sh
+++ b/auth/auth-cass/docker/dinstall.sh
@@ -1,4 +1,4 @@
-if ["`docker ps -a | grep aaf_cass`" == ""]; then
+if [ "`docker ps -a | grep aaf_cass`" == "" ]; then
docker run --name aaf_cass -d cassandra:3.11
echo "Check for running Docker Container aaf_cass, then run again."
exit
diff --git a/auth/auth-core/pom.xml b/auth/auth-core/pom.xml
index 9b09fc43..426a3069 100644
--- a/auth/auth-core/pom.xml
+++ b/auth/auth-core/pom.xml
@@ -92,12 +92,10 @@
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-misc-env</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
@@ -108,13 +106,11 @@
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-misc-log4j</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-core</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
@@ -141,7 +137,6 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
- <version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<nexusUrl>${nexusproxy}</nexusUrl>
@@ -152,7 +147,6 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>**/gen/**</exclude>
diff --git a/cadi/aaf/pom.xml b/cadi/aaf/pom.xml
index 4ba6dd68..b61e6313 100644
--- a/cadi/aaf/pom.xml
+++ b/cadi/aaf/pom.xml
@@ -91,25 +91,21 @@
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-auth-client</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-client</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-misc-env</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-core</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
@@ -137,7 +133,6 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>**/gen/**</exclude>
@@ -192,14 +187,35 @@
</execution>
</executions>
</plugin>
- <!-- We want to create a Jar with Rosetta built in (since I don't want
- a separate deployment at this time Use this one as the jar to put in SWM
- packages <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration>
- <classifier>tests</classifier> <archive> <manifest> <mainClass>org.onap.aaf.cadi.cm.CmAgent</mainClass>
- </manifest> <manifestEntries> <Sealed>true</Sealed> </manifestEntries> </archive>
- </configuration> <executions> <execution> <id>full</id> <phase>package</phase>
- <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>src/assemble/cadi-aaf.xml</descriptor>
- </descriptors> </configuration> </execution> </executions> </plugin> -->
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <classifier>tests</classifier>
+ <archive>
+ <manifest>
+ <mainClass>com.att.cadi.cm.CmAgent</mainClass>
+ </manifest>
+ <manifestEntries>
+ <Sealed>true</Sealed>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>full</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assemble/cadi-aaf.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/cadi/aaf/src/assemble/cadi-aaf.xml b/cadi/aaf/src/assemble/cadi-aaf.xml
new file mode 100644
index 00000000..ef4bdf99
--- /dev/null
+++ b/cadi/aaf/src/assemble/cadi-aaf.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+
+ <id>full</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <unpack>true</unpack>
+ <scope>compile</scope>
+ <includes>
+ <include>com.att.authz:authz-client</include>
+ <include>com.att.cadi:cadi-aaf</include>
+ <include>com.att.cadi:cadi-core</include>
+ <include>com.att.cadi:cadi-client</include>
+ <include>com.att.inno:env</include>
+ <include>com.att.inno:rosetta</include>
+ </includes>
+ </dependencySet>
+
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/xsd</directory>
+ </fileSet>
+ </fileSets>
+</assembly> \ No newline at end of file
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java
index 34371940..243b3a6a 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/TestConnectivity.java
@@ -109,11 +109,12 @@ public class TestConnectivity {
}
/////////
- print(true,"Test Proxy Access driven by AAFLocator");
- locator = new AAFLocator(si, new URI(aaflocate+"/AAF_NS.gw:2.0/proxy"));
- for(SecuritySetter<HttpURLConnection> ss : lss) {
- permTest(locator,ss);
- }
+ // Removed for ONAP
+// print(true,"Test Proxy Access driven by AAFLocator");
+// locator = new AAFLocator(si, new URI(aaflocate+"/AAF_NS.gw:2.0/proxy"));
+// for(SecuritySetter<HttpURLConnection> ss : lss) {
+// permTest(locator,ss);
+// }
//////////
print(true,"Test essential BasicAuth Service call, driven by AAFLocator");
diff --git a/cadi/aaf/src/test/java/org/onap/aaf/cadi/cm/test/JU_Factory.java b/cadi/aaf/src/test/java/org/onap/aaf/cadi/cm/test/JU_Factory.java
index 3c72d8ff..6f039747 100644
--- a/cadi/aaf/src/test/java/org/onap/aaf/cadi/cm/test/JU_Factory.java
+++ b/cadi/aaf/src/test/java/org/onap/aaf/cadi/cm/test/JU_Factory.java
@@ -28,15 +28,11 @@ import org.junit.*;
import org.mockito.*;
import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
-import java.io.InputStream;
import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
@@ -55,7 +51,7 @@ import javax.crypto.Cipher;
import org.onap.aaf.cadi.cm.CertException;
import org.onap.aaf.cadi.cm.Factory;
import org.onap.aaf.cadi.cm.Factory.StripperInputStream;
-import org.onap.aaf.cadi.cm.Factory.Base64InputStream;
+
import org.onap.aaf.misc.env.Env;
import org.onap.aaf.misc.env.LogTarget;
import org.onap.aaf.misc.env.TimeTaken;
@@ -248,7 +244,7 @@ public class JU_Factory {
output = Factory.toString(transMock, certs.toArray(new Certificate[0])[0]);
assertThat(output, is(certString));
- List<String> certStrings = new ArrayList();
+ List<String> certStrings = new ArrayList<String>();
certStrings.add(certString);
certStrings.add(certString);
certs = Factory.toX509Certificate(certStrings);
@@ -325,12 +321,31 @@ public class JU_Factory {
for (int i = 0; i < lines.length - 2; i++) {
rawLines.add(lines[i + 1]);
}
- return String.join("", rawLines);
+ return join("", rawLines);
}
+ /**
+ * Note: String.join is not part of JDK 7, which is what we compile to for CADI
+ */
+ private String join(String delim, List<String> rawLines) {
+ StringBuilder sb = new StringBuilder();
+ boolean first = true;
+ for(String s : rawLines) {
+ if(first) {
+ first = false;
+ } else {
+ sb.append(delim);
+ }
+ sb.append(s);
+ }
+ return sb.toString();
+ }
+
+ /* Not used locally
private void writeToFile(File file, String contents) throws Exception {
writeToFile(file, contents, null);
}
+ */
private void writeToFile(File file, String contents, String header) throws Exception {
PrintWriter writer = new PrintWriter(file, "UTF-8");
diff --git a/cadi/core/pom.xml b/cadi/core/pom.xml
index 19e71bde..59513118 100644
--- a/cadi/core/pom.xml
+++ b/cadi/core/pom.xml
@@ -128,7 +128,6 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>**/gen/**</exclude>
diff --git a/cadi/shiro-osgi-bundle/.gitignore b/cadi/shiro-osgi-bundle/.gitignore
new file mode 100644
index 00000000..f4b8361c
--- /dev/null
+++ b/cadi/shiro-osgi-bundle/.gitignore
@@ -0,0 +1,5 @@
+/target
+/bin/
+/.classpath
+/.settings
+/.project
diff --git a/cadi/shiro-osgi-bundle/pom.xml b/cadi/shiro-osgi-bundle/pom.xml
index 95b8589e..578a1b66 100644
--- a/cadi/shiro-osgi-bundle/pom.xml
+++ b/cadi/shiro-osgi-bundle/pom.xml
@@ -30,9 +30,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-shiro-aafrealm-osgi-bundle</artifactId>
- <version>2.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<properties>