<?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>7</version>
    </parent>

    <groupId>nl.cloudfarming.client</groupId>
    <artifactId>agrosense</artifactId>
    <version>1.0.24</version>
    <packaging>pom</packaging>

    <name>AgroSense - NetBeans Platform Application</name>
    <description>AgroSense is a highly modular farm management system base on the netbeans platform.</description>
    
    <modules>
        <module>branding</module>
        <module>application</module>
        <module>util</module>
        <module>logging</module>
        <module>geoviewer</module>
        <module>menu</module>
        <module>uc-core</module>
        <module>farm</module>
        <module>util-swing</module>
        <module>stock</module>
        <module>geometry</module>
        <module>field</module>
        <module>mask</module>
        <module>task</module>
        <module>nbtaskfocus</module>
	<module>fleet</module>
	<module>sensor</module>
	<module>isobus</module>
    </modules>

    <properties>
        <netbeans.version>RELEASE71</netbeans.version>
        <brandingToken>agrosense</brandingToken>
        <releaseVersion>1.0.24</releaseVersion>
        <eventbus.version>1.0.3</eventbus.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <lib-common.version>1.2</lib-common.version>
        <lib-geotools.version>2.7.2.2</lib-geotools.version>
        <lib-jaxb.version>2.2.4</lib-jaxb.version>
        <lib-swingx.version>1.6.1</lib-swingx.version>
        <lib-hsqldb.version>1.1.1</lib-hsqldb.version>
        <agrosense.core.version>${project.version}</agrosense.core.version>
    </properties>    
    

    <licenses>
        <license>
            <name>Eclipse Public License - v 1.0</name>
            <url>http://www.eclipse.org/legal/epl-v10.html</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:hg:file://localhost${basedir}</connection>
        <developerConnection>scm:hg:file://localhost${basedir}</developerConnection>
        <url>https://hg.java.net/hg/agrosense~core </url>
    </scm>

    <url>http://agrosense.java.net</url>

    <issueManagement>
        <system>Jira</system>
        <url>http://java.net/jira/browse/AGROSENSE</url>
    </issueManagement>
    
    <ciManagement>
        <system>Jenkins</system>
        <url>http://build.agrosense.nl</url>
    </ciManagement>    

    <repositories>
        <repository>
            <id>netbeans</id>
            <name>NetBeans Platform Maven Repository</name>
            <url>http://bits.netbeans.org/maven2/</url>
        </repository>
    </repositories>
    
    <dependencies>
        <dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-core-windows</artifactId>
        </dependency>
    </dependencies>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-core-windows</artifactId>
                <version>${netbeans.version}</version>
                <scope>provided</scope>
            </dependency>                
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>lib-common</artifactId>
                <version>${lib-common.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>lib-geotools</artifactId>
                <version>${lib-geotools.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>lib-jaxb</artifactId>
                <version>${lib-jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>lib-swingx</artifactId>
                <version>${lib-swingx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-nodes</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-visual</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-annotations-common</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-windows</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-core-multiview</artifactId>
                <version>${netbeans.version}</version>
            </dependency>            
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-projectapi</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-projectuiapi</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <artifactId>org-openide-loaders</artifactId>
                <groupId>org.netbeans.api</groupId>
                <version>${netbeans.version}</version>
            </dependency>            
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-util-lookup</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-autoupdate-services</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-settings</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.external</groupId>
                <artifactId>ValidationAPI</artifactId>
                <version>${netbeans.version}</version>
            </dependency>            
            <dependency>
                <groupId>com.vividsolutions</groupId>
                <artifactId>jts</artifactId>
                <version>1.11</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-util</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>nl.cloudfarming.eventbus</groupId>
                <artifactId>cloudfarming-eventbus</artifactId>
                <version>${eventbus.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-awt</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <artifactId>org-openide-dialogs</artifactId>
                <groupId>org.netbeans.api</groupId>
                <type>jar</type>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <artifactId>org-netbeans-swing-outline</artifactId>
                <groupId>org.netbeans.api</groupId>
                <type>jar</type>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <artifactId>org-netbeans-swing-tabcontrol</artifactId>
                <groupId>org.netbeans.api</groupId>
                <type>jar</type>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-explorer</artifactId>
                <type>jar</type>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>cobertura</groupId>
                <artifactId>cobertura</artifactId>
                <version>1.8</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.8.5</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <artifactId>org-openide-filesystems</artifactId>
                <groupId>org.netbeans.api</groupId>
                <type>jar</type>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-progress</artifactId>
                <version>${netbeans.version}</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-options-api</artifactId>
                <version>${netbeans.version}</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>com.miglayout</groupId>
                <artifactId>miglayout</artifactId>
                <version>3.7.3.1</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <scope>test</scope>
                <version>4.8.2</version>
            </dependency>
            <dependency>
                <groupId>org.uispec4j</groupId>
                <artifactId>uispec4j</artifactId>
                <scope>test</scope>
                <version>2.4</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-nbjunit</artifactId>
                <version>${netbeans.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>junit-4.5</artifactId>
                        <groupId>org.netbeans.external</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-insane</artifactId>
                <version>${netbeans.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.5.11</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
                <version>1.5.11</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-jellytools-platform</artifactId>
                <version>${netbeans.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-modules</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-json</artifactId>
                <version>1.9</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-server</artifactId>
                <version>1.9</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-client</artifactId>
                <version>1.9</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey.contribs</groupId>
                <artifactId>jersey-multipart</artifactId>
                <version>1.9</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
                <artifactId>oauth-client</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>com.sun.jersey.contribs.jersey-oauth</groupId>
                <artifactId>oauth-signature</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-common</artifactId>
                <version>2.4.3</version>
            </dependency>
            <dependency>
                <groupId>com.sun.codemodel</groupId>
                <artifactId>codemodel</artifactId>
                <version>2.5</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-javahelp</artifactId>
                <version>${netbeans.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <inherited>false</inherited>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.10.b1</version>
                <configuration>
                    <header>${basedir}/etc/header.txt</header>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
<!--                    <properties>
                        <owner>Agrosense</owner>
                        <year>2011</year>
                        <email>info@cloudfarming.nl</email>
                    </properties>-->
                    <excludes>
                        <exclude>LICENSE.txt</exclude>
                        <exclude>etc/license.txt</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/test/data/**</exclude>
                        <exclude>**/resources/**</exclude>
                        <exclude>**/site/**</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*.mf</exclude>
                        <exclude>**/*.log</exclude>
                        <exclude>**/*.form</exclude>
                        <exclude>**/.hgtags</exclude>
                        <exclude>**/.hgignore</exclude>
                        <exclude>**/*.orig</exclude>
                        <exclude>**/*.CSV</exclude>
                        <exclude>**/*.script</exclude>
                        <exclude>**/menu/**</exclude>
                        <exclude>**/toelatingen.xsd</exclude>
                        <exclude>**/generated/**</exclude>
                        <exclude>**/xmlschema/**</exclude>
                        <exclude>**/nbtaskfocus/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>check-headers</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>nbm-maven-plugin</artifactId>
                    <version>3.7</version>
                    <extensions>true</extensions>
                    <configuration>
                        <forcedVersion>RELEASE10</forcedVersion>
<!--                    <installDirName>AgroSense-1.0</installDirName>-->
<!--                    <finalName>AgroSense-1.0.20</finalName>-->
                        <defaultCluster>agrosense</defaultCluster>
                        <detail>true</detail>
                        <brandingToken>${brandingToken}</brandingToken>
                        <cluster>agrosense</cluster>
                        <etcConfFile>src/main/resources/application.conf</etcConfFile> 
                        <templateFile>src/main/resources/template.xml</templateFile>
<!--                    <userSettings>nbi.icon.file=""</userSettings>-->
                    
                    
                        <installerOsLinux>true</installerOsLinux>
                        <installerOsMacosx>true</installerOsMacosx>
                        <installerOsSolaris>true</installerOsSolaris>
                        <installerOsWindows>true</installerOsWindows>
                    </configuration>                     
<!--                <configuration>
                    <defaultCluster>agrosense</defaultCluster>
                    <detail>true</detail>
                    <brandingToken>AgroSense</brandingToken>
                    <cluster>agrosense</cluster>
                    <etcConfFile>src/main/resources/application.conf</etcConfFile>     
                </configuration>                     -->
                </plugin>

                <plugin>
                    <!-- netbeans modules in 6.9+ are 1.6 compatible -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.12</version>
                    <configuration>
                        <!-- to prevent the Expecting a stackmap frame at branch target error from cobertura-->
                        <argLine>-XX:-UseSplitVerifier</argLine>
                        <systemProperties>
                            <property>
                                <name>cluster.path.final</name>
                                <value>${project.build.directory}/${brandingToken}/${brandingToken}:${project.build.directory}/${brandingToken}/platform</value>
                            </property>
                        </systemProperties>
                    </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>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <instrumentation>
                            <excludes>
                                <exclude>nl/cloudfarming/client/**/*Panel.class</exclude>
                                <exclude>nl/cloudfarming/client/**/*TopComponent.class</exclude>
                                <exclude>nl/cloudfarming/client/**/*Exception.class</exclude>
                                <exclude>nl/cloudfarming/client/**/*TopComponent*.class</exclude>
                                <exclude>nl/cloudfarming/client/**/*Panel*.class</exclude>
                                <exclude>nl/cloudfarming/client/model/*/**.class</exclude>
                            </excludes>                         
                        </instrumentation>
                        <formats>
                            <format>html</format>
                            <format>xml</format>
                        </formats>
                    </configuration>
                </plugin>                
            </plugins>
        </pluginManagement>
    </build>

    <reports>
        <report>
                <!-- The following is the plugin for cobertura, which takes care of integration and report generation-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <check>
                        <branchRate>80</branchRate>
                        <lineRate>80</lineRate>
                        <haltOnFailure>true</haltOnFailure>
                        <totalBranchRate>80</totalBranchRate>
                        <totalLineRate>80</totalLineRate>
                        <packageLineRate>80</packageLineRate>
                        <packageBranchRate>80</packageBranchRate>
                    </check>
                    <instrumentation>

                        
                        <!--

                        <ignores>
                        </ignores>-->
                    </instrumentation>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                </configuration>
            </plugin>
        </report>
    </reports>
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <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>
        <profile>
            <id>integration-test</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.12</version>
                        <configuration>
                            <includes>
                                <include>**/*IT.java</include>
                                <include>**/*Test.java</include>
                                <include>**/Test*.java</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
    </profiles>

    <developers>
        <developer>
            <name>AgroSense development team</name>
            <url>http://java.net/projects/agrosense/members</url>
        </developer>        
    </developers>

</project>
