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

    <groupId>com.aspectran</groupId>
    <artifactId>aspectran-parent</artifactId>
    <version>5.0.0.RC1</version>
    <packaging>pom</packaging>

    <name>Aspectran Parent</name>
    <url>http://www.aspectran.com/</url>
    <description>
        Aspectran is a Java framework for building Web and command-line applications.
    </description>

    <organization>
        <name>The Aspectran Project</name>
        <url>http://www.aspectran.com/</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <inceptionYear>2008</inceptionYear>

    <developers>
        <developer>
            <name>Juho Jeong</name>
            <email>aspectran@gmail.com</email>
            <url>http://www.aspectran.com/</url>
            <organization>The Aspectran Project</organization>
            <organizationUrl>http://www.aspectran.com/</organizationUrl>
            <roles>
                <role>Owner</role>
                <role>Founder</role>
                <role>Committer</role>
            </roles>
            <timezone>+9</timezone>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/aspectran/aspectran</url>
        <connection>scm:git:git://github.com/aspectran/aspectran.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/aspectran/aspectran.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>GitHub Issue Management</system>
        <url>https://github.com/aspectran/aspectran/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/aspectran/aspectran</url>
    </ciManagement>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <modules>
        <module>all</module>
        <module>core</module>
        <module>embed</module>
        <module>shell</module>
        <module>shell-jline</module>
        <module>web</module>
        <module>with-jetty</module>
        <module>demo</module>
    </modules>

    <properties>
        <main.basedir>${project.basedir}</main.basedir>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.testTarget>1.8</maven.compiler.testTarget>
        <maven.compiler.testSource>1.8</maven.compiler.testSource>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- plugins configuration -->
        <findbugs.onlyAnalyze>com.aspectran.*</findbugs.onlyAnalyze>
        <javadoc.title>${project.name} API Reference (${project.version})</javadoc.title>
        <javadoc.locale>en_US</javadoc.locale>

        <!-- Animal Sniffer Signature -->
        <signature.group>org.codehaus.mojo.signature</signature.group>
        <signature.artifact>java18</signature.artifact>
        <signature.version>1.0</signature.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>aspectran-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>aspectran-shell</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>aspectran-embed</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>aspectran-web</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>3.22.0-GA</version>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>3.2.5</version>
            </dependency>
            <dependency>
                <groupId>org.jline</groupId>
                <artifactId>jline</artifactId>
                <version>3.5.1</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>4.5.0</version>
            </dependency>
            <dependency>
                <groupId>org.quartz-scheduler</groupId>
                <artifactId>quartz</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>commons-fileupload</groupId>
                <artifactId>commons-fileupload</artifactId>
                <version>1.3.3</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>2.3.23</version>
            </dependency>
            <dependency>
                <groupId>com.mitchellbosecke</groupId>
                <artifactId>pebble</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.2.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>3.0.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <header>${main.basedir}/header-template.txt</header>
                        <failIfMissing>true</failIfMissing>
                        <aggregate>true</aggregate>
                        <strictCheck>true</strictCheck>
                        <properties>
                            <copyright-range>${project.inceptionYear}-2017</copyright-range>
                        </properties>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <excludes>
                            <exclude>core/src/main/java/com/aspectran/core/util/logging/**</exclude>
                            <exclude>core/src/main/java/com/aspectran/core/util/statistic/**</exclude>
                            <exclude>core/src/main/java/com/aspectran/core/util/xml/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>

                <!-- Antrun here only to override eclipse settings -->
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>

                <!-- Assembly here only to override eclipse settings -->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <compilerVersion>1.8</compilerVersion>
                        <fork>true</fork>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <debug>true</debug>
                        <optimize>true</optimize>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <compilerArgument>-Xlint:-options</compilerArgument>
                        <meminitial>256m</meminitial>
                        <maxmem>1024m</maxmem>
                        <excludes>
                            <exclude>**/package-info.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                            </manifestEntries>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            <index>true</index>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <doctitle>${javadoc.title}</doctitle>
                        <windowtitle>${javadoc.title}</windowtitle>
                        <locale>${javadoc.locale}</locale>
                        <detectJavaApiLink>false</detectJavaApiLink>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>4.3.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.6</version>
                </plugin>

                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                    <configuration>
                        <deployAtEnd>true</deployAtEnd>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20.1</version>
                    <configuration>
                        <includes>
                            <include>**/*Test*.java</include>
                            <include>**/*Benchmark*.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/Abstract*</exclude>
                            <exclude>**/*TestUtil*</exclude>
                        </excludes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.9</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M1</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <!-- Enforce JDK 1.8+ for compilation. -->
                                    <version>[1.8,)</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[3.2.5,)</version>
                                </requireMavenVersion>
                                <requirePluginVersions>
                                    <message>[ERROR] Best Practice is to always define plugin versions!</message>
                                    <banLatest>true</banLatest>
                                    <banRelease>true</banRelease>
                                    <banSnapshots>true</banSnapshots>
                                    <phases>clean,deploy,site</phases>
                                </requirePluginVersions>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Make sure we only use Java8 methods -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
                <version>1.16</version>
                <configuration>
                    <signature>
                        <groupId>${signature.group}</groupId>
                        <artifactId>${signature.artifact}</artifactId>
                        <version>${signature.version}</version>
                    </signature>
                </configuration>
                <executions>
                    <execution>
                        <id>check-java-1.8-compat</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Always produce osgi bundles -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                        <configuration>
                            <excludeDependencies>true</excludeDependencies>
                            <manifestLocation>${project.build.outputDirectory}/META-INF</manifestLocation>
                            <supportedProjectTypes>
                                <supportedProjectType>jar</supportedProjectType>
                                <supportedProjectType>bundle</supportedProjectType>
                            </supportedProjectTypes>
                            <instructions>
                                <Export-Package>${project.groupId}.*;version=${project.version};-noimport:=true</Export-Package>
                                <Import-Package>*;resolution:=optional</Import-Package>
                                <Private-Package>!*</Private-Package>
                            </instructions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>license</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>compile</phase>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>