Rework Pom and Dockerfile 49/6949/2
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Tue, 8 Aug 2017 09:49:33 +0000 (02:49 -0700)
committerSébastien Determe <sd378r@intl.att.com>
Tue, 8 Aug 2017 12:37:11 +0000 (12:37 +0000)
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>
README.md
extra/docker/clamp/clamp.env
pom.xml
src/licenses/clamp_apache_v2/header.txt [deleted file]
src/licenses/clamp_apache_v2/license.txt [deleted file]
src/licenses/licenses.properties [deleted file]
src/main/docker/Dockerfile
src/main/resources/clds-version.properties [new file with mode: 0644]
version.properties

index 5aa5cc0..4fe12ff 100644 (file)
--- 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\r
+\r
+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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+# Developer Contact\r
+Owner: ONAP CLAMP Dev team\r
+Mailing List : onap-discuss@lists.onap.org\r
+Add the following prefix to Subject on the mailing list : [CLAMP]\r
+See here to subscribe : https://wiki.onap.org/display/DW/Mailing+Lists\r
+\r
+# Wiki\r
+https://wiki.onap.org/display/DW/CLAMP+Project\r
+\r
+# Build\r
+Jenkins Job: ${jenkins-joblink}\r
+\r
+CLAMP UI: ${cockpit-link}\r
+\r
+Logs: ${elk-link}\r
+\r
+# Docker image\r
+\r
+## Building \r
+You can use the following command to build the clamp docker image:\r
+```\r
+mvn clean install -P docker\r
+```\r
+\r
+## Deployment\r
+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. \r
+\r
+### Databases\r
+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 :\r
+\r
+```json\r
+{\r
+    "spring.datasource.camunda.url": "jdbc:mysql://anotherDB.onap.org:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",\r
+    "spring.datasource.camunda.username": "admin",\r
+    "spring.datasource.camunda.password": "password",\r
+    "spring.datasource.cldsdb.url": "jdbc:mysql://anotherDB.onap.org:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",\r
+    "spring.datasource.cldsdb.username": "admin",\r
+    "spring.datasource.cldsdb.password": "password"\r
+}\r
+```\r
+\r
+OR \r
+\r
+```json\r
+{\r
+    "spring": \r
+    {\r
+        "datasource": \r
+        {\r
+            "camunda": \r
+            {\r
+                "url": "jdbc:mysql://anotherDB.onap.org:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",\r
+                "username": "admin",\r
+                "password": "password"\r
+            },\r
+\r
+            "cldsdb": \r
+            {\r
+                "url": "jdbc:mysql://anotherDB.onap.org:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true",\r
+                "username": "admin",\r
+                "password": "password"\r
+            }\r
+        }\r
+    }\r
+}\r
+\r
+```\r
+\r
+### Docker-compose\r
+\r
+A [docker-compose example file](extra/docker/clamp/docker-compose.yml) can be found under the [extra/docker/clamp/ folder](extra/docker/).\r
+\r
+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).\r
+\r
+\r
+### Logs\r
+\r
+Clamp uses logback framework to generate logs. The logback.xml file cand be found under the [src/main/resources/ folder](src/main/resources). \r
+\r
+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.\r
index c38d29b..842afd6 100644 (file)
@@ -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 b853ccf..e76cbf3 100644 (file)
--- 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>
                        <name>Maven 2 repository 2</name>
                        <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>
                        <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>
                        <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>
        </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>
                        <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>
                                        <artifactId>apache-log4j-extras</artifactId>
                                        <groupId>log4j</groupId>
                                </exclusion>
+                               <exclusion>
+                                       <artifactId>jackson-databind</artifactId>
+                                       <groupId>com.fasterxml.jackson.core</groupId>
+                               </exclusion>
                        </exclusions>
                </dependency>
                <dependency>
                        </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>
        </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>
                                <directory>src/main/resources</directory>
                                <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>
                                <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>
                                        </execution>
                                </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>
                                        <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
                                </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>
                                                        <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>
                                                        </buildArgs>
                                                </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>
                                                        <goal>push</goal>
                                                </goals>
                                                <configuration>
+                                                   <imageName>onap/clamp</imageName>
                                                        <skipDockerPush>${skip.docker.push}</skipDockerPush>
                                                </configuration>
                                        </execution>
                                                        <!-- <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 (file)
index 578ee1a..0000000
+++ /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 (file)
index f7306e6..0000000
+++ /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 (file)
index 7add1a4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-clamp_apache_v2=Clamp License
index 6b3e272..115949b 100644 (file)
@@ -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\r
+\r
+MAINTAINER "The Onap Team"\r
+LABEL Description="This immage contains an updated ubuntu 16.04 with the openjdk installed" Version="16.04-8"\r
+\r
+ARG http_proxy\r
+ARG https_proxy\r
+ENV HTTP_PROXY=$http_proxy\r
+ENV HTTPS_PROXY=$https_proxy\r
+ENV http_proxy=$HTTP_PROXY\r
+ENV https_proxy=$HTTPS_PROXY\r
+\r
+RUN test -n "$http_proxy" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true &&  \\r
+    apt-get update &&  \\r
+    apt-get -y dist-upgrade &&  \\r
+    apt-get install -y openjdk-8-jre-headless\r
+\r
+ADD clamp.jar /opt/clamp/app.jar\r
+VOLUME /etc\r
+ADD startService.sh /opt/clamp/startService.sh\r
+RUN chmod 700 /opt/clamp/startService.sh\r
+\r
+WORKDIR /opt/clamp/\r
+ENTRYPOINT ./startService.sh \r
diff --git a/src/main/resources/clds-version.properties b/src/main/resources/clds-version.properties
new file mode 100644 (file)
index 0000000..8576692
--- /dev/null
@@ -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
index 479e5c8..b655931 100644 (file)
@@ -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}