<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>se.jiderhamn.classloader-leak-prevention</groupId>
    <artifactId>classloader-leak-prevention-parent</artifactId>
    <version>2.6.1</version>
  </parent>

  <artifactId>classloader-leak-prevention-core</artifactId>
  <packaging>jar</packaging>
  <name>ClassLoader Leak Prevention library</name>
  <description>Library that prevents ClassLoader leaks / java.lang.OutOfMemoryError: PermGen space</description>
  <url>https://github.com/mjiderhamn/classloader-leak-prevention</url>
  
  <dependencies>
    <!-- Dependency on test framework -->
    <dependency>
      <groupId>se.jiderhamn</groupId>
      <artifactId>classloader-leak-test-framework</artifactId>
      <version>1.1.1</version>
      <scope>test</scope>
    </dependency>
    <!-- Required by some of the tested APIs --> 
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.3</version>
      <scope>test</scope>
    </dependency>
    <!-- Validation API needed for testing leak -->
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>4.2.0.Final</version>
      <scope>test</scope>
    </dependency>
    <!-- Apache Axis 1.4 for leak test -->
    <dependency>
      <groupId>org.apache.axis</groupId>
      <artifactId>axis</artifactId>
      <version>1.4</version>
      <scope>test</scope>
    </dependency>
    <!-- Required by Axis -->
    <dependency>
      <groupId>commons-discovery</groupId>
      <artifactId>commons-discovery</artifactId>
      <version>0.5</version>
      <scope>test</scope>
    </dependency>
    <!-- JDBC driver for DriverManager test -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.18</version>
      <scope>test</scope>
    </dependency>
    <!-- Test leak in EL implementation cache -->
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>el-api</artifactId>
      <version>2.2.1-b04</version>
      <scope>test</scope>
    </dependency>
    <!-- MultiThreadedHttpConnectionManagerCleanUpTest --> 
    <dependency>
      <groupId>com.sun.jersey.contribs</groupId>
      <artifactId>jersey-apache-client</artifactId>
      <version>1.19</version>
      <scope>test</scope>
    </dependency> 
    
    <!-- Test leak in CXF custom authenticator -->
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
      <version>2.6.10</version>
      <scope>test</scope>
    </dependency>
    <!-- Test that GeoTools leaks are prevented -->
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-metadata</artifactId>
      <version>2.6.2</version>
      <scope>test</scope>
    </dependency>
    <!-- Test leak in JSF api -->
    <dependency>
      <groupId>com.sun.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <version>2.1.19</version>
      <scope>test</scope>
    </dependency>
    <!-- Could be removed if Mockito was used to mock ELContext -->
    <dependency>
      <groupId>com.sun.faces</groupId>
      <artifactId>jsf-impl</artifactId>
      <version>2.1.19</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>9.4-1201-jdbc41</version>
      <scope>test</scope>
    </dependency>
    <!-- Test that MOXy leaks are prevented -->
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.moxy</artifactId>
      <version>2.7.0</version>
      <scope>test</scope>
    </dependency>
    <!-- Test that Jackson leaks are prevented -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.2</version>
      <scope>test</scope>
    </dependency>
    
    <!-- Example dependency for test Oracle JDBC -->
    <!--
    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc</artifactId>
      <version>12.2.0.1</version>
      <scope>test</scope>
    </dependency>
    -->
  </dependencies>

  <!-- Create artifact (jar) with test classes https://maven.apache.org/guides/mini/guide-attached-tests.html -->
  <build>
    <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-jar-plugin</artifactId>
       <version>3.0.2</version>
       <executions>
         <execution>
           <goals>
             <goal>test-jar</goal>
           </goals>
         </execution>
       </executions>
     </plugin>
    </plugins>
  </build>
</project>