- <build>
- <finalName>babel</finalName>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring.boot.version}</version>
- <configuration>
- <jvmArguments>
- -DCONFIG_HOME=./appconfig-local
- -DAPP_HOME=.
- -Dartifactgenerator.config=./appconfig-local/artifact-generator.properties
- -Dgroupfilter.config=./appconfig-local/filter-types.properties
- -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
- </jvmArguments>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>initialize</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${aai-schema.group.id}</groupId>
- <artifactId>aai-schema</artifactId>
- <version>${aai-schema.version}</version>
- <type>jar</type>
- <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
- <outputDirectory>${project.build.directory}/tmp</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${antrun.version}</version>
- <executions>
- <execution>
- <id>Flatten XSDs</id>
- <phase>initialize</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <copy todir="${aai.schema.target.folder}" flatten="true">
- <fileset dir="${project.build.directory}/tmp">
- <include name="**/*.xsd" />
- </fileset>
- </copy>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.jvnet.jaxb2.maven2</groupId>
- <artifactId>maven-jaxb2-plugin</artifactId>
- <version>${mvn.jaxb2.version}</version>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
- <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
- <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
- <schemaIncludes>
- <include>aai_schema_latest.xsd</include>
- </schemaIncludes>
- <extension>true</extension>
- <args>
- <arg>-Xannotate</arg>
- </args>
- <plugins>
- <plugin>
- <groupId>org.jvnet.jaxb2_commons</groupId>
- <artifactId>jaxb2-basics-annotate</artifactId>
- <version>0.6.4</version>
- </plugin>
- <!-- Add the dependencies with your annotations as 'plugins' below -->
- <plugin>
- <groupId>org.jvnet.jaxb2_commons</groupId>
- <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
- <version>1.0.0</version>
- </plugin>
- </plugins>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>exec-maven-plugin</artifactId>
- <groupId>org.codehaus.mojo</groupId>
- <version>1.5.0</version>
- <executions>
- <execution><!-- Run our script to get latest xsd version -->
- <id>Get latest xsd version</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <workingDirectory>${basedir}/scripts</workingDirectory>
- <executable>bash</executable>
- <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.mycila</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <header>License.txt</header>
- <includes>
- <include>src/main/java/**</include>
- <include>src/test/java/**</include>
- <include>pom.xml</include>
- </includes>
- <skipExistingHeaders>true</skipExistingHeaders>
- </configuration>
- <executions>
- <execution>
- <goals>
- <!-- Set goal from "check" to "format" to auto update license headers -->
- <goal>check</goal>
- </goals>
- <phase>validate</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <reuseForks>false</reuseForks>
- <forkCount>1</forkCount>
- <environmentVariables>
- <APP_HOME>.</APP_HOME>
- <CONFIG_HOME>src/test/resources</CONFIG_HOME>
- </environmentVariables>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <id>copy-docker-file</id>
- <phase>package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>target</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <directory>${basedir}/src/main/docker</directory>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>${basedir}/src/main/bin/</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>client</classifier>
- <includes>
- <include>**/babel/service/data/*</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <classifier>client</classifier>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.4.11</version>
- <configuration>
- <verbose>true</verbose>
- <serverId>docker-hub</serverId>
- <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
- <dockerDirectory>${docker.location}</dockerDirectory>
- <imageTags>
- <imageTag>latest</imageTag>
- </imageTags>
- <forceTags>true</forceTags>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <!-- Testing -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.sdc.sdc-distribution-client</groupId>
+ <artifactId>sdc-distribution-client</artifactId>
+ <version>${sdc.distribution.client.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>${xmlunit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>${spring.boot.version}</version>
+ <configuration>
+ <jvmArguments>
+ -DCONFIG_HOME=./appconfig-local
+ -DAPP_HOME=.
+ -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
+ -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
+ </jvmArguments>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${aai-schema.group.id}</groupId>
+ <artifactId>aai-schema</artifactId>
+ <version>${aai-schema.version}</version>
+ <type>jar</type>
+ <includes>${aai.schema.source.folder}/aai_schema_v**.xsd</includes>
+ <outputDirectory>${project.build.directory}/tmp</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${antrun.version}</version>
+ <executions>
+ <execution>
+ <id>Flatten XSDs</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy todir="${aai.schema.target.folder}" flatten="true">
+ <fileset dir="${project.build.directory}/tmp">
+ <include name="**/*.xsd"/>
+ </fileset>
+ </copy>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.jvnet.jaxb2.maven2</groupId>
+ <artifactId>maven-jaxb2-plugin</artifactId>
+ <version>${mvn.jaxb2.version}</version>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <schemaDirectory>${aai.schema.target.folder}</schemaDirectory>
+ <generatePackage>org.onap.aai.babel.xml.generator.xsd</generatePackage>
+ <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
+ <schemaIncludes>
+ <include>aai_schema_latest.xsd</include>
+ </schemaIncludes>
+ <extension>true</extension>
+ <args>
+ <arg>-Xannotate</arg>
+ </args>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-annotate</artifactId>
+ <version>0.6.4</version>
+ </plugin>
+ <!-- Add the dependencies with your annotations as 'plugins' below -->
+ <plugin>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-annotate-plugin-test-annox-annotations</artifactId>
+ <version>1.0.0</version>
+ </plugin>
+ </plugins>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <version>1.5.0</version>
+ <executions>
+ <execution><!-- Run our script to get latest xsd version -->
+ <id>Get latest xsd version</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <workingDirectory>${basedir}/scripts</workingDirectory>
+ <executable>bash</executable>
+ <commandlineArgs>get-latest-xsd-version.sh ${basedir}</commandlineArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/descriptor.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <version>3.0</version>
+ <configuration>
+ <header>License.txt</header>
+ <includes>
+ <include>src/main/java/**</include>
+ <include>src/test/java/**</include>
+ <include>pom.xml</include>
+ </includes>
+ <skipExistingHeaders>true</skipExistingHeaders>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <!-- Set goal from "check" to "format" to auto update license headers -->
+ <goal>check</goal>
+ </goals>
+ <phase>validate</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <reuseForks>false</reuseForks>
+ <forkCount>1</forkCount>
+ <environmentVariables>
+ <APP_HOME>.</APP_HOME>
+ <CONFIG_HOME>src/test/resources</CONFIG_HOME>
+ </environmentVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>client</classifier>
+ <includes>
+ <include>**/babel/service/data/*</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <classifier>client</classifier>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>