<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>in.jlibs</groupId>
    <artifactId>jlibs-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.2.1</version>

    <name>jlibs</name>
    <url>https://github.com/santhosh-tekuri/jlibs</url>
    <description>Common Utilities for Java</description>

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

    <scm>
        <url>https://github.com/santhosh-tekuri/jlibs</url>
        <connection>scm:git:git://github.com/santhosh-tekuri/jlibs.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/santhosh-tekuri/jlibs.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>santhosh-tekuri</id>
            <name>Santhosh Kumar Tekuri</name>
            <email>santhosh.tekuri@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>1.6</jdk.version>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
    </properties>

    <modules>
        <module>apt</module>
        <module>core</module>
        <module>visitor</module>
        <module>visitor-apt</module>
        <module>i18n</module>
        <module>i18n-apt</module>
        <module>jdbc</module>
        <module>jdbc-apt</module>
        <module>greplog</module>
        <module>nbp</module>
        <module>xml</module>
        <module>xml-crawler</module>
        <module>xml-binding</module>
        <module>xml-binding-apt</module>
        <module>xml-nbp</module>
        <module>xsd</module>
        <module>wadl</module>
        <module>xmldog</module>
        <module>swing</module>
        <module>nblr</module>
        <module>wamp4j-core</module>
        <module>wamp4j-netty</module>
        <module>examples</module>
        <module>distribution</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <version>1.1</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.8</version>
            <scope>test</scope>
            <classifier>jdk15</classifier>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>${jdk.version}</version>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                      <id>attach-sources</id>
                      <goals>
                          <goal>jar-no-fork</goal>
                      </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <inherited>false</inherited>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.8.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <aggregate>true</aggregate>
                    <header>src/etc/header.txt</header>
                    <includes>
                        <include>**/src/main/**</include>
                        <include>**/src/test/**</include>
                        <include>**/bin/**</include>
                    </includes>
                    <excludes>
                        <exclude>**/src/main/assembly/*</exclude>
                        <exclude>**/src/main/resources/META-INF/services/*</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/*.conf</exclude>
                        <exclude>*/bin/**</exclude>
                        <exclude>**/prettify.*</exclude>
                        <exclude>core/src/main/java/jlibs/core/lang/Noun.java</exclude>
                        <exclude>nblr/src/main/resources/jlibs/nblr/codegen/**/*.txt</exclude>
                        <exclude>xml-nbp/src/main/java/jlibs/xml/sax/async/XMLScanner.java</exclude>
                        <exclude>xml/conformance/SAXTest/**</exclude>
                        <exclude>json/src/main/java/jlibs/json/parser/JSONScanner.java</exclude>
                        <exclude>json/src/main/java/jlibs/json/parser/JSONParser.java</exclude>
                        <exclude>wadl/src/main/java/jlibs/wadl/model/*.java</exclude>
                        <exclude>nio/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <altDeploymentRepository>internal.repo::default::file://${user.dir}/mvn-repo</altDeploymentRepository>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile> 
            <id>release</id>
            <build>
                <defaultGoal>clean install deploy</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <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>

</project>
