aai-service: Force maven-dependency-plugin version
[aai/aai-service.git] / ajsc-aai / pom.xml
index 3ed7067..75d6188 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.openecomp.aai.aai-service</groupId>
     <artifactId>aai-service</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>1.1.0-SNAPSHOT</version>
   </parent>
   <artifactId>ajsc-aai</artifactId>
   <name>ajsc</name>
                <dockerLocation>${basedir}/target/swm/package/nix/dist_files/</dockerLocation>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 
+               <skipTests>false</skipTests>
+        <!-- sonar properties -->
+               <sonar.language>java</sonar.language>
+               <docker.image.version>1.0.0</docker.image.version>
+               <timestamp>${maven.build.timestamp}</timestamp>
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+       <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+       <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+       <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+       <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
+       <sonar.projectVersion>${project.version}</sonar.projectVersion>
   </properties>
   <dependencies>
                <!-- AJSC related dependencies -->
                        <groupId>commons-collections</groupId>
                        <artifactId>commons-collections</artifactId>
                </dependency>
-
-
-
+               <dependency>
+                       <groupId>jdk.tools</groupId>
+                       <artifactId>jdk.tools</artifactId>
+                       <version>1.8.0</version>
+                       <scope>system</scope>
+                       <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
+               </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>1.10.19</version>
                        <scope>test</scope>
                </dependency>
+
                <dependency>
                        <groupId>org.powermock</groupId>
                        <artifactId>powermock-module-junit4</artifactId>
                        <artifactId>activemq-broker</artifactId>
                        <version>5.12.2</version>
                </dependency>   
-
+       <dependency>
+               <groupId>org.openecomp.aai.aai-service</groupId>
+               <artifactId>aai-schema</artifactId>
+               <version>1.1.0-SNAPSHOT</version>
+       </dependency>
        <dependency>
                <groupId>org.openecomp.aai.aai-service</groupId>
                <artifactId>annotations</artifactId>
-               <version>1.0.0-SNAPSHOT</version>
+               <version>1.1.0-SNAPSHOT</version>
        </dependency>
   </dependencies>
   <build>
-               
-               <plugins>
-                <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <version>2.7</version>
-                <executions>
-                    <execution>
-                        <id>copy-docker-file</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${dockerLocation}</outputDirectory>
-                            <overwrite>true</overwrite>
-                            <resources>
-                                <resource>
-                                    <directory>${basedir}/src/main/resources/docker</directory>
-                                    <filtering>true</filtering>
-                                    <includes>
-                                        <include>**/*</include>
-                                    </includes>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-commonlibs-file</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${dockerLocation}/commonLibs</outputDirectory>
-                            <overwrite>true</overwrite>
-                            <resources>
-                                <resource>
-                                    <directory>${basedir}/target/commonLibs</directory>
-                                    <filtering>false</filtering>
-                                    <includes>
-                                        <include>*.jar</include>
-                                    </includes>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>com.spotify</groupId>
-                <artifactId>docker-maven-plugin</artifactId>
-                <version>0.4.11</version>
-                <configuration>
-                       <verbose>true</verbose>
-                                       
-                    <imageName>${docker.push.registry}/${project.artifactId}</imageName>
-                    <dockerDirectory>${dockerLocation}</dockerDirectory>
-                    <serverId>docker-hub</serverId>                   
-                    <imageTags>
-                        <imageTag>${docker_imageversion}</imageTag>
-                        <imageTag>latest</imageTag>
-                    </imageTags>
-                    <forceTags>true</forceTags>
-                </configuration>
-            </plugin>
+    <finalName>aai</finalName>
+    <plugins>  
+                 <plugin>
+         <groupId>org.codehaus.mojo</groupId>
+         <artifactId>sonar-maven-plugin</artifactId>
+         <version>3.2</version>
+       </plugin>
+       <plugin>
+         <groupId>org.jacoco</groupId>
+         <artifactId>jacoco-maven-plugin</artifactId>
+         <version>0.7.7.201606060606</version>
+         <configuration>
+               <dumpOnExit>true</dumpOnExit>
+         </configuration>
+         <executions>
+               <execution>
+                 <id>jacoco-initialize-unit-tests</id>
+                 <goals>
+                       <goal>prepare-agent</goal>
+                 </goals>
+                 <configuration>
+                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
+                       <!-- <append>true</append> -->
+                 </configuration>
+               </execution>
+         </executions>
+       </plugin>
+                        <plugin>
+                       <groupId>org.apache.maven.plugins</groupId>
+                       <artifactId>maven-resources-plugin</artifactId>
+                       <version>2.7</version>
+                       <executions>
+                           <execution>
+                               <id>copy-docker-file</id>
+                               <phase>package</phase>
+                               <goals>
+                                   <goal>copy-resources</goal>
+                               </goals>
+                               <configuration>
+                                   <outputDirectory>${dockerLocation}</outputDirectory>
+                                   <overwrite>true</overwrite>
+                                   <resources>
+                                       <resource>
+                                           <directory>${basedir}/src/main/resources/docker</directory>
+                                           <filtering>true</filtering>
+                                           <includes>
+                                               <include>**/*</include>
+                                           </includes>
+                                       </resource>
+                                   </resources>
+                               </configuration>
+                           </execution>
+                           <execution>
+                               <id>copy-commonlibs-file</id>
+                               <phase>package</phase>
+                               <goals>
+                                   <goal>copy-resources</goal>
+                               </goals>
+                               <configuration>
+                                   <outputDirectory>${dockerLocation}/commonLibs</outputDirectory>
+                                   <overwrite>true</overwrite>
+                                   <resources>
+                                       <resource>
+                                           <directory>${basedir}/target/commonLibs</directory>
+                                           <filtering>false</filtering>
+            
+                                           <includes>
+                                               <include>*.jar</include>
+      
+                                           </includes>
+                                       </resource>
+                                   </resources>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+                   <plugin>
+                       <groupId>com.spotify</groupId>
+                       <artifactId>docker-maven-plugin</artifactId>
+                       <version>0.4.11</version>
+                       <configuration>
+                               <verbose>true</verbose>
+                                               
+                               <imageName>${docker.push.registry}/openecomp/${project.artifactId}</imageName>
+                           <dockerDirectory>${dockerLocation}</dockerDirectory>
+                           <serverId>docker-hub</serverId>                   
+                           <imageTags>
+                               <imageTag>latest</imageTag>
+                           </imageTags>
+                           <forceTags>true</forceTags>
+                       </configuration>
+                   </plugin>
                <plugin>
                        <groupId>org.jvnet.jaxb2.maven2</groupId>
                                <artifactId>maven-jaxb2-plugin</artifactId>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-dependency-plugin</artifactId>
