<?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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.metaeffekt.artifact.analysis</groupId>
    <artifactId>ae-artifact-analysis-pom</artifactId>
	<version>0.61.2</version>
	<packaging>pom</packaging>

    <name>ae-artifact-analysis</name>
    <description>Support for artifact analysis</description>
    <url>https://metaeffekt.com</url>

    <organization>
        <name>metaeffekt GmbH</name>
        <url>http://metaeffekt.com</url>
    </organization>

    <licenses>
        <license>
            <name>metaeffekt Commerical Component License 1.1</name>
            <url>file://ae-artifact-analysis/src/main/resources/META-INF/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://ae-server:7990/scm/ae/metaeffekt-artifact-analysis.git</connection>
        <developerConnection>scm:git:ssh://ae-server:7990/scm/ae/metaeffekt-artifact-analysis.git</developerConnection>
        <url>http://ae-server:7990/projects/AE/repos/metaeffekt-artifact-analysis/browse</url>
    </scm>

    <developers>
        <developer>
            <email>contact@metaeffekt.com</email>
            <organization>metaeffekt GmbH</organization>
            <organizationUrl>http://metaeffekt.com</organizationUrl>
        </developer>
    </developers>
	
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <ae.core.version>0.84.0</ae.core.version>
        <ae.artifact.analysis.version>0.61.2</ae.artifact.analysis.version>

        <artifact.inventory.version>${ae.core.version}</artifact.inventory.version>
        <artifact.inventory.enabled>false</artifact.inventory.enabled>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.jdk>1.8</maven.compiler.jdk>

        <organization>metaeffekt.com</organization>

        <license.identifier>metaeffekt Commercial Component License 1.1</license.identifier>
        <license.file>/META-INF/LICENSE</license.file>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <archive>
                            <index>false</index>
                            <addMavenDescriptor>false</addMavenDescriptor>
                            <manifestEntries>
                                <Created-By>${organization}</Created-By>
                                <Built-By>${organization}</Built-By>
                            </manifestEntries>
                            <manifestSections>
                                <manifestSection>
                                    <name>License Information</name>
                                    <manifestEntries>
                                        <License>${license.identifier}</License>
                                        <License-File>${license.file}</License-File>
                                    </manifestEntries>
                                </manifestSection>
                            </manifestSections>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <!-- introduced to manage version -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M5</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <profiles>

        <profile>
            <id>update-versions</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.metaeffekt.core</groupId>
                        <artifactId>ae-version-maven-plugin</artifactId>
                        <version>${ae.core.version}</version>
                        <configuration>
                            <projectVersion>${ae.artifact.analysis.version}</projectVersion>
                            <groupIdVersionMap>
                                <org.metaeffekt.core>${ae.core.version}</org.metaeffekt.core>
                                <com.metaeffekt.artifact.analysis>${ae.artifact.analysis.version}</com.metaeffekt.artifact.analysis>
                            </groupIdVersionMap>
                            <propertyVersionMap>
                                <ae.core.version>${ae.core.version}</ae.core.version>
                                <ae.artifact.analysis.version>${ae.artifact.analysis.version}</ae.artifact.analysis.version>
                                <artifact.inventory.enabled>false</artifact.inventory.enabled>
                            </propertyVersionMap>
                            <includes>**/pom.xml</includes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>pre-clean</phase>
                                <goals>
                                    <goal>update</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>ae-artifact-analysis</module>
                <module>ae-term-metadata</module>

                <module>ae-artifact-analysis-plugin</module>
                <module>ae-mirror-plugin</module>
                <module>ae-inventory-enrichment-plugin</module>
                <module>ae-dependency-track-plugin</module>

                <module>tests</module>
            </modules>
        </profile>

        <profile>
            <id>pre-deploy</id>
            <modules>
                <module>ae-artifact-analysis</module>
                <module>ae-term-metadata</module>

                <module>ae-artifact-analysis-plugin</module>
                <module>ae-mirror-plugin</module>
                <module>ae-inventory-enrichment-plugin</module>
                <module>ae-dependency-track-plugin</module>
            </modules>
        </profile>

        <profile>
            <id>deploy</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <modules>
                <module>ae-artifact-analysis</module>
                <module>ae-term-metadata</module>

                <module>ae-artifact-analysis-plugin</module>
                <module>ae-mirror-plugin</module>
                <module>ae-inventory-enrichment-plugin</module>
                <module>ae-dependency-track-plugin</module>
            </modules>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh-staging</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <executable>gpg</executable>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>generate-javadoc-jar</id>
            <activation>
                <file><exists>src/main/java</exists></file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includes>
                                <include>**/package-info.java</include>
                                <include>**/META-INF/**/*</include>
                            </includes>

                            <includePom>false</includePom>
                            <excludeResources>false</excludeResources>

                            <archive>
                                <index>false</index>
                                <addMavenDescriptor>false</addMavenDescriptor>
                                <manifestEntries>
                                    <Created-By>${organization}</Created-By>
                                    <Built-By>${organization}</Built-By>
                                </manifestEntries>
                                <manifestSections>
                                    <manifestSection>
                                        <name>License Information</name>
                                        <manifestEntries>
                                            <License>${license.identifier}</License>
                                            <License-File>${license.file}</License-File>
                                        </manifestEntries>
                                    </manifestSection>
                                </manifestSections>
                            </archive>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <source>8</source>
                            <javadocVersion>1.8</javadocVersion>
                            <show>public</show>

                            <bottom>
                                Licensed under the ${license.identifier} - Copyright &#169; {inceptionYear} &#x2013;
                                {currentYear} the original author or authors.
                            </bottom>
                            <archive>
                                <index>false</index>
                                <addMavenDescriptor>false</addMavenDescriptor>
                                <manifestEntries>
                                    <Created-By>${organization}</Created-By>
                                    <Built-By>${organization}</Built-By>
                                </manifestEntries>
                                <manifestSections>
                                    <manifestSection>
                                        <name>License Information</name>
                                        <manifestEntries>
                                            <License>${license.identifier}</License>
                                        </manifestEntries>
                                    </manifestSection>
                                </manifestSections>
                            </archive>
                            <excludes>
                                <exclude>**/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

</project>