<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>modelmapper-parent</artifactId>
    <groupId>org.modelmapper</groupId>
    <version>0.7.7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>modelmapper</artifactId>
  <name>ModelMapper</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <filters>
            <filter>
              <artifact>cglib:cglib</artifact>
              <includes>
                <include>net/sf/cglib/core/**</include>
                <include>net/sf/cglib/proxy/**</include>
                <include>net/sf/cglib/reflect/**</include>
                <include>net/sf/cglib/transform/ClassTransformer.class</include>
              </includes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>net.sf.cglib</pattern>
              <shadedPattern>org.modelmapper.internal.cglib</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.objectweb.asm</pattern>
              <shadedPattern>org.modelmapper.internal.asm</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.objenesis</pattern>
              <shadedPattern>org.modelmapper.internal.objenesis</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/resources/testngAll.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <author>false</author>
          <protected>true</protected>
          <excludePackageNames>*.internal</excludePackageNames>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Export-Package>org.modelmapper,
              org.modelmapper.builder,
              org.modelmapper.config,
              org.modelmapper.convention,
              org.modelmapper.spi</Export-Package>
            <Private-Package>org.modelmapper.internal.**</Private-Package>
            <Import-Package>!net.sf.cglib.*,*</Import-Package>
            <Include-Resource>{maven-resources},
              {maven-dependencies}</Include-Resource>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>replacer</artifactId>
        <version>1.5.2</version>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>replace</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <file>${project.build.outputDirectory}/META-INF/MANIFEST.MF</file>
          <regex>false</regex>
          <replacements>
            <replacement>
              <token>Export-Package: org.modelmapper</token>
              <value>Export-Package: org.modelmapper.internal.cglib.proxy;version=${cglib.version},
                org.modelmapper.internal.cglib.core;version=${cglib.version},
                org.modelmapper.internal.cglib.transform;version=${cglib.version},
                org.modelmapper</value>
            </replacement>
          </replacements>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>javadoc</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
              <author>false</author>
              <protected>true</protected>
              <excludePackageNames>*.internal</excludePackageNames>
              <reportOutputDirectory>../docs</reportOutputDirectory>
              <destDir>javadoc</destDir>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>javassist</groupId>
      <artifactId>javassist</artifactId>
      <version>3.12.1.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.5.8</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.182</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>4.3.7.Final</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>jboss-logging</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-logging-annotations</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hibernate-core</artifactId>
          <groupId>org.hibernate</groupId>
        </exclusion>
        <exclusion>
          <artifactId>dom4j</artifactId>
          <groupId>dom4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hibernate-commons-annotations</artifactId>
          <groupId>org.hibernate.common</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hibernate-jpa-2.1-api</artifactId>
          <groupId>org.hibernate.javax.persistence</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-transaction-api_1.2_spec</artifactId>
          <groupId>org.jboss.spec.javax.transaction</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javassist</artifactId>
          <groupId>org.javassist</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>net.sf.dozer</groupId>
      <artifactId>dozer</artifactId>
      <version>5.3.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-beanutils</artifactId>
          <groupId>commons-beanutils</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-lang</artifactId>
          <groupId>commons-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>ma.glasnost.orika</groupId>
      <artifactId>orika-core</artifactId>
      <version>1.1.6</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>paranamer</artifactId>
          <groupId>com.thoughtworks.paranamer</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-simple</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.9.10</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>jcommander</artifactId>
          <groupId>com.beust</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bsh</artifactId>
          <groupId>org.beanshell</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>${asm.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <objenesis.version>2.1</objenesis.version>
    <asm.version>5.1</asm.version>
    <cglib.version>3.2.4</cglib.version>
  </properties>
</project>

