Update pom for sonar
[aai/model-loader.git] / pom.xml
1 <!--
2      ============LICENSE_START=======================================================
3      MODEL LOADER SERVICE
4      ================================================================================
5      Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6      ================================================================================
7      Licensed under the Apache License, Version 2.0 (the "License");
8      you may not use this file except in compliance with the License.
9      You may obtain a copy of the License at
10      
11      http://www.apache.org/licenses/LICENSE-2.0
12      
13      Unless required by applicable law or agreed to in writing, software
14      distributed under the License is distributed on an "AS IS" BASIS,
15      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16      See the License for the specific language governing permissions and
17      limitations under the License.
18      ============LICENSE_END=========================================================
19    -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23         <modelVersion>4.0.0</modelVersion>
24         <groupId>org.openecomp.aai.model-loader</groupId>
25         <artifactId>model-loader</artifactId>
26         <version>1.0.0-SNAPSHOT</version>
27         <packaging>war</packaging>
28         
29         <properties>
30                 <docker.location>${basedir}/target</docker.location>
31                 <dependency.scope>provided</dependency.scope>
32                 <checkstyle.config.location>google_checks.xml</checkstyle.config.location>
33                 <maven.compiler.source>1.8</maven.compiler.source>
34         <maven.compiler.target>1.8</maven.compiler.target>
35                <sonar.language>java</sonar.language>
36                <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
37                <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
38                <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
39                <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
40                <sonar.projectVersion>${project.version}</sonar.projectVersion>
41         </properties>
42
43         <dependencies>
44                 <dependency>
45                         <groupId>org.mockito</groupId>
46                         <artifactId>mockito-all</artifactId>
47                         <version>1.10.19</version>
48                         <scope>test</scope>
49                 </dependency>
50                 <dependency>
51                         <groupId>org.powermock</groupId>
52                         <artifactId>powermock-module-junit4</artifactId>
53                         <version>1.6.2</version>
54                         <scope>test</scope>
55                 </dependency>
56                 <dependency>
57                         <groupId>org.powermock</groupId>
58                         <artifactId>powermock-api-mockito</artifactId>
59                         <version>1.6.2</version>
60                         <scope>test</scope>
61                 </dependency>
62                 <dependency>
63                         <groupId>org.powermock</groupId>
64                         <artifactId>powermock-module-javaagent</artifactId>
65                         <version>1.6.2</version>
66                         <scope>test</scope>
67                 </dependency>
68                 <dependency>
69                         <groupId>org.powermock</groupId>
70                         <artifactId>powermock-module-junit4-rule-agent</artifactId>
71                         <version>1.6.2</version>
72                         <scope>test</scope>
73                 </dependency>
74                 <!-- xjc dependencies -->
75                 <dependency>
76                         <groupId>javax.xml.bind</groupId>
77                         <artifactId>jaxb-api</artifactId>
78                         <version>2.2.11</version>
79                 </dependency>
80                 <dependency>
81                         <groupId>com.sun.xml.bind</groupId>
82                         <artifactId>jaxb-impl</artifactId>
83                         <version>2.2.11</version>
84                 </dependency>
85                 <dependency>
86                         <groupId>com.sun.xml.bind</groupId>
87                         <artifactId>jaxb-core</artifactId>
88                         <version>2.2.11</version>
89                 </dependency>
90                 <dependency>
91                         <groupId>com.sun.xml.bind</groupId>
92                         <artifactId>jaxb-xjc</artifactId>
93                         <version>2.2.11</version>
94                 </dependency>
95                 <dependency>
96                         <groupId>org.eclipse.persistence</groupId>
97                         <artifactId>org.eclipse.persistence.moxy</artifactId>
98                         <version>2.6.2</version>
99                         <scope>compile</scope>
100                 </dependency>
101                 <dependency>
102                         <groupId>com.sun.jersey</groupId>
103                         <artifactId>jersey-client</artifactId>
104                         <version>1.18</version>
105                 </dependency>
106                 <!-- Common logging framework -->
107                 <dependency>
108                         <groupId>org.openecomp.aai.logging-service</groupId>
109                         <artifactId>common-logging</artifactId>
110                         <version>1.0.0-SNAPSHOT</version>
111                 </dependency>
112                 <dependency>
113                         <groupId>org.openecomp.sdc</groupId>
114                     <artifactId>sdc-distribution-client</artifactId>
115                         <version>0.9.0</version>
116                 </dependency>
117                 <dependency>
118                         <groupId>org.json</groupId>
119                         <artifactId>json</artifactId>
120                         <version>20131018</version>
121                 </dependency>
122                 
123                 <dependency>
124                     <groupId>org.eclipse.jetty</groupId>
125                     <artifactId>jetty-security</artifactId>
126                     <version>9.3.8.RC0</version>
127                 </dependency>
128                 
129         <dependency>
130             <groupId>org.springframework</groupId>
131             <artifactId>spring-webmvc</artifactId>
132             <version>4.0.0.RELEASE</version>
133         </dependency>
134         <dependency>
135             <groupId>jline</groupId>
136             <artifactId>jline</artifactId>
137             <version>2.12.1</version>
138         </dependency>
139         
140         </dependencies>
141         
142         <!-- Plugins and repositories -->
143           <pluginRepositories>
144                 <pluginRepository>
145                            <id>central</id>
146                           <url>http://repo1.maven.org/maven2</url>
147                    </pluginRepository>
148                   <pluginRepository>
149                           <id>EvoSuite</id>
150                         <name>EvoSuite Repository</name>
151                          <url>http://www.evosuite.org/m2</url>
152                   </pluginRepository>
153           </pluginRepositories>
154            <repositories>
155                    <repository>
156                           <id>central</id>
157                           <name>Maven 2 repository 2</name>
158                           <url>http://repo2.maven.org/maven2/</url>
159                   </repository>
160               <repository>
161                          <id>ecomp-releases</id>
162                           <name>ECOMP Release Repository</name>
163                          <url>https://nexus.openecomp.org/content/repositories/releases/</url>
164                   </repository>
165                   <repository>
166                          <id>ecomp-snapshots</id>
167                           <name>ECOMP Snapshot Repository</name>
168                          <url>https://nexus.openecomp.org/content/repositories/snapshots/</url>
169                   </repository>
170
171           </repositories>
172         
173         
174         <build>
175                 <plugins>
176                         <plugin>
177                                 <groupId>org.apache.maven.plugins</groupId>
178                                 <artifactId>maven-resources-plugin</artifactId>
179                                 <version>2.7</version>
180                                 <executions>
181                                         <execution>
182                                                 <id>copy-docker-file</id>
183                                                 <phase>package</phase>
184                                                 <goals>
185                                                         <goal>copy-resources</goal>
186                                                 </goals>
187                                                 <configuration>
188                                                         <outputDirectory>target</outputDirectory>
189                                                         <overwrite>true</overwrite>
190                                                         <resources>
191                                                                 <resource>
192                                                                         <directory>${basedir}/src/main/docker</directory>
193                                                                         <filtering>true</filtering>
194                                                                         <includes>
195                                                                                 <include>**/*</include>
196                                                                         </includes>
197                                                                 </resource>
198                                                         </resources>
199                                                 </configuration>
200                                         </execution>
201                                 </executions>
202                         </plugin>
203                         <plugin>
204                                 <groupId>com.spotify</groupId>
205                                 <artifactId>docker-maven-plugin</artifactId>
206                                 <version>0.4.11</version>
207                                 <configuration>         
208                                         <verbose>true</verbose>
209                                         <serverId>docker-hub</serverId>
210                                         <imageName>${docker.push.registry}/openecomp/${project.artifactId}</imageName>                                  
211                                         <dockerDirectory>${docker.location}</dockerDirectory>
212                                         <imageTags>
213                                                 <imageTag>${docker.imagetag}</imageTag>
214                                                 <imageTag>latest</imageTag>
215                                         </imageTags>
216                                         <forceTags>true</forceTags>
217                                 </configuration>
218                         </plugin>
219                         <plugin>
220                                 <groupId>org.apache.maven.plugins</groupId>
221                                 <artifactId>maven-dependency-plugin</artifactId>
222                                 <version>2.5.1</version>
223                                 <executions>
224                                         <execution>
225                                                 <id>copy-agent</id>
226                                                 <phase>process-test-classes</phase>
227                                                 <goals>
228                                                         <goal>copy</goal>
229                                                 </goals>
230                                                 <configuration>
231                                                         <artifactItems>
232                                                                 <artifactItem>
233                                                                         <groupId>org.powermock</groupId>
234                                                                         <artifactId>powermock-module-javaagent</artifactId>
235                                                                         <version>1.6.2</version>
236                                                                         <outputDirectory>${project.build.directory}/agents</outputDirectory>
237                                                                         <destFileName>powermock-javaagent.jar</destFileName>
238                                                                 </artifactItem>
239                                                         </artifactItems>
240                                                 </configuration>
241                                         </execution>
242                                 </executions>
243                         </plugin>
244                         <plugin>
245                                 <groupId>org.apache.maven.plugins</groupId>
246                                 <artifactId>maven-surefire-plugin</artifactId>
247                                 <version>2.12.4</version>
248                                 <configuration>
249                                    <argLine>-noverify ${argLine}</argLine>
250                                 </configuration>
251                         </plugin>
252                         <plugin>
253                                 <groupId>org.codehaus.mojo</groupId>
254                                 <artifactId>jaxb2-maven-plugin</artifactId>
255                                 <version>2.2</version>
256                                 <executions>
257                                         <execution>
258                                                 <id>xjc</id>
259                                                 <goals>
260                                                         <goal>xjc</goal>
261                                                 </goals>
262                                         </execution>
263                                 </executions>
264                                 <configuration>
265                                         <clearOutputDir>false</clearOutputDir>
266                                         <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
267                                         <sources>
268                                                 <source>${project.basedir}/src/main/resources/schema</source>
269                                         </sources>
270                                         <addGeneratedAnnotation>true</addGeneratedAnnotation>
271                                 </configuration>
272                         </plugin>
273                         <plugin>
274                                 <groupId>org.apache.maven.plugins</groupId>
275                                 <artifactId>maven-compiler-plugin</artifactId>
276                                 <version>3.1</version>
277                         </plugin>
278                 
279                         <!-- Checkstyle plugin - used to report on compliance with -->
280                         <!-- the Google style guide. -->
281                         <plugin>
282                                 <groupId>org.apache.maven.plugins</groupId>
283                                 <artifactId>maven-site-plugin</artifactId>
284                                 <version>3.3</version>
285                                 <configuration>
286                                         <reportPlugins>
287                                                 <plugin>
288                                                         <groupId>org.apache.maven.plugins</groupId>
289                                                         <artifactId>maven-checkstyle-plugin</artifactId>
290                                                         <version>2.17</version>
291                                                         <reportSets>
292                                                                 <reportSet>
293                                                                         <reports>
294                                                                                 <report>checkstyle</report>
295                                                                         </reports>
296                                                                 </reportSet>
297                                                         </reportSets>
298                                                 </plugin>
299                                         </reportPlugins>
300                                 </configuration>
301                         </plugin>
302                         
303             <!-- license plugin -->
304             <plugin>
305               <groupId>org.codehaus.mojo</groupId>
306               <artifactId>license-maven-plugin</artifactId>
307               <version>1.10</version>
308               <configuration>
309                 <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
310                 <excludes>
311                   <exclude>**.json</exclude>
312                   <exclude>**.properties</exclude>
313                 </excludes>
314                 <processStartTag>============LICENSE_START=======================================================</processStartTag>
315                 <processEndTag>============LICENSE_END=========================================================</processEndTag>
316                 <sectionDelimiter>================================================================================</sectionDelimiter>
317                 <licenseName>apache_v2</licenseName>
318                 <inceptionYear>2017</inceptionYear>
319                 <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
320                 <projectName>MODEL LOADER SERVICE</projectName>
321                 <canUpdateCopyright>true</canUpdateCopyright>
322                 <canUpdateDescription>true</canUpdateDescription>
323                 <canUpdateLicense>true</canUpdateLicense>
324                 <emptyLineAfterHeader>true</emptyLineAfterHeader>
325                 <roots>
326                   <root>.</root>
327                 </roots>
328                 <excludes>
329                   <exclude>**/*.json</exclude>
330                 </excludes>
331                 <extraExtensions>
332                   <route>xml</route>
333                   <props>properties</props>
334                   <xsd>xml</xsd>
335                   <txt>java</txt>
336                 </extraExtensions>
337               </configuration>
338               <executions>
339                 <execution>
340                   <id>first</id>
341                   <goals>
342                     <goal>update-file-header</goal>
343                   </goals>
344                   <phase>process-sources</phase>
345                 </execution>
346               </executions>
347             </plugin>
348              <plugin>
349                 <groupId>org.apache.maven.plugins</groupId>
350                 <artifactId>maven-deploy-plugin</artifactId>                    
351                 <configuration>
352                 <skip>true</skip>
353                 </configuration>
354              </plugin>
355              <plugin>
356               <groupId>org.codehaus.mojo</groupId>
357               <artifactId>sonar-maven-plugin</artifactId>
358               <version>3.2</version>
359             </plugin>
360             <plugin>
361               <groupId>org.jacoco</groupId>
362               <artifactId>jacoco-maven-plugin</artifactId>
363               <version>0.7.7.201606060606</version>
364               <configuration>
365                    <dumpOnExit>true</dumpOnExit>
366               </configuration>
367               <executions>
368                    <execution>
369                      <id>jacoco-initialize-unit-tests</id>
370                      <goals>
371                            <goal>prepare-agent</goal>
372                      </goals>
373                      <configuration>
374                            <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
375                            <!-- <append>true</append> -->
376                      </configuration>
377                    </execution>
378               </executions>
379             </plugin>
380                 </plugins>              
381         </build>
382         
383         
384 </project>