summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-08-08 02:49:33 -0700
committerSébastien Determe <sd378r@intl.att.com>2017-08-08 12:37:11 +0000
commit8bf33437774bd7120bb68a22d0106adcc3a1718d (patch)
treebd05fd6cfbcae7bc05a1cffb7c21ddf48bb79774
parentbb03393b823bc2b1ec43be654e13b83a5a74a566 (diff)
Rework Pom and Dockerfile
Rework the pom & swagger config + Remove license plugin in pom and license files + Rework the dockerfile (support all clamp versions now) + Introduce the version.properties Change-Id: Ia823e00309d651ca40ef12beeae02fb01d8a80a9 Issue-Id: CLAMP-1 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
-rw-r--r--README.md151
-rw-r--r--extra/docker/clamp/clamp.env2
-rw-r--r--pom.xml486
-rw-r--r--src/licenses/clamp_apache_v2/header.txt13
-rw-r--r--src/licenses/clamp_apache_v2/license.txt19
-rw-r--r--src/licenses/licenses.properties1
-rw-r--r--src/main/docker/Dockerfile49
-rw-r--r--src/main/resources/clds-version.properties23
-rw-r--r--version.properties29
9 files changed, 350 insertions, 423 deletions
diff --git a/README.md b/README.md
index 5aa5cc0a9..4fe12ff23 100644
--- a/README.md
+++ b/README.md
@@ -1,61 +1,90 @@
-# Summary
-
-CLAMP is a platform for designing and managing control loops. It is used to design a closed loop, configure it with specific parameters for a particular network service, then deploying and undeploying it. Once deployed, the user can also update the loop with new parameters during runtime, as well as suspending and restarting it.
-
-It interacts with other systems to deploy and execute the closed loop. For example, it pushes the control loop design to the SDC catalog, associating it with the VF resource. It requests from DCAE the instantiation of microservices to manage the closed loop flow. Further, it creates and updates multiple policies in the Policy Engine that define the closed loop flow.
-
-The ONAP CLAMP platform abstracts the details of these systems under the concept of a control loop model. The design of a control loop and its management is represented by a workflow in which all relevant system interactions take place. This is essential for a self-service model of creating and managing control loops, where no low-level user interaction with other components is required.
-
-At a higher level, CLAMP is about supporting and managing the broad operational life cycle of VNFs/VMs and ultimately ONAP components itself. It will offer the ability to design, test, deploy and update control loop automation - both closed and open. Automating these functions would represent a significant saving on operational costs compared to traditional methods.
-
-# Developer Contact
-Owner: ONAP CLAMP Dev team
-Mailing List : onap-discuss@lists.onap.org
-Add the following prefix to Subject on the mailing list : [CLAMP]
-See here to subscribe : https://wiki.onap.org/display/DW/Mailing+Lists
-
-# Wiki
-https://wiki.onap.org/display/DW/CLAMP+Project
-
-# Build
-Jenkins Job: ${jenkins-joblink}
-
-CLAMP UI: ${cockpit-link}
-
-Logs: ${elk-link}
-
-# Docker image
-
-## Building
-You can use the following command to build the clamp docker image:
-```
-mvn clean install -P docker
-```
-
-## Deployement
-Currently, the clamp docker image can be deployed with small configuration needs. Though, you might need to make small adjustments to the configuration. As clamp is spring based, you can use the SPRING_APPLICATION_JSON environment variable to update its parameters.
-
-### Databases
-There are two needed datasource for Clamp. By default, both will try to connect to the localhost server using the credentials available in the example SQL files. If you need to change the default database host and/or credentials, you can do it by using the following json as SPRING_APPLICATION_JSON environment variable :
-```json
-{"spring":
- {
- "datasource": {"url":"jdbc:mysql://anotherDB.onap.org:3306/camunda?autoReconnect=true", "username": "admin", "password": "admin"},
- "cldsdatasource": {"url":"jdbc:mysql://anotherDB.onap.org:3306/clds?autoReconnect=true", "username": "admin", "password": "admin"}
- }
-}
-
-```
-
-### Docker-compose
-
-A [docker-compose example file](extra/docker/clamp/docker-compose.yml) can be found under the [extra/docker/clamp/ folder](extra/docker/).
-
-Once the image has been built and is available locally, you can use the `docker-compose up` command to deploy a prepopullated database and a clamp instance available on [http://localhost:8080/designer/index.html](http://localhost:8080/designer/index.html).
-
-
-### Logs
-
-Clamp uses logback framework to generate logs. The logback.xml file cand be found under the [src/main/resources/ folder](src/main/resources).
-
-With the default log settings, all logs will be generated into console and into root.log file under the Clamp root folder. The root.log file is not allowed to be appended, thus restarting the clamp will result in cleaning of the old log files.
+# Summary
+
+CLAMP is a platform for designing and managing control loops. It is used to design a closed loop, configure it with specific parameters for a particular network service, then deploying and undeploying it. Once deployed, the user can also update the loop with new parameters during runtime, as well as suspending and restarting it.
+
+It interacts with other systems to deploy and execute the closed loop. For example, it pushes the control loop design to the SDC catalog, associating it with the VF resource. It requests from DCAE the instantiation of microservices to manage the closed loop flow. Further, it creates and updates multiple policies in the Policy Engine that define the closed loop flow.
+
+The ONAP CLAMP platform abstracts the details of these systems under the concept of a control loop model. The design of a control loop and its management is represented by a workflow in which all relevant system interactions take place. This is essential for a self-service model of creating and managing control loops, where no low-level user interaction with other components is required.
+
+At a higher level, CLAMP is about supporting and managing the broad operational life cycle of VNFs/VMs and ultimately ONAP components itself. It will offer the ability to design, test, deploy and update control loop automation - both closed and open. Automating these functions would represent a significant saving on operational costs compared to traditional methods.
+
+# Developer Contact
+Owner: ONAP CLAMP Dev team
+Mailing List : onap-discuss@lists.onap.org
+Add the following prefix to Subject on the mailing list : [CLAMP]
+See here to subscribe : https://wiki.onap.org/display/DW/Mailing+Lists
+
+# Wiki
+https://wiki.onap.org/display/DW/CLAMP+Project
+
+# Build
+Jenkins Job: ${jenkins-joblink}
+
+CLAMP UI: ${cockpit-link}
+
+Logs: ${elk-link}
+
+# Docker image
+
+## Building
+You can use the following command to build the clamp docker image:
+```
+mvn clean install -P docker
+```
+
+## Deployment
+Currently, the clamp docker image can be deployed with small configuration needs. Though, you might need to make small adjustments to the configuration. As clamp is spring based, you can use the SPRING_APPLICATION_JSON environment variable to update its parameters.
+
+### Databases
+There are two needed datasource for Clamp. By default, both will try to connect to the localhost server using the credentials available in the example SQL files. If you need to change the default database host and/or credentials, you can do it by using the following json as SPRING_APPLICATION_JSON environment variable :
+
+```json
+{
+ "spring.datasource.camunda.url": "jdbc:mysql://anotherDB.onap.org:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",
+ "spring.datasource.camunda.username": "admin",
+ "spring.datasource.camunda.password": "password",
+ "spring.datasource.cldsdb.url": "jdbc:mysql://anotherDB.onap.org:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",
+ "spring.datasource.cldsdb.username": "admin",
+ "spring.datasource.cldsdb.password": "password"
+}
+```
+
+OR
+
+```json
+{
+ "spring":
+ {
+ "datasource":
+ {
+ "camunda":
+ {
+ "url": "jdbc:mysql://anotherDB.onap.org:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",
+ "username": "admin",
+ "password": "password"
+ },
+
+ "cldsdb":
+ {
+ "url": "jdbc:mysql://anotherDB.onap.org:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",
+ "username": "admin",
+ "password": "password"
+ }
+ }
+ }
+}
+
+```
+
+### Docker-compose
+
+A [docker-compose example file](extra/docker/clamp/docker-compose.yml) can be found under the [extra/docker/clamp/ folder](extra/docker/).
+
+Once the image has been built and is available locally, you can use the `docker-compose up` command to deploy a prepopullated database and a clamp instance available on [http://localhost:8080/designer/index.html](http://localhost:8080/designer/index.html).
+
+
+### Logs
+
+Clamp uses logback framework to generate logs. The logback.xml file cand be found under the [src/main/resources/ folder](src/main/resources).
+
+With the default log settings, all logs will be generated into console and into root.log file under the Clamp root folder. The root.log file is not allowed to be appended, thus restarting the clamp will result in cleaning of the old log files.
diff --git a/extra/docker/clamp/clamp.env b/extra/docker/clamp/clamp.env
index c38d29b08..842afd63c 100644
--- a/extra/docker/clamp/clamp.env
+++ b/extra/docker/clamp/clamp.env
@@ -1 +1 @@
-SPRING_APPLICATION_JSON={"spring": {"datasource": {"url":"jdbc:mysql://db:3306/camundabpm?autoReconnect=true"}, "cldsdatasource": {"url":"jdbc:mysql://db:3306/cldsdb4?autoReconnect=true"}}}
+SPRING_APPLICATION_JSON={"spring.datasource.camunda.url":"jdbc:mysql://db:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true","spring.datasource.cldsdb.url":"jdbc:mysql://db:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true"} \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b853ccf30..e76cbf383 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,39 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<name>ONAP CLAMP</name>
- <parent>
- <groupId>org.onap.oparent</groupId>
- <artifactId>oparent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
+ <description>
+ This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
+
+ By Default "mvn clean install" command will execute also the unit tests
+ and the integration tests. The integration tests require a docker engine running.
+
+ If you want to skip the intergation test you can by doing:
+ "mvn clean install -DskipITs=true"
+
+ For Spring it's possible to specify the application.properties location
+ "mvn clean install -Dspring.config.location=classpath:application-test.properties"
+
+ The application.properties contains the location of the CLAMP parameters files:
+ clds-policy-config.properties and clds-reference.properties
+ </description>
+
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <docker.mariadb.port.host>3306</docker.mariadb.port.host>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <docker.mariadb.port.host>3306</docker.mariadb.port.host>
<sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
<project.scm.id>git-server</project.scm.id>
- <swagger.directory>${basedir}/target/classes/META-INF/resources/icd</swagger.directory>
- <icd.file>service.json</icd.file>
- <icd.package>org.onap.clamp.clds.service.rs</icd.package>
<java.version>1.8</java.version>
- <build.number>local</build.number>
- <service.account>ajsc-svc-account</service.account>
- <namespace>com.att.ajsc</namespace>
- <jsf.version>2.2.11</jsf.version>
<csi.logging>6.1.0.6-oss</csi.logging>
<sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
<sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
<sonar.language>java</sonar.language>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
@@ -78,16 +82,6 @@
<url>http://repo2.maven.org/maven2/</url>
</repository>
<repository>
- <id>JBOSS</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
- </repository>
- <repository>
- <id>jboss-deprecated-repository</id>
- <name>JBoss Deprecated Maven Repository</name>
- <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
- </repository>
- <repository>
<id>ecomp-releases</id>
<name>ONAP Release Repository</name>
<url>${nexusproxy}/${releaseNexusPath}</url>
@@ -101,8 +95,12 @@
<id>ecomp-snapshots</id>
<name>ONAP Snapshot Repository</name>
<url>${nexusproxy}/${snapshotNexusPath}</url>
- <snapshots><enabled>true</enabled></snapshots>
- <releases><enabled>false</enabled></releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
</repository>
<repository>
<id>spring-repo</id>
@@ -110,31 +108,12 @@
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
</repository>
<repository>
- <id>soapUI</id>
- <url>http://www.soapui.org/repository/maven2/</url>
- <name>SoapUI plugin</name>
+ <id>repository.jboss.org-public</id>
+ <name>JBoss.org Maven repository</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
- <description>
- This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
-
- By Default "mvn clean install" command will execute also the unit tests
- and the integration tests. The integration tests require a docker engine running.
-
- If you want to skip the intergation test you can by doing:
- "mvn clean install -DskipITs=true"
-
- For Spring it's possible to specify the application.properties location
- "mvn clean install -Dspring.config.location=classpath:application-test.properties"
-
- The application.properties contains the location of the CLAMP parameters files:
- clds-policy-config.properties and clds-reference.properties
-
- The licenses and headers can be generated by using this maven command:
- mvn license:update-file-header license:update-project-license
- </description>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -149,11 +128,26 @@
</dependencyManagement>
<dependencies>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-vfs2</artifactId>
- <version>2.0</version>
- </dependency>
+
+ <dependency>
+ <groupId>com.googlecode.json-simple</groupId>
+ <artifactId>json-simple</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs2</artifactId>
+ <version>2.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-test</artifactId>
+
+ <scope>test</scope>
+ </dependency>
+
+
<!-- Dependencies of parent pom start -->
<dependency>
<groupId>com.att.ajsc</groupId>
@@ -170,9 +164,9 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
- </dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-security</artifactId>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
@@ -332,6 +326,10 @@
<artifactId>apache-log4j-extras</artifactId>
<groupId>log4j</groupId>
</exclusion>
+ <exclusion>
+ <artifactId>jackson-databind</artifactId>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -354,29 +352,33 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.engine</groupId>
- <artifactId>ControlloopPolicy</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <exclusions>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- <exclusion>
- <artifactId>apache-log4j-extras</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
+ <groupId>org.onap.policy.engine</groupId>
+ <artifactId>ControlloopPolicy</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>log4j</artifactId>
+ <groupId>log4j</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>apache-log4j-extras</artifactId>
+ <groupId>log4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
- <!-- >version>2.0.0-RC1</version <version>${fasterxml.jackson.version}</version -->
<version>2.6.3</version>
</dependency>
<dependency>
@@ -403,14 +405,16 @@
</dependencies>
<build>
+ <finalName>clamp</finalName>
+
<testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*</include>
- </includes>
- <filtering>true</filtering>
- </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <filtering>true</filtering>
+ </testResource>
</testResources>
<resources>
<resource>
@@ -418,27 +422,6 @@
<filtering>true</filtering>
</resource>
<resource>
- <directory>target/generated-sources/license</directory>
- <includes>
- <include>third-party-licenses.txt</include>
- </includes>
- </resource>
- <resource>
- <directory>target/generated-resources/licenses</directory>
- <includes>
- <include>*.*</include>
- </includes>
- <targetPath>third-party-licenses</targetPath>
- </resource>
- <resource>
- <directory>${project.basedir}/etc</directory>
- <targetPath>${project.build.directory}/etc</targetPath>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
<directory>src/main/docker</directory>
<includes>
<include>**/*</include>
@@ -453,116 +436,80 @@
<filtering>true</filtering>
</resource>
</resources>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
- only. It has no influence on the Maven build itself. -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.5.3</version>
- <configuration>
- <tagBase>${projectTag}</tagBase>
- <scmCommentPrefix>${scm.commit.message}</scmCommentPrefix>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <version>3.1.3</version>
- <configuration>
- <apiSources>
- <apiSource>
- <locations>${icd.package}</locations>
- <basePath>/</basePath>
- <info>
- <title>${project.artifactId} Service</title>
- <version>${project.version}</version>
- </info>
- <swaggerDirectory>${swagger.directory}</swaggerDirectory>
- </apiSource>
- </apiSources>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <versionRange>3.1.3</versionRange>
- <goals>
- <goal>generate</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
+
+
+
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <id>jar-with-only-classes</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>classes</classifier>
- <excludes>
- <exclude>META-INF/resources/designer/**</exclude>
- <exclude>META-INF/resources/icd/**</exclude>
- <exclude>META-INF/resources/index.html</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/clds-${project.version}-classes.jar</file>
- <type>jar</type>
- <classifier>classes</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>jar-with-only-classes</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>classes</classifier>
+ <includes>
+ <include>org/**</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>3.1.5</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <locations>
+ <location>org.onap.clamp.clds.service</location>
+ </locations>
+ <basePath>/</basePath>
+ <info>
+ <title>${project.artifactId} Service</title>
+ <version>${project.version}</version>
+ </info>
+ <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/clamp-classes.jar</file>
+ <type>jar</type>
+ <classifier>classes</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
@@ -578,16 +525,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-release-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-gitexe</artifactId>
- <version>1.9</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
@@ -617,36 +554,11 @@
</configuration>
</plugin>
<plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <configuration>
- <apiSources>
- <apiSource>
- <locations>org.onap.clamp.clds.service.rs</locations>
- <basePath>//rest</basePath>
- <info>
- <title>${project.artifactId} Service</title>
- <version>${project.version}</version>
- </info>
- <swaggerDirectory>${swagger.directory}</swaggerDirectory>
- </apiSource>
- </apiSources>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.11</version>
<configuration>
- <imageName>${docker.push.registry}/onap/clamp</imageName>
+ <imageName>onap/clamp</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<serverId>docker-hub</serverId>
<imageTags>
@@ -665,6 +577,11 @@
<directory>${project.build.directory}</directory>
<include>etc/config/**</include>
</resource>
+ <resource>
+ <targetPath>/</targetPath>
+ <directory>${project.build.directory}</directory>
+ <include>etc/keystore/**</include>
+ </resource>
</resources>
</configuration>
<executions>
@@ -683,25 +600,13 @@
</configuration>
</execution>
<execution>
- <id>tag-image</id>
- <phase>package</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>onap/clamp</image>
- <newName>${docker.push.registry}/onap/clamp</newName>
- <pushImage>true</pushImage>
- <skipDockerTag>${skip.docker.tag}</skipDockerTag>
- </configuration>
- </execution>
- <execution>
<id>push-image</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
<configuration>
+ <imageName>onap/clamp</imageName>
<skipDockerPush>${skip.docker.push}</skipDockerPush>
</configuration>
</execution>
@@ -826,45 +731,26 @@
<!-- <append>true</append> -->
</configuration>
</execution>
+ <execution>
+ <goals>
+ <goal>merge</goal>
+ </goals>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <fileSets>
+ <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
+ <directory>${project.build.directory}/coverage-reports</directory>
+ <includes>
+ <include>*.exec</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
+ </configuration>
+ </execution>
</executions>
</plugin>
- <!-- license plugin -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>1.12</version>
- <configuration>
- <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
- <projectName>ONAP CLAMP</projectName>
- <canUpdateCopyright>true</canUpdateCopyright>
- <canUpdateDescription>true</canUpdateDescription>
- <canUpdateLicense>true</canUpdateLicense>
-
- <processStartTag>============LICENSE_START=======================================================</processStartTag>
- <processEndTag><![CDATA[ECOMP &nbsp;is &nbsp;a &nbsp;trademark &nbsp;and &nbsp;service &nbsp;mark &nbsp;of &nbsp;AT&amp;T &nbsp;Intellectual &nbsp;Property.]]></processEndTag>
- <sectionDelimiter>================================================================================</sectionDelimiter>
- <organizationName>AT&amp;T Intellectual Property. All rights
- reserved.</organizationName>
- <inceptionYear>2017</inceptionYear>
- <emptyLineAfterHeader>true</emptyLineAfterHeader>
-
- <licenseName>clamp_apache_v2</licenseName>
- <licenseResolver>${project.baseUri}/src/licenses</licenseResolver>
-
- <excludes>
- <exclude>**/*.properties</exclude>
- <exclude>**/icd/**</exclude>
- <exclude>**/designer/lib/**</exclude>
- <exclude>**/*.json</exclude>
- <exclude>**/*.yaml</exclude>
- <exclude>**/*.yml</exclude>
- <exclude>**/licenses/**</exclude>
- </excludes>
- </configuration>
-
- </plugin>
-
<!-- This plugin will be useful when we will have multi-modules project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
diff --git a/src/licenses/clamp_apache_v2/header.txt b/src/licenses/clamp_apache_v2/header.txt
deleted file mode 100644
index 578ee1a93..000000000
--- a/src/licenses/clamp_apache_v2/header.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END============================================
-=================================================================== \ No newline at end of file
diff --git a/src/licenses/clamp_apache_v2/license.txt b/src/licenses/clamp_apache_v2/license.txt
deleted file mode 100644
index f7306e6b0..000000000
--- a/src/licenses/clamp_apache_v2/license.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-============LICENSE_START==========================================
-===================================================================
-Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-===================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END============================================
-===================================================================
-
-ECOMP is a trademark and service mark of AT&T Intellectual Property. \ No newline at end of file
diff --git a/src/licenses/licenses.properties b/src/licenses/licenses.properties
deleted file mode 100644
index 7add1a477..000000000
--- a/src/licenses/licenses.properties
+++ /dev/null
@@ -1 +0,0 @@
-clamp_apache_v2=Clamp License
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 6b3e272d3..115949bb7 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -1,25 +1,24 @@
-FROM ubuntu:16.04
-
-MAINTAINER "The Onap Team"
-LABEL Description="This image contains an updated ubuntu 16.04 with the openjdk installed" Version="16.04-8"
-
-ARG http_proxy
-ARG https_proxy
-ENV HTTP_PROXY=$http_proxy
-ENV HTTPS_PROXY=$https_proxy
-ENV http_proxy=$HTTP_PROXY
-ENV https_proxy=$HTTPS_PROXY
-
-RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \
- apt-get update && \
- apt-get -y dist-upgrade && \
- apt-get install -y openjdk-8-jre-headless
-
-ADD clds-1.0.0-SNAPSHOT.jar /opt/clamp/app.jar
-VOLUME /etc
-ADD /etc/ /etc/
-ADD startService.sh /opt/clamp/startService.sh
-RUN chmod 700 /opt/clamp/startService.sh
-
-WORKDIR /opt/clamp/
-ENTRYPOINT ./startService.sh
+FROM ubuntu:16.04
+
+MAINTAINER "The Onap Team"
+LABEL Description="This immage contains an updated ubuntu 16.04 with the openjdk installed" Version="16.04-8"
+
+ARG http_proxy
+ARG https_proxy
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \
+ apt-get update && \
+ apt-get -y dist-upgrade && \
+ apt-get install -y openjdk-8-jre-headless
+
+ADD clamp.jar /opt/clamp/app.jar
+VOLUME /etc
+ADD startService.sh /opt/clamp/startService.sh
+RUN chmod 700 /opt/clamp/startService.sh
+
+WORKDIR /opt/clamp/
+ENTRYPOINT ./startService.sh
diff --git a/src/main/resources/clds-version.properties b/src/main/resources/clds-version.properties
new file mode 100644
index 000000000..8576692b8
--- /dev/null
+++ b/src/main/resources/clds-version.properties
@@ -0,0 +1,23 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+###
+clds.version=${project.version} \ No newline at end of file
diff --git a/version.properties b/version.properties
index 479e5c8f9..b65593127 100644
--- a/version.properties
+++ b/version.properties
@@ -1,10 +1,33 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+###
+
# Versioning variables
# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
# because they are used in Jenkins, whose plug-in doesn't support
-major=I
-minor=N
-patch=S
+major=1
+minor=0
+patch=1
base_version=${major}.${minor}.${patch}