<?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>
    
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>
    
    <!-- 
TODO: 
- produce artifacts per locale
- maybe: support multiple NB versions
    -->
        

    <groupId>nl.cloudfarming.client</groupId>
    <artifactId>lib-platform-l10n</artifactId>
    <version>1.1-NB80</version>
    
    <packaging>nbm</packaging>

    <name>lib-platform-l10n</name>
    <description>Netbeans Platform community translations</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <netbeans.version>RELEASE80</netbeans.version>
    </properties>

    <repositories>
        <!--
        Repository hosting NetBeans modules, especially APIs.
        Versions are based on IDE releases, e.g.: RELEASE691
        To create your own repository, use: nbm:populate-repository
        -->
        <repository>
            <id>netbeans</id>
            <name>NetBeans</name>
            <url>http://bits.netbeans.org/maven2/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <licenses>
        <license>
            <name>Eclipse Public License - v 1.0</name>
            <url>http://www.eclipse.org/legal/epl-v10.html</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Netbeans Library Wrappers development team</name>
            <url>http://java.net/projects/nb-library-wrappers/members</url>
        </developer>        
    </developers>    

    <scm>
        <connection>scm:hg:file://${basedir}/../</connection>
        <developerConnection>scm:hg:file://${basedir}/../</developerConnection>
        <url>https://hg.java.net/hg/nb-library-wrappers~core</url>
      <tag>HEAD</tag>
  </scm>

    <url>http://nb-library-wrappers.java.net</url>
    
    <dependencies>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-api-annotations-common</artifactId>
            <version>${netbeans.version}</version>
        </dependency>
    </dependencies>

    <build>
        <!--<finalName>${artifactId}-all-${version}</finalName>-->
        
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <version>3.14</version>
                <extensions>true</extensions>
                <configuration>
                    <cluster>platform</cluster>
                    <nbmResources> 
                        <nbmResource>
                            <directory>nb72_platform_l10n/platform</directory>
                            <targetPath />
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                        </nbmResource>
                    </nbmResources>               
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <!-- to have the jar plugin pickup the nbm generated manifest -->
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>
            </plugin>
            
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>        
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <!-- 
            TODO: 
            - custom artifacts per locale without having to repeat the block below for each locale;
            - deploy default (all) plus all single locale profiles during release;
            -->
            <id>nl_NL</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <finalName>${artifactId}-nl_NL-${version}</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>nbm-maven-plugin</artifactId>
                        <version>3.14</version>
                        <extensions>true</extensions>
                        <configuration>
                            <cluster>platform</cluster>
                            <nbmResources> 
                                <nbmResource>
                                    <directory>nb80_platform_l10n/platform</directory>
                                    <targetPath />
                                    <includes>
                                        <include>**/*nl_NL.jar</include>
                                    </includes>
                                </nbmResource>
                            </nbmResources>               
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
</project>
