Merge "Minor changes"
[aaa.git] / aaa-cli-jar / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
4
5 This program and the accompanying materials are made available under the
6 terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
8 -->
9 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11   <modelVersion>4.0.0</modelVersion>
12
13   <parent>
14     <groupId>org.opendaylight.aaa</groupId>
15     <artifactId>aaa-parent</artifactId>
16     <version>0.5.0-SNAPSHOT</version>
17     <relativePath>../parent</relativePath>
18   </parent>
19
20   <artifactId>aaa-cli-jar</artifactId>
21   <name>ODL :: aaa :: ${project.artifactId}</name>
22   <packaging>jar</packaging>
23
24   <dependencies>
25     <dependency>
26       <groupId>com.google.guava</groupId>
27       <artifactId>guava</artifactId>
28     </dependency>
29     <dependency>
30       <groupId>net.sf.jopt-simple</groupId>
31       <artifactId>jopt-simple</artifactId>
32       <version>5.0.3</version>
33     </dependency>
34     <dependency>
35       <groupId>org.opendaylight.aaa</groupId>
36       <artifactId>aaa-h2-store</artifactId>
37       <exclusions>
38         <exclusion>
39           <!-- Completely disable transitive dependencies -->
40           <groupId>*</groupId>
41           <artifactId>*</artifactId>
42         </exclusion>
43       </exclusions>
44     </dependency>
45     <!-- Now repeat the few really needed dependencies which we would normally get transitively -->
46     <dependency>
47       <groupId>org.opendaylight.aaa</groupId>
48       <artifactId>aaa-authn-api</artifactId>
49     </dependency>
50     <!-- Note that com.h2database:h2 is already shaded into aaa-h2-store -->
51
52     <!-- Now for the FAT JAR we need to fix up some <scope>provided to be <scope>compile -->
53     <dependency>
54       <groupId>org.slf4j</groupId>
55       <artifactId>slf4j-api</artifactId>
56       <scope>compile</scope> <!-- Not provided -->
57     </dependency>
58     <dependency>
59       <groupId>org.slf4j</groupId>
60       <artifactId>slf4j-simple</artifactId>
61       <scope>compile</scope> <!-- Not test -->
62     </dependency>
63
64     <!-- Testing Dependencies -->
65     <dependency>
66       <groupId>junit</groupId>
67       <artifactId>junit</artifactId>
68     </dependency>
69     <dependency>
70       <groupId>com.google.truth</groupId>
71       <artifactId>truth</artifactId>
72     </dependency>
73     <dependency>
74       <groupId>org.mockito</groupId>
75       <artifactId>mockito-core</artifactId>
76     </dependency>
77     <dependency>
78       <groupId>org.opendaylight.yangtools</groupId>
79       <artifactId>testutils</artifactId>
80     </dependency>
81   </dependencies>
82
83   <build>
84     <plugins>
85       <plugin>
86         <artifactId>maven-failsafe-plugin</artifactId>
87         <!-- TODO Remove when https://git.opendaylight.org/gerrit/#/c/48400/ is merged -->
88         <executions>
89           <execution>
90             <id>integration-test</id>
91             <goals>
92               <goal>integration-test</goal>
93             </goals>
94           </execution>
95           <execution>
96             <id>verify</id>
97             <goals>
98               <goal>verify</goal>
99             </goals>
100           </execution>
101         </executions>
102       </plugin>
103       <plugin>
104         <groupId>org.apache.maven.plugins</groupId>
105         <artifactId>maven-shade-plugin</artifactId>
106         <executions>
107           <execution>
108             <id>shade</id>
109             <phase>package</phase>
110             <goals>
111               <goal>shade</goal>
112             </goals>
113             <configuration>
114               <createDependencyReducedPom>false</createDependencyReducedPom>
115               <minimizeJar>true</minimizeJar>
116               <filters>
117                 <filter>
118                   <artifact>org.opendaylight.aaa:aaa-h2-store</artifact>
119                   <includes>
120                     <include>org/opendaylight/**</include>
121                     <include>org/h2/Driver.class</include>
122                     <include>org/h2/upgrade/**</include>
123                     <include>org/h2/util/**</include>
124                     <include>org/h2/jdbc/**</include>
125                     <include>org/h2/message/**</include>
126                     <include>org/h2/value/**</include>
127                     <include>org/h2/engine/**</include>
128                     <include>org/h2/command/**</include>
129                     <include>org/h2/security/**</include>
130                     <include>org/h2/store/**</include>
131                     <include>org/h2/compress/**</include>
132                     <include>org/h2/schema/**</include>
133                     <include>org/h2/result/**</include>
134                     <include>org/h2/api/**</include>
135                     <include>org/h2/mvstore/**</include>
136                     <include>org/h2/table/**</include>
137                     <include>org/h2/expression/**</include>
138                     <include>org/h2/index/**</include>
139                     <include>org/h2/constraint/**</include>
140                   </includes>
141                 </filter>
142               </filters>
143               <transformers>
144                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
145                   <mainClass>org.opendaylight.aaa.cli.jar.Main</mainClass>
146                 </transformer>
147               </transformers>
148             </configuration>
149           </execution>
150         </executions>
151       </plugin>
152       <plugin>
153         <groupId>org.apache.maven.plugins</groupId>
154         <artifactId>maven-checkstyle-plugin</artifactId>
155         <configuration>
156           <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
157         </configuration>
158       </plugin>
159 <!-- TODO
160       <plugin>
161         <groupId>org.codehaus.mojo</groupId>
162         <artifactId>findbugs-maven-plugin</artifactId>
163         <configuration>
164           <failOnError>true</failOnError>
165         </configuration>
166       </plugin>
167   -->
168     </plugins>
169   </build>
170
171 </project>