--- /dev/null
+target/
\ No newline at end of file
--- /dev/null
+FROM cassandra:2.1.9
+
+ENV CASSANDRA_PORT=9042
+
+COPY create_activityspec_db.cql .
+COPY start.sh .
+
+RUN chmod 744 start.sh
+
+ENTRYPOINT ["/start.sh"]
\ No newline at end of file
--- /dev/null
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>activity-spec-init</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.openecomp.activityspec</groupId>
+ <artifactId>activity-spec</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>onap/activity-spec-init</name>
+ <build>
+ <tags>
+ <tag>${project.version}</tag>
+ </tags>
+ <dockerFileDir>${project.basedir}</dockerFileDir>
+ <dockerFile>Dockerfile</dockerFile>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+if [[ -z "${CASSANDRA_HOST}" ]]; then
+ echo "CASSANDRA_HOST environment variable must be set"
+ exit 1
+fi
+
+cqlsh -f /create_activityspec_db.cql $CASSANDRA_HOST $CASSANDRA_PORT
\ No newline at end of file
--- /dev/null
+target/
\ No newline at end of file
--- /dev/null
+FROM jetty:alpine
+
+EXPOSE 8080
+EXPOSE 8443
+EXPOSE 5005
+
+ARG ARTIFACT_VERSION
+
+# See https://hub.docker.com/_/jetty/
+ARG WEBAPPS_DIR=${JETTY_BASE}/webapps/
+
+COPY activity-spec-api-docs/target/activity-spec-api-docs-${ARTIFACT_VERSION}.war ${WEBAPPS_DIR}
+
+COPY activity-spec-war/target/activity-spec-war-${ARTIFACT_VERSION}.war ${WEBAPPS_DIR}
+
+COPY activity-spec-assembly/configuration.yaml .
+COPY activity-spec-assembly/start.sh .
+
+USER root
+
+RUN chown jetty:jetty start.sh
+RUN chmod 744 start.sh
+
+ENTRYPOINT ["./start.sh"]
\ No newline at end of file
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<!--Custom: Take from application\frontend\nfv-client\dist\optimize\resources\nfv\css\style.css-->
- <link href='css/ncso-style.css' rel='stylesheet' type='text/css'/>
+ <link href='css/custom-style.css' rel='stylesheet' type='text/css'/>
<!--/Custom: Take from application\frontend\nfv-client\dist\optimize\resources\nfv\css\style.css-->
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
--- /dev/null
+<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>
+
+ <artifactId>activity-spec-api-docs</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.openecomp.activityspec</groupId>
+ <artifactId>activity-spec</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <properties>
+ <output.name>activity-spec-api-docs</output.name>
+ <generated.swagger.dir>${project.basedir}/../activity-spec-war/target/generated</generated.swagger.dir>
+ <api.json.file>api.json</api.json.file>
+ <api.html.file>api.html</api.html.file>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Copy api json files"/>
+ <echo message="${generated.swagger.dir}"/>
+ <copy file="${generated.swagger.dir}/swagger-ui/swagger.json"
+ tofile="${project.build.directory}/${api.json.file}"/>
+ <copy file="${generated.swagger.dir}/${api.html.file}"
+ tofile="${project.build.directory}/${api.html.file}"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${mvn.assembly.version}</version>
+ <configuration>
+ <descriptor>assembly/swagger.xml</descriptor>
+ <finalName>${output.name}-${project.version}</finalName>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
--- /dev/null
+cassandraConfig:
+ cassandraHosts: ['CASSANDRA_HOST']
+ reconnectTimeout : 30000
+ authenticate: false
+ username: asdc_user
+ password: Aa1234%^!
+ ssl: false
+ truststorePath : /path/path
+ truststorePassword : Aa123456
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+if [[ -z "${CASSANDRA_HOST}" ]]; then
+ echo "CASSANDRA_HOST environment variable must be set"
+ exit 1
+fi
+
+#Replace 'CASSANDRA_HOST' in configuration.yaml with value of CASSANDRA_HOST environment variable
+sed -i "s/CASSANDRA_HOST/${CASSANDRA_HOST}/" configuration.yaml
+
+java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 "$JETTY_HOME/start.jar" -Dconfiguration.yaml=configuration.yaml
\ No newline at end of file
<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/xsd/maven-4.0.0.xsd">
+
<modelVersion>4.0.0</modelVersion>
<artifactId>activity-spec-service</artifactId>
- <name>activity-spec-service</name>
<parent>
<groupId>org.openecomp.activityspec</groupId>
- <artifactId>activity-spec-web</artifactId>
+ <artifactId>activity-spec</artifactId>
<version>1.2.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
</parent>
-
<properties>
+ <!-- TODO: Is it required -->
<errorcode.dir>${project.build.directory}/generated-sources/error-codes</errorcode.dir>
</properties>
<artifactId>openecomp-sdc-common-rest</artifactId>
<version>${project.version}</version>
</dependency>
- <!-- CXF -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
<scope>runtime</scope>
</dependency>
-
- <!-- Java Stuff -->
<dependency>
<groupId>org.openecomp.sdc</groupId>
<artifactId>openecomp-sdc-versioning-core</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${mvn.surefire.version}</version>
- </plugin>
- </plugins>
- </build>
-
</project>
@Override
public void updateVersionStatus(String itemId, VersionStatus addedVersionStatus,
- VersionStatus removedVersionStatus) {
-
+ VersionStatus removedVersionStatus) {
+ // noop
}
@Override
public void archive(Item item) {
-
+ // noop
}
- @Override
public void restore(Item item) {
-
+ // noop
}
@Override
public void updateName(String itemId, String name) {
-
+ // noop
}
@Override
public void update(Item item) {
-
+ // noop
}
@Override
public void delete(Item item) {
-
+ // noop
}
}
<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/xsd/maven-4.0.0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
<modelVersion>4.0.0</modelVersion>
-
- <artifactId>activityspec-war</artifactId>
- <name>activityspec-war</name>
+
+ <artifactId>activity-spec-war</artifactId>
<packaging>war</packaging>
-
+
<parent>
<groupId>org.openecomp.activityspec</groupId>
- <artifactId>activity-spec-web</artifactId>
+ <artifactId>activity-spec</artifactId>
<version>1.2.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
+ <relativePath>../..</relativePath>
</parent>
-
+
<dependencies>
<dependency>
- <groupId>org.openecomp.activityspec</groupId>
- <artifactId>activity-spec-service</artifactId>
- <version>${project.version}</version>
+ <groupId>org.openecomp.activityspec</groupId>
+ <artifactId>activity-spec-service</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>${mvn.war.version}</version>
- <configuration>
- <attachClasses>true</attachClasses>
- <webResources>
- <resource>
- <!-- this is relative to the pom.xml directory -->
- <directory>${basedir}/target/generated/swagger-ui</directory>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <version>${mvn.swagger.version}</version>
- <configuration>
- <apiSources>
- <apiSource>
- <springmvc>false</springmvc>
- <locations>org.openecomp.activityspec</locations>
- <schemes>http</schemes>
- <basePath>/activityspec-api</basePath>
- <info>
- <title>Rest API</title>
- <version>v1.0, build #${buildNumber}</version>
- <description>Rest API Documentation</description>
- <termsOfService>
- http://www.github.com/kongchen/swagger-maven-plugin
- </termsOfService>
- </info>
- <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
- <outputPath>${basedir}/target/generated/api.html</outputPath>
- <swaggerDirectory>${basedir}/target/generated/swagger-ui
- </swaggerDirectory>
- </apiSource>
- </apiSources>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${mvn.war.version}</version>
+ <configuration>
+ <attachClasses>false</attachClasses>
+ <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
+ <webResources>
+ <resource>
+ <directory>${project.build.directory}/generated/swagger-ui</directory>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>${mvn.swagger.version}</version>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <springmvc>false</springmvc>
+ <locations>org.openecomp.activityspec</locations>
+ <schemes>http</schemes>
+ <basePath>/activity-spec-api</basePath>
+ <info>
+ <title>Activity Spec REST API Documentation</title>
+ <version>${project.version}</version>
+ <description>Activity Spec REST API Documentation</description>
+ <termsOfService>
+ http://www.github.com/kongchen/swagger-maven-plugin
+ </termsOfService>
+ </info>
+ <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
+ <outputPath>${project.build.directory}/generated/api.html</outputPath>
+ <swaggerDirectory>${project.build.directory}/generated/swagger-ui</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
-
+
</project>
\ No newline at end of file
"http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
- <Set name="contextPath">/activityspec-api</Set>
+ <Set name="contextPath">/activity-spec-api</Set>
</Configure>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.activityspec</groupId>
<artifactId>activity-spec-web</artifactId>
<packaging>pom</packaging>
<modules>
<module>activity-spec-service</module>
<module>activity-spec-war</module>
+ <module>activity-spec-api-docs</module>
</modules>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <name>onap/activity-spec</name>
+ <build>
+ <tags>
+ <tag>${project.version}</tag>
+ </tags>
+ <dockerFileDir>${project.basedir}</dockerFileDir>
+ <dockerFile>Dockerfile</dockerFile>
+ <args>
+ <ARTIFACT_VERSION>${project.version}</ARTIFACT_VERSION>
+ </args>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
+++ /dev/null
-Add here any configurations if required
\ No newline at end of file
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
<modelVersion>4.0.0</modelVersion>
<groupId>org.openecomp.activityspec</groupId>
<artifactId>activity-spec</artifactId>
- <packaging>pom</packaging>
<version>1.2.0-SNAPSHOT</version>
-
- <modules>
- <module>activity-spec-web</module>
- <module>swagger-ui</module>
- </modules>
+ <packaging>pom</packaging>
<properties>
- <mockito.all.version>1.10.19</mockito.all.version>
+
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
<mvn.surefire.version>2.19.1</mvn.surefire.version>
<jacoco.version>0.7.9</jacoco.version>
<mvn.compiler.version>2.5.1</mvn.compiler.version>
<mvn.jar.version>2.4</mvn.jar.version>
<mvn.war.version>2.1.1</mvn.war.version>
<mvn.swagger.version>3.1.0</mvn.swagger.version>
- <java.source>1.8</java.source>
- <java.target>1.8</java.target>
+ <mvn.resources.version>3.0.2</mvn.resources.version>
+ <mvn.docker.version>0.24.0</mvn.docker.version>
+
+ <mockito.all.version>1.10.19</mockito.all.version>
<spring.framework.version>4.1.3.RELEASE</spring.framework.version>
<cxf.version>3.1.8</cxf.version>
<ws.rs.version>2.0.1</ws.rs.version>
<jersey.multipart.version>1.18.1</jersey.multipart.version>
<javax.servlet.version>2.5</javax.servlet.version>
<org.codehaus.jackson.version>1.9.13</org.codehaus.jackson.version>
+
</properties>
+ <modules>
+ <module>activity-spec-web</module>
+ <module>activity-spec-init</module>
+ </modules>
+
<build>
<pluginManagement>
- <plugins>
- <!-- ================================================== -->
- <!-- Set the JDK compiler version. -->
- <!-- ================================================== -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${mvn.compiler.version}</version>
- <configuration>
- <source>${java.source}</source>
- <target>${java.target}</target>
- </configuration>
- </plugin>
- </plugins>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${mvn.compiler.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${mvn.docker.version}</version>
+ <configuration>
+ <verbose>false</verbose>
+ <registry>nexus3.onap.org:10001</registry>
+ <authConfig>
+ <pull>
+ <username>docker</username>
+ <password>docker</password>
+ </pull>
+ </authConfig>
+ </configuration>
+ <executions>
+ <execution>
+ <id>docker-build</id>
+ <phase>install</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</pluginManagement>
</build>
</dependencies>
</dependencyManagement>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
- </plugin>
- </plugins>
- </reporting>
</project>
\ No newline at end of file
+++ /dev/null
-<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>
- <artifactId>activity-spec-api-docs</artifactId>
- <parent>
- <groupId>org.openecomp.activityspec</groupId>
- <artifactId>activity-spec</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
-
- <properties>
- <plugin.name>activity-spec-api-docs</plugin.name>
- <package.dir>${basedir}/api-docs</package.dir>
- <rest.api.dir>${basedir}/../activity-spec-web/activity-spec-war</rest.api.dir>
- <api.json.file>api.json</api.json.file>
- <api.html.file>api.html</api.html.file>
- </properties>
- <build>
- <plugins>
- <!-- ============================================= -->
- <!-- Clean api-docs folder -->
- <!-- ============================================= -->
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.6.1</version>
- <executions>
- <execution>
- <id>clean.dist.folder</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- <configuration>
- <filesets>
- <fileset>
- <directory>${basedir}/target/api-docs</directory>
- </fileset>
- </filesets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>${mvn.jar.version}</version>
- <executions>
- <execution>
- <id>default-jar</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <echo message="Copy api json files"/>
- <echo message= "${rest.api.dir}" />
- <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${basedir}/target/${api.json.file}"/>
- <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${package.dir}/${api.json.file}"/>
- <copy file="${rest.api.dir}/target/generated/${api.html.file}" tofile="${package.dir}/${api.html.file}"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>${mvn.assembly.version}</version>
- <configuration>
- <descriptor>assembly/swagger.xml</descriptor>
- <finalName>${plugin.name}</finalName>
- <outputDirectory>${package.dir}</outputDirectory>
- <appendAssemblyId>false</appendAssemblyId>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>