<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">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>net.sourceforge.dynamicreports</groupId>
    <artifactId>dynamicreports-parent</artifactId>
    <version>6.0.0</version>
    <packaging>pom</packaging>

    <name>DynamicReports - parent</name>
    <url>http://www.dynamicreports.org</url>
    <description>DynamicReports parent</description>
    <inceptionYear>2010</inceptionYear>
    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/dynamicreports/dynamicreports.git</connection>
        <developerConnection>scm:git:https://github.com/dynamicreports/dynamicreports.git</developerConnection>
        <url>https://github.com/dynamicreports/dynamicreports</url>
    </scm>

    <modules>
        <module>dynamicreports-core</module>
        <module>dynamicreports-adhoc</module>
        <module>dynamicreports-googlecharts</module>
        <module>dynamicreports-examples</module>
    </modules>

    <developers>
        <developer>
            <id>ricardomariaca</id>
            <name>Ricardo Mariaca</name>
            <email>r.mariaca@dynamicreports.org</email>
            <roles>
                <role>Project lead</role>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <!--Environment -->
        <encoding>UTF-8</encoding>
        <sourceVersion>1.8</sourceVersion>
        <targetVersion>1.8</targetVersion>

        <!--Dependencies -->
        <barcode4jVersion>2.0</barcode4jVersion>
        <barbecueVersion>1.5-beta1</barbecueVersion>
        <batikbridgeVersion>1.9</batikbridgeVersion>
        <commonslangVersion>2.6</commonslangVersion>
        <commonslang3Version>3.1</commonslang3Version>
        <groovyVersion>1.7.5</groovyVersion>
        <hsqldbVersion>1.8.0.10</hsqldbVersion>
        <jasperreportsVersion>6.7.0</jasperreportsVersion>
        <jaxb-apiVersion>2.4.0-b180830.0359</jaxb-apiVersion>
        <jaxb-coreVersion>2.3.0.1</jaxb-coreVersion>
        <jaxb-implVersion>2.4.0-b180830.0438</jaxb-implVersion>
        <jaxbVersion>2.3.0.1</jaxbVersion>
        <jsonVersion>20080701</jsonVersion>
        <jul-to-slf4jVersion>1.7.25</jul-to-slf4jVersion>
        <junitVersion>4.12</junitVersion>
        <log4j-to-slf4jVersion>2.10.0</log4j-to-slf4jVersion>
        <logback-classicVersion>1.2.3</logback-classicVersion>
        <poiVersion>3.15</poiVersion>
        <springframeworkVersion>3.2.18.RELEASE</springframeworkVersion>
        <velocityVersion>1.7</velocityVersion>
        <xalanVersion>2.7.2</xalanVersion>
        <xmlgraphicscommonsVersion>2.1</xmlgraphicscommonsVersion>

        <!--Plugins -->
        <jacoco-maven-plugin-version>0.8.1</jacoco-maven-plugin-version>
        <lifecycle-mapping-plugin-version>1.0.0</lifecycle-mapping-plugin-version>
        <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
        <maven-compiler-plugin-version>3.3</maven-compiler-plugin-version>
        <maven-enforcer-plugin-version>3.0.0-M2</maven-enforcer-plugin-version>
        <maven-project-info-reports-plugin>2.9</maven-project-info-reports-plugin>

        <!--Profile Plugins-->
        <license-maven-plugin-version>3.0</license-maven-plugin-version>
        <maven-javadoc-plugin-version>3.0.1</maven-javadoc-plugin-version>
        <maven-source-plugin-version>3.0.1</maven-source-plugin-version>

        <!--Mycila License plugin configuration-->
        <license.header.location>${project.basedir}/src/etc/license_header.txt</license.header.location>
        <license.header.definition>${project.basedir}/src/etc/header_definition.xml</license.header.definition>
        <license.maven.owner>Ricardo Mariaca and the DynamicReports Contributors</license.maven.owner>

        <!-- Properties for maven-checkstyle-plugin -->
        <checkstyle.config.location>${project.basedir}/src/etc/checkstyle.xml</checkstyle.config.location>
        <checkstyle.config.headerLocation>${license.header.location}</checkstyle.config.headerLocation>
        <checkstyle.config.maxAllowedViolations>40</checkstyle.config.maxAllowedViolations>
        <checkstyle.config.consoleOutput>true</checkstyle.config.consoleOutput>
        <checkstyle.config.failsOnError>true</checkstyle.config.failsOnError>
        <checkstyle.config.includeResources>false</checkstyle.config.includeResources>
        <checkstyle.config.includeTestResources>false</checkstyle.config.includeTestResources>
        <checkstyle.config.includeTestResources>false</checkstyle.config.includeTestResources>
        <checkstyle.config.includeTestSourceDirectory>false</checkstyle.config.includeTestSourceDirectory>
        <linkXRef>false</linkXRef>

    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.sf.jasperreports</groupId>
                <artifactId>jasperreports</artifactId>
                <version>${jasperreportsVersion}</version>
                <exclusions>
                    <exclusion>
                        <groupId>bouncycastle</groupId>
                        <artifactId>bcmail-jdk14</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>bouncycastle</groupId>
                        <artifactId>bctsp-jdk14</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-analyzers-common</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.lucene</groupId>
                        <artifactId>lucene-queryparser</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.olap4j</groupId>
                        <artifactId>olap4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.codehaus.castor</groupId>
                        <artifactId>castor-xml</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>icu4j</artifactId>
                        <groupId>com.ibm.icu</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${commonslangVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commonslang3Version}</version>
            </dependency>
            <dependency>
                <groupId>net.sf.barcode4j</groupId>
                <artifactId>barcode4j</artifactId>
                <version>${barcode4jVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.barbecue</groupId>
                <artifactId>barbecue</artifactId>
                <version>${barbecueVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.xmlgraphics</groupId>
                <artifactId>batik-bridge</artifactId>
                <version>${batikbridgeVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
                <exclusions>
                    <exclusion>
                        <groupId>xalan</groupId>
                        <artifactId>xalan</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.xmlgraphics</groupId>
                <artifactId>xmlgraphics-commons</artifactId>
                <version>${xmlgraphicscommonsVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-io</artifactId>
                        <groupId>commons-io</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${springframeworkVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${springframeworkVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>${poiVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>${hsqldbVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>xalan</groupId>
                <artifactId>xalan</artifactId>
                <version>${xalanVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovyVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>${velocityVersion}</version>
                <scope>runtime</scope>
                <optional>true</optional>
                <exclusions>
                    <exclusion>
                        <groupId>commons-collections</groupId>
                        <artifactId>commons-collections</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>${jsonVersion}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junitVersion}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback-classicVersion}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-to-slf4j</artifactId>
                <version>${log4j-to-slf4jVersion}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${jul-to-slf4jVersion}</version>
                <scope>compile</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin-version}</version>
                    <configuration>
                        <source>${sourceVersion}</source>
                        <target>${targetVersion}</target>
                        <encoding>${encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin-version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>distribution</id>
            <modules>
                <module>dynamicreports-distribution</module>
            </modules>
        </profile>

        <profile>
            <id>license</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>${license-maven-plugin-version}</version>
                        <configuration>
                            <header>${license.header.location}</header>
                            <headerDefinitions>${license.header.definition}</headerDefinitions>
                            <properties>
                                <owner>${license.maven.owner}</owner>
                            </properties>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>java9</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>${maven-compiler-plugin-version}</version>
                            <configuration>
                                <source>1.8</source>
                                <target>1.8</target>
                                <encoding>${encoding}</encoding>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <nosince>false</nosince>
                            <failOnError>false</failOnError>
                            <doclint>none</doclint>
                            <defaultVersion>${project.version}</defaultVersion>
                            <defaultSince>${project.version}</defaultSince>
                            <javadocExecutable>${env.JAVA_10_HOME}\bin\javadoc.exe</javadocExecutable>
                        </configuration>
                    </plugin>
                    <!--To ensure consistent API for java 9 usage-->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-maven-plugin</artifactId>
                        <version>1.16</version>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <signature>
                                        <groupId>org.codehaus.mojo.signature</groupId>
                                        <!--We are "trying" to be jre 8 compatible-->
                                        <artifactId>java18</artifactId>
                                        <version>1.0</version>
                                    </signature>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.16</version>
                    <optional>true</optional>
                    <scope>provided</scope>
                </dependency>
                <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                    <version>${jaxb-apiVersion}</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-core -->
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-core</artifactId>
                    <version>${jaxb-coreVersion}</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-core -->
                <dependency>
                    <groupId>org.glassfish.jaxb</groupId>
                    <artifactId>jaxb-core</artifactId>
                    <version>${jaxb-coreVersion}</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                    <version>${jaxb-implVersion}</version>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>source</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <nosince>false</nosince>
                            <defaultVersion>${project.version}</defaultVersion>
                            <defaultSince>${project.version}</defaultSince>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>checkstyle</id>
            <activation>
                <!--Activate automagically when source profile is online-->
                <property>
                    <name>profile</name>
                    <value>source</value>
                </property>
            </activation>
            <!--Attach to validations during build-->
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-checkstyle-plugin</artifactId>
                            <version>${maven-checkstyle-plugin.version}</version>
                            <executions>
                                <execution>
                                    <!--Could run with mvn clean verify-->
                                    <id>validate</id>
                                    <phase>validate</phase>
                                    <configuration>
                                        <encoding>UTF-8</encoding>
                                    </configuration>
                                    <goals>
                                        <goal>check</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>run-checkstyle</id>
                                    <phase>process-sources</phase>
                                    <goals>
                                        <goal>checkstyle</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <excludes>module-info.java</excludes>
                                <headerLocation>../src/etc/checkstyle.xml</headerLocation>
                                <maxAllowedViolations>${checkstyle.config.maxAllowedViolations}</maxAllowedViolations>
                                <configLocation>../src/etc/checkstyle.xml</configLocation>
                                <consoleOutput>${checkstyle.config.consoleOutput}</consoleOutput>
                                <failsOnError>${checkstyle.config.failsOnError}</failsOnError>
                                <includeResources>${checkstyle.config.includeResources}</includeResources>
                                <includeTestResources>${checkstyle.config.includeTestResources}</includeTestResources>
                                <includeTestSourceDirectory>${checkstyle.config.includeTestSourceDirectory}</includeTestSourceDirectory>
                                <linkXRef>${linkXRef}</linkXRef>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <!-- Setup Checkstyle, excluding module-info -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>${maven-checkstyle-plugin.version}</version>
                        <executions>
                            <execution>
                                <!--Could run with mvn clean verify-->
                                <id>validate</id>
                                <phase>validate</phase>
                                <configuration>
                                    <encoding>UTF-8</encoding>
                                </configuration>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>run-checkstyle</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>checkstyle</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludes>module-info.java</excludes>
                            <headerLocation>${checkstyle.config.headerLocation}</headerLocation>
                            <maxAllowedViolations>${checkstyle.config.maxAllowedViolations}</maxAllowedViolations>
                            <configLocation>${checkstyle.config.location}</configLocation>
                            <consoleOutput>${checkstyle.config.consoleOutput}</consoleOutput>
                            <failsOnError>${checkstyle.config.failsOnError}</failsOnError>
                            <includeResources>${checkstyle.config.includeResources}</includeResources>
                            <includeTestResources>${checkstyle.config.includeTestResources}</includeTestResources>
                            <includeTestSourceDirectory>${checkstyle.config.includeTestSourceDirectory}</includeTestSourceDirectory>
                            <linkXRef>${linkXRef}</linkXRef>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>scripts</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.6.0</version>
                        <executions>
                            <execution><!-- Run our install-ms-fonts.sh script -->
                                <id>scripts</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>bash</executable>
                                    <commandlineArgs>src/scripts/compile-scripts.sh</commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin -->
                            <dependency>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>exec-maven-plugin</artifactId>
                                <version>1.6.0</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

    <repositories>
        <!--Repository containing com.lowagie:itext:jar:2.1.7.js6, not available in maven central -->
        <repository>
            <id>jaspersoft-third-party</id>
            <url>
                http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/
            </url>
        </repository>
        <repository>
            <id>jr-ce-releases</id>
            <name>JasperReports CE Releases</name>
            <url>
                http://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases
            </url>
        </repository>
    </repositories>
</project>
