Add JAX-RS and Spring filters for setting up MDC
[logging-analytics.git] / reference / logging-filter / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3         <modelVersion>4.0.0</modelVersion>
4         
5         <parent>
6       <groupId>org.onap.logging-analytics</groupId>
7       <artifactId>logging-reference</artifactId>
8       <version>1.5.0-SNAPSHOT</version>
9         </parent>
10         <artifactId>logging-filter-parent</artifactId>
11         <packaging>pom</packaging>
12
13         <modules>
14                 <module>logging-filter-base</module>
15                 <module>logging-filter-spring</module>
16         </modules>
17         
18         <properties>
19                 <format.skipValidate>false</format.skipValidate>
20         <format.skipExecute>true</format.skipExecute>
21         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22         </properties>
23
24         <dependencyManagement>
25                 <dependencies>
26                         <dependency>
27                                 <groupId>javax.annotation</groupId>
28                                 <artifactId> javax.annotation-api</artifactId>
29                                 <version>1.2</version>
30                                 <scope>provided</scope>
31                         </dependency>
32                         <dependency>
33                                 <groupId>org.onap.logging-analytics</groupId>
34                                 <artifactId>logging-slf4j</artifactId>
35                                 <version>1.5.0-SNAPSHOT</version>
36                         </dependency>
37                         <dependency>
38                                 <groupId>javax.servlet</groupId>
39                                 <artifactId>javax.servlet-api</artifactId>
40                                 <version>3.1.0</version>
41                                 <scope>provided</scope>
42                         </dependency>
43                         <dependency>
44                                 <groupId>javax.ws.rs</groupId>
45                                 <artifactId>javax.ws.rs-api</artifactId>
46                                 <version>2.0.1</version>
47                                 <scope>provided</scope>
48                         </dependency>
49                         <dependency>
50                                 <groupId>org.slf4j</groupId>
51                                 <artifactId>slf4j-api</artifactId>
52                                 <version>1.7.25</version>
53                                 <scope>provided</scope>
54                         </dependency>
55                         <dependency>
56                                 <groupId>org.apache.logging.log4j</groupId>
57                                 <artifactId>log4j-slf4j-impl</artifactId>
58                                 <version>2.11.2</version>
59                                 <scope>test</scope>
60                         </dependency>
61                         <dependency>
62                                 <groupId>junit</groupId>
63                                 <artifactId>junit</artifactId>
64                                 <version>4.11</version>
65                                 <scope>test</scope>
66                         </dependency>
67                         <dependency>
68                         <groupId>org.mockito</groupId>
69                         <artifactId>mockito-core</artifactId>
70                         <version>2.15.0</version>
71                         <scope>test</scope>
72                 </dependency>
73                 </dependencies>
74         </dependencyManagement>
75
76         <build>
77                 <plugins>
78                         <plugin>
79                                 <artifactId>maven-compiler-plugin</artifactId>
80                                 <version>2.5.1</version>
81                                 <executions>
82                                         <execution>
83                                                 <id>default-compile</id>
84                                                 <phase>compile</phase>
85                                                 <goals>
86                                                         <goal>compile</goal>
87                                                 </goals>
88                                                 <configuration>
89                                                         <source>1.8</source>
90                                                         <target>1.8</target>
91                                                         <showWarnings>true</showWarnings>
92                                                         <compilerArgs>
93                                                                 <arg>-parameters</arg>
94                                                                 <arg>-Xlint:deprecation</arg>
95                                                         </compilerArgs>
96                                                 </configuration>
97                                         </execution>
98                                         <execution>
99                                                 <id>default-testCompile</id>
100                                                 <phase>test-compile</phase>
101                                                 <goals>
102                                                         <goal>testCompile</goal>
103                                                 </goals>
104                                                 <configuration>
105                                                         <source>1.8</source>
106                                                         <target>1.8</target>
107                                                         <showWarnings>true</showWarnings>
108                                                         <compilerArgs>
109                                                                 <arg>-parameters</arg>
110                                                                 <arg>-Xlint:deprecation</arg>
111                                                         </compilerArgs>
112                                                 </configuration>
113                                         </execution>
114                                 </executions>
115                                 <configuration>
116                                         <source>1.8</source>
117                                         <target>1.8</target>
118                                         <showWarnings>true</showWarnings>
119                                         <compilerArgs>
120                                                 <arg>-parameters</arg>
121                                                 <arg>-Xlint:deprecation</arg>
122                                         </compilerArgs>
123                                 </configuration>
124                         </plugin>
125                         <plugin>
126                         <groupId>org.codehaus.gmaven</groupId>
127                         <artifactId>groovy-maven-plugin</artifactId>
128                         <version>2.0</version>
129                         <executions>
130                           <!-- set absolute base path from super pom -->
131                           <execution>
132                             <id>find-basepath</id>
133                             <phase>validate</phase>
134                             <goals>
135                               <goal>execute</goal>
136                             </goals>
137                             <configuration>
138                               <source>
139                                 <![CDATA[
140                                     import java.io.File;
141                                     log.info('## define projects super pom absolute path through basepath_marker')
142                                     String p = "basepath_marker";
143                                     File f = null;
144                                     if( p != null ) {
145                                         def _max_child_poms = 0
146                                         while( _max_child_poms++ < 5 ) {
147                                             f = new File( p );
148                                             if( f.exists() ) {
149                                                 break;
150                                             }   
151                                             p = "../" + p;
152                                         }
153                                     }
154                                     if( f != null ) {
155                                         String basePath = f.getCanonicalPath();
156                                         basePath = basePath.substring( 0, basePath.lastIndexOf( File.separator ) ); 
157                                         project.properties['base-path'] = basePath.replace( '\\' , '/');
158                                         log.info(' - used base path = ' + project.properties['base-path'] );
159                                     } else {
160                                         log.error( 'Could not find basepath_marker marker file!' );
161                                         System.stop( 0 );
162                                     }
163                                 ]]>
164                               </source>
165                             </configuration>
166                           </execution>
167                         </executions>
168                       </plugin>
169                       <plugin>
170                         <groupId>net.revelc.code.formatter</groupId>
171                         <artifactId>formatter-maven-plugin</artifactId>
172                         <version>2.9.0</version>
173                         <executions>
174                           <execution>
175                             <id>format-java</id>
176                             <goals>
177                               <goal>format</goal>
178                             </goals>
179                             <configuration>
180                               <skip>${format.skipExecute}</skip>
181                               <configFile>${base-path}/project-configs/code-tools/onap-eclipse-format.xml</configFile>
182                             </configuration>
183                           </execution>
184                           <execution>
185                             <id>format-xml</id>
186                             <goals>
187                               <goal>format</goal>
188                             </goals>
189                             <configuration>
190                               <skip>${format.skipExecute}</skip>
191                               <sourceDirectory>${project.basedir}</sourceDirectory>
192                               <configXmlFile>${base-path}/project-configs/code-tools/pom-format.properties</configXmlFile>
193                               <includes>
194                                 <include>${project.basedir}/pom.xml</include>
195                               </includes>
196                             </configuration>
197                           </execution>
198                           <execution>
199                             <id>validate-java</id>
200                             <goals>
201                               <goal>validate</goal>
202                             </goals>
203                             <configuration>
204                               <skip>${format.skipValidate}</skip>
205                               <configFile>${base-path}/project-configs/code-tools/onap-eclipse-format.xml</configFile>
206                             </configuration>
207                           </execution>
208                           <execution>
209                             <id>validate-poms</id>
210                             <goals>
211                               <goal>validate</goal>
212                             </goals>
213                             <configuration>
214                               <skip>${format.skipValidate}</skip>
215                               <configFile>${base-path}/project-configs/code-tools/pom-format.properties</configFile>
216                                <includes>
217                                 <include>${project.basedir}/pom.xml</include>
218                               </includes>
219                             </configuration>
220                           </execution>
221                         </executions>
222                         <dependencies>
223                           <dependency>
224                             <groupId>com.fasterxml.jackson.core</groupId>
225                             <artifactId>jackson-annotations</artifactId>
226                             <version>2.9.8</version>
227                           </dependency>
228                         </dependencies>
229                 </plugin>
230                 </plugins>
231         </build>
232         <profiles>
233                 <profile>
234               <id>format</id>
235               <properties>
236                 <format.skipValidate>true</format.skipValidate>
237                 <format.skipExecute>false</format.skipExecute>
238               </properties>
239             </profile>
240         </profiles>
241 </project>