<?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>
    
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    
    <groupId>uk.gov.nationalarchives.thirdparty.netbeans</groupId>
    <artifactId>org-openide-util-lookup</artifactId>
    <version>7.2</version>
    
    <packaging>jar</packaging>
    
    <name>util-lookup</name>
    <description>NetBeans OpenIDE utilities lookup</description>
    <url>http://www.netbeans.com/</url>
    <inceptionYear>2012</inceptionYear>
    
    <licenses>
        <license>
            <name>CDDL and GPLv2 w/Classpath Exception license</name>
            <url>http://netbeans.org/cddl-gplv2.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <scm>
        <connection>scm:hg:http://hg.netbeans.org/main</connection>
        <developerConnection>scm:hg:http://hg.netbeans.org/main</developerConnection>
        <url>http://http://hg.netbeans.org/main/file/</url>
    </scm>
 
    <developers>
        <developer>
            <name>NetBeans</name>
        </developer>
    </developers>
    
    <properties>
        <project.build.source>1.6</project.build.source>
        <project.build.target>1.6</project.build.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>${project.build.source}</source>
                    <target>${project.build.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <fork>true</fork>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Source-Revision>${buildNumber}</Source-Revision>
                            <Build-Timestamp>${timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Website>${project.url}</Website>
                            <OpenIDE-Module>org.openide.util.lookup</OpenIDE-Module>
                            <OpenIDE-Module-Localizing-Bundle>org/openide/util/lookup/Bundle.properties</OpenIDE-Module-Localizing-Bundle>
                            <OpenIDE-Module-Specification-Version>8.15</OpenIDE-Module-Specification-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <!-- Attach source jars -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Source-Revision>${buildNumber}</Source-Revision>
                            <Build-Timestamp>${timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Website>${project.url}</Website>
                            <OpenIDE-Module>org.openide.util.lookup</OpenIDE-Module>
                            <OpenIDE-Module-Localizing-Bundle>org/openide/util/lookup/Bundle.properties</OpenIDE-Module-Localizing-Bundle>
                            <OpenIDE-Module-Specification-Version>8.15</OpenIDE-Module-Specification-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <!-- Attach javadoc jars -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Source-Revision>${buildNumber}</Source-Revision>
                            <Build-Timestamp>${timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Website>${project.url}</Website>
                            <OpenIDE-Module>org.openide.util.lookup</OpenIDE-Module>
                            <OpenIDE-Module-Localizing-Bundle>org/openide/util/lookup/Bundle.properties</OpenIDE-Module-Localizing-Bundle>
                            <OpenIDE-Module-Specification-Version>8.15</OpenIDE-Module-Specification-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId> <!-- avoid a bug with GPG plugin hanging http://jira.codehaus.org/browse/MGPG-9 -->
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <!-- performRelease will be true when mvn:release-perform is executed -->
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
</project>
