<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>net.sourceforge.dynamicreports</groupId>
        <artifactId>dynamicreports-parent</artifactId>
        <version>6.12.1</version>
    </parent>

    <artifactId>dynamicreports-googlecharts</artifactId>
    <packaging>jar</packaging>

    <name>DynamicReports - googlecharts</name>
    <url>https://github.com/dynamicreports</url>
    <description>DynamicReports google charts</description>

    <dependencies>
        <dependency>
            <groupId>net.sourceforge.dynamicreports</groupId>
            <artifactId>dynamicreports-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${sourceVersion}</source>
                    <target>${targetVersion}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <!--Check for use of legacy code-->
            <plugin>
                <groupId>org.gaul</groupId>
                <artifactId>modernizer-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <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>
                    <sourceDirectories>
                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                    </sourceDirectories>
                    <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <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>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <failOnError>false</failOnError>
                    <!--// TODO Use javadoc from JAVA 10 to create searcheable javadocs-->
                    <!--<javadocExecutable>${env.JAVA_10_HOME}\bin\javadoc.exe</javadocExecutable>-->
                    <sourceFileExcludes>
                        <sourceFileExclude>${project.basedir}/dynamicreports-core/target</sourceFileExclude>
                    </sourceFileExcludes>
                </configuration>
            </plugin>
            <!--//TODO fix "commandline was too long error"-->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jdeps-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            &lt;!&ndash;<goal>jdkinternals</goal>&ndash;&gt; &lt;!&ndash; verify main classes &ndash;&gt;
                            <goal>test-jdkinternals</goal> &lt;!&ndash; verify test classes &ndash;&gt;
                        </goals>
                    </execution>
                </executions>
            </plugin>-->
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>license</id>
            <activation>
                <property>
                    <name>profile</name>
                    <value>license</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>${license-maven-plugin-version}</version>
                        <configuration>
                            <header>../src/etc/license_header.txt</header>
                            <headerDefinitions>../src/etc/header_definition.xml</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>checkstyle</id>
            <activation>
                <!--Activate automagically when source profile is online-->
                <property>
                    <name>profile</name>
                    <value>checkstyle</value>
                </property>
            </activation>
            <!--Attach to validations during build-->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <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>
            </build>
        </profile>

        <profile>
            <id>java9</id>
            <!--Please remember to run this after running compile in core module-->
            <activation>
                <!--Activate if java9 is activated on the parent pom-->
                <property>
                    <name>profile</name>
                    <value>java9</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!--We have to upgrade for jaxb api to work in java9-->
                    <plugin>
                        <groupId>org.jvnet.jaxb2.maven2</groupId>
                        <artifactId>maven-jaxb23-plugin</artifactId>
                        <version>0.14.0</version>
                        <configuration>
                            <schemaIncludes>
                                <schemaInclude>**/dynamicreports.xsd</schemaInclude>
                            </schemaIncludes>
                            <bindingIncludes>
                                <bindingInclude>**/dynamicreports.xjb</bindingInclude>
                            </bindingIncludes>
                            <removeOldOutput>true</removeOldOutput>
                        </configuration>
                        <executions>
                            <execution>
                                <id>jaxb</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--Disable this version in java9-->
                    <plugin>
                        <groupId>org.jvnet.jaxb2.maven2</groupId>
                        <artifactId>maven-jaxb2-plugin</artifactId>
                        <version>0.13.1</version>
                        <configuration>
                            <schemaIncludes>
                                <schemaInclude>**/dynamicreports.xsd</schemaInclude>
                            </schemaIncludes>
                            <bindingIncludes>
                                <bindingInclude>**/dynamicreports.xjb</bindingInclude>
                            </bindingIncludes>
                            <removeOldOutput>true</removeOldOutput>
                        </configuration>
                        <executions>
                            <execution>
                                <id>jaxb</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>add-source</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>${basedir}/target/generated-sources/xjc</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <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>
                </plugins>
            </build>
            <dependencies>
                <!-- 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>
    </profiles>

</project>