-                               <version>2.5.1</version>
+                               <version>2.8</version>
                                <executions>
                                        <execution>
                                                <id>copy-agent</id>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
+                            <version>2.8</version>
                            <executions>
                              <execution>
                                <id>unpack-schema-dependency</id>
                                <artifactItem>
                                  <groupId>org.openecomp.aai.aai-service</groupId>
                                  <artifactId>aai-schema</artifactId>
-                                 <version>1.0.0-SNAPSHOT</version>
+                                 <version>1.1.0-SNAPSHOT</version>
                                  <outputDirectory>bundleconfig-local/etc</outputDirectory>
                                  <includes>oxm/*.xml</includes>
                                </artifactItem>
                                <artifactItem>
                                  <groupId>org.openecomp.aai.aai-service</groupId>
                                  <artifactId>aai-schema</artifactId>
-                                 <version>1.0.0-SNAPSHOT</version>
+                                 <version>1.1.0-SNAPSHOT</version>
                                  <outputDirectory>src/main</outputDirectory>
                                  <includes>aai_schema/*.xsd</includes>
                                </artifactItem>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
-                               <version>2.12.4</version>
+                               <version>2.19.1</version>
                                <configuration>
+                                       <skipTests>${skipTests}</skipTests>
                                        <reuseForks>false</reuseForks>
-                                       <forkMode>always</forkMode> 
-                                       <argLine>-javaagent:${project.build.directory}/agents/powermock-javaagent.jar
-                                               -noverify</argLine>
+                                       <threadCount>1</threadCount> 
+                                       <argLine>-noverify ${argLine}</argLine>
                                        <systemPropertyVariables>
                                                <AJSC_HOME>.</AJSC_HOME>
                                                <BUNDLECONFIG_DIR>bundleconfig-local</BUNDLECONFIG_DIR>
                                        </systemPropertyVariables>
                                </configuration>
                        </plugin>
-                        <plugin>
-               <groupId>org.apache.maven.plugins</groupId>
-               <artifactId>maven-deploy-plugin</artifactId>                    
-               <configuration>
-               <skip>true</skip>
-               </configuration>
-             </plugin>
+                       <plugin>
+                       <groupId>org.apache.maven.plugins</groupId>
+                       <artifactId>maven-deploy-plugin</artifactId>
+                       <executions>
+                               <execution>
+                               <id>default-deploy</id>
+                               <phase>none</phase>
+                               </execution>
+                               </executions>
+                       </plugin> 
                        </plugins>
        </build>
                <profiles>
                                </plugins>
                        </build>
                </profile>
-
        </profiles>
 </project>