summaryrefslogtreecommitdiffstats
path: root/sms-client
diff options
context:
space:
mode:
authorManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>2018-04-10 13:22:00 -0700
committerManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>2018-04-11 09:01:51 -0700
commit5de9d86fab2b8bec58bd09e95640da468d4e1f61 (patch)
tree27f5a08e1de20df67a34d6b0d762639be1d5aea1 /sms-client
parentc0830dc3d8ce9113fb29f9f81c7560b550b479ba (diff)
Add maven build structure
Restructure the directories and files to accommodate maven build. This will build, test and generate jar file for clients to use. Adds a target in the top level makefile. Issue-ID: AAF-183 Change-Id: I8c27396248d83070befe51f2c6e01aed7dea9202 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
Diffstat (limited to 'sms-client')
-rw-r--r--sms-client/pom.xml52
-rw-r--r--sms-client/src/main/example/SmsClientExample.java (renamed from sms-client/src/java/example/SmsClientExample.java)0
-rw-r--r--sms-client/src/main/java/org/onap/aaf/sms/SmsClient.java (renamed from sms-client/src/java/main/SmsClient.java)0
-rw-r--r--sms-client/src/main/java/org/onap/aaf/sms/SmsInterface.java (renamed from sms-client/src/java/main/SmsInterface.java)0
-rw-r--r--sms-client/src/main/java/org/onap/aaf/sms/SmsResponse.java (renamed from sms-client/src/java/main/SmsResponse.java)0
-rw-r--r--sms-client/src/test/java/org/onap/aaf/sms/ClientTestRunner.java (renamed from sms-client/src/java/test/ClientTestRunner.java)2
-rw-r--r--sms-client/src/test/java/org/onap/aaf/sms/SmsCreateDomainTest.java (renamed from sms-client/src/java/test/SmsCreateDomainTest.java)8
-rw-r--r--sms-client/src/test/java/org/onap/aaf/sms/SmsDeleteDomainTest.java (renamed from sms-client/src/java/test/SmsDeleteDomainTest.java)8
-rw-r--r--sms-client/src/test/java/org/onap/aaf/sms/SmsSecureSocket.java (renamed from sms-client/src/java/test/SmsSecureSocket.java)2
-rw-r--r--sms-client/src/test/java/org/onap/aaf/sms/SmsTest.java (renamed from sms-client/src/java/test/SmsTest.java)3
10 files changed, 65 insertions, 10 deletions
diff --git a/sms-client/pom.xml b/sms-client/pom.xml
new file mode 100644
index 0000000..e060feb
--- /dev/null
+++ b/sms-client/pom.xml
@@ -0,0 +1,52 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.onap.aaf.sms</groupId>
+ <artifactId>sms-client</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0-SNAPSHOT</version>
+ <name>sms-client</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20180130</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <transformers>
+ <transformer
+ implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>org.onap.aaf.sms.ClientTestRunner</mainClass>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sms-client/src/java/example/SmsClientExample.java b/sms-client/src/main/example/SmsClientExample.java
index dc0e776..dc0e776 100644
--- a/sms-client/src/java/example/SmsClientExample.java
+++ b/sms-client/src/main/example/SmsClientExample.java
diff --git a/sms-client/src/java/main/SmsClient.java b/sms-client/src/main/java/org/onap/aaf/sms/SmsClient.java
index 17a9f16..17a9f16 100644
--- a/sms-client/src/java/main/SmsClient.java
+++ b/sms-client/src/main/java/org/onap/aaf/sms/SmsClient.java
diff --git a/sms-client/src/java/main/SmsInterface.java b/sms-client/src/main/java/org/onap/aaf/sms/SmsInterface.java
index 31875d7..31875d7 100644
--- a/sms-client/src/java/main/SmsInterface.java
+++ b/sms-client/src/main/java/org/onap/aaf/sms/SmsInterface.java
diff --git a/sms-client/src/java/main/SmsResponse.java b/sms-client/src/main/java/org/onap/aaf/sms/SmsResponse.java
index b7a9980..b7a9980 100644
--- a/sms-client/src/java/main/SmsResponse.java
+++ b/sms-client/src/main/java/org/onap/aaf/sms/SmsResponse.java
diff --git a/sms-client/src/java/test/ClientTestRunner.java b/sms-client/src/test/java/org/onap/aaf/sms/ClientTestRunner.java
index dc5fbf9..d209b2c 100644
--- a/sms-client/src/java/test/ClientTestRunner.java
+++ b/sms-client/src/test/java/org/onap/aaf/sms/ClientTestRunner.java
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+package org.onap.aaf.sms;
+
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
diff --git a/sms-client/src/java/test/SmsCreateDomainTest.java b/sms-client/src/test/java/org/onap/aaf/sms/SmsCreateDomainTest.java
index 2bbe348..b1f5828 100644
--- a/sms-client/src/java/test/SmsCreateDomainTest.java
+++ b/sms-client/src/test/java/org/onap/aaf/sms/SmsCreateDomainTest.java
@@ -14,10 +14,12 @@
* limitations under the License.
*/
+package org.onap.aaf.sms;
+
import junit.framework.*;
import org.onap.aaf.sms.SmsClient;
import org.onap.aaf.sms.SmsResponse;
-import org.onap.aaf.sms.test.SmsSecureSocket;
+import org.onap.aaf.sms.SmsSecureSocket;
import javax.net.ssl.SSLSocketFactory;
import java.util.HashMap;
import java.util.Map;
@@ -26,9 +28,7 @@ public class SmsCreateDomainTest extends TestCase {
public void testSmsCreateDomain() {
try {
- SmsSecureSocket sss = new SmsSecureSocket();
-
- SmsTest sms = new SmsTest("otconap4.sc.intel.com", 10443, sss.getSSF());
+ SmsTest sms = new SmsTest("otconap4.sc.intel.com", 10443, null);
SmsResponse resp = sms.createDomain("onap.new.test.sms0");
assertTrue(resp.getSuccess());
if ( resp.getSuccess() ) {
diff --git a/sms-client/src/java/test/SmsDeleteDomainTest.java b/sms-client/src/test/java/org/onap/aaf/sms/SmsDeleteDomainTest.java
index aa047b2..712014e 100644
--- a/sms-client/src/java/test/SmsDeleteDomainTest.java
+++ b/sms-client/src/test/java/org/onap/aaf/sms/SmsDeleteDomainTest.java
@@ -14,10 +14,12 @@
* limitations under the License.
*/
+package org.onap.aaf.sms;
+
import junit.framework.*;
import org.onap.aaf.sms.SmsClient;
import org.onap.aaf.sms.SmsResponse;
-import org.onap.aaf.sms.test.SmsSecureSocket;
+import org.onap.aaf.sms.SmsSecureSocket;
import javax.net.ssl.SSLSocketFactory;
import java.util.HashMap;
import java.util.Map;
@@ -26,9 +28,7 @@ public class SmsDeleteDomainTest extends TestCase {
public void testSmsDeleteDomain() {
try {
- SmsSecureSocket sss = new SmsSecureSocket();
-
- SmsTest sms = new SmsTest("otconap4.sc.intel.com", 10443, sss.getSSF());
+ SmsTest sms = new SmsTest("otconap4.sc.intel.com", 10443, null);
SmsResponse resp = sms.deleteDomain("onap.new.test.sms0");
assertTrue(resp.getSuccess());
if ( resp.getSuccess() ) {
diff --git a/sms-client/src/java/test/SmsSecureSocket.java b/sms-client/src/test/java/org/onap/aaf/sms/SmsSecureSocket.java
index 34acb79..3e28aa7 100644
--- a/sms-client/src/java/test/SmsSecureSocket.java
+++ b/sms-client/src/test/java/org/onap/aaf/sms/SmsSecureSocket.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.aaf.sms.test;
+package org.onap.aaf.sms;
import java.io.FileInputStream;
import javax.net.ssl.KeyManagerFactory;
diff --git a/sms-client/src/java/test/SmsTest.java b/sms-client/src/test/java/org/onap/aaf/sms/SmsTest.java
index 79c1625..4bdf54c 100644
--- a/sms-client/src/java/test/SmsTest.java
+++ b/sms-client/src/test/java/org/onap/aaf/sms/SmsTest.java
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-//package org.onap.aaf.sms;
+
+package org.onap.aaf.sms;
import javax.net.ssl.SSLSocketFactory;
import java.net.URL;