<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>com.buschmais.jqassistant</groupId>
        <artifactId>jqa-uber-parent</artifactId>
        <version>1.2.0</version>
    </parent>

    <artifactId>commandline</artifactId>
    <version>1.2.0</version>

    <name>jQAssistant Commandline Tool</name>
    <url>http://jqassistant.org/</url>

    <description>
        jQAssistant Commandline distribution to run jQAssistant
        as standalone tool.
    </description>

    <organization>
        <name>buschmais GbR</name>
        <url>http://www.buschmais.com</url>
    </organization>

    <licenses>
        <license>
            <name>GNU General Public License, v3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:buschmais/jqa-commandline-tool.git</connection>
        <developerConnection>scm:git:git@github.com:buschmais/jqa-commandline-tool.git</developerConnection>
        <url>https://github.com/buschmais/jqa-commandline-tool</url>
      <tag>1.2.0</tag>
  </scm>

    <properties>
        <jqa-asciidoc-utilities.version>1.2.0</jqa-asciidoc-utilities.version>
        <jqa-distribution-spec.version>1.2.0</jqa-distribution-spec.version>
        <jqa.own-constraints.version>1.2.0</jqa.own-constraints.version>
        <test.distribution>${project.build.directory}/distribution/</test.distribution>
        <test.jqassistant.home>${test.distribution}</test.jqassistant.home>
        <org.hamcrest_version>2.0.0.0</org.hamcrest_version>
    </properties>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <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>
                        <quiet>true</quiet>
                        <detectLinks>false</detectLinks>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <additionalparam>-Xdoclint:none</additionalparam>

                        <source>1.7</source>
                        <doclet>org.asciidoctor.Asciidoclet</doclet>
                        <docletArtifact>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoclet</artifactId>
                            <version>1.5.4</version>
                        </docletArtifact>
                        <!--<overview>src/main/java/overview.adoc</overview>-->
                        <additionalparam>
                            --base-dir ${project.basedir}
                        </additionalparam>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>jqassistant-maven-plugin</artifactId>
                <configuration>
                    <scanIncludes>
                        <scanInclude>
                            <path>${project.basedir}</path>
                        </scanInclude>
                    </scanIncludes>
                    <groups>
                        <!--
                         ! See https://github.com/buschmais/jqa-commandline-tool/issues/1
                         ! for details.
                         ! <group>jqa-legal</group>
                         !-->
                        <!--<group>jqa-legal</group>-->
                        <group>jqa-maven-constraints</group>
                        <group>jqa-project-layout</group>
                    </groups>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>legal-constraints</artifactId>
                        <version>${jqa.own-constraints.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>maven-commmon-constraints</artifactId>
                        <version>${jqa.own-constraints.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>project-layout-constraints</artifactId>
                        <version>${jqa.own-constraints.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathLayoutType>custom</classpathLayoutType>
                            <customClasspathLayout>$${artifact.groupId}-$${artifact.artifactId}-$${artifact.version}.$${artifact.extension}</customClasspathLayout>
                            <mainClass>com.buschmais.jqassistant.commandline.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <finalName>jqassistant-commandline-${project.version}</finalName>
                            <descriptor>src/main/assembly/distribution.xml</descriptor>
                        </configuration>
                    </execution>

                    <execution>
                        <id>attach-asciidoc</id>
                        <!--
                         ! Builds an assembly with all artifacts required to include
                         ! the documentation of the command line tool in
                         ! the user manual
                         !-->
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>asciidoc</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                    </execution>

                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>asciidoctor-utilities</artifactId>
                        <version>${jqa-asciidoc-utilities.version}</version>
                    </dependency>
                </dependencies>

            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-test-distribution</id>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <phase>pre-integration-test</phase>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${project.version}</version>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${test.distribution}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <environmentVariables>
                        <JQASSISTANT_HOME>${test.jqassistant.home}</JQASSISTANT_HOME>
                    </environmentVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>jqa-distribution-specification</artifactId>
                <version>${jqa-distribution-spec.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>analysis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>scanner</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>store</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>report</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>shared</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>splittingsupport</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>neo4jserver</artifactId>
        </dependency>

        <!-- List here all plugins of jQAssistant which should be
         !   a part of the command line distribution
         !-->

        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>yaml</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>xml</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>common</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>java</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>java8</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>javaee6</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>jpa2</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>cdi</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>ejb3</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>graphml</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>jaxrs</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>junit</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>testng</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>m2repo</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>maven3</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>osgi</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>tycho</artifactId>
			<scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>rdbms</artifactId>
			<scope>provided</scope>
        </dependency>

		<!-- 3rd party dependencies -->
		
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.0</version>
        </dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>18.0</version>
		</dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
			<scope>runtime</scope>
            <version>1.7.13</version>
        </dependency>
		
		<!-- Test frameworks -->
		
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
			<scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <version>${org.hamcrest_version}</version>
			<scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
			<scope>test</scope>
        </dependency>
    </dependencies>


    <repositories>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>
</project>
