<?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>
        <artifactId>gephi-parent</artifactId>
        <groupId>org.gephi</groupId>
        <version>0.9.3</version>
        <relativePath>../..</relativePath>
    </parent>

    <artifactId>desktop-branding</artifactId>
    <version>0.9.3</version>
    <packaging>nbm</packaging>

    <name>DesktopBranding</name>

    <properties>
        <!-- Disable AutoUpdate in development -->
        <enableAutoUpdate>false</enableAutoUpdate>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-window</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-project</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>project-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>io-importer-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>core-library-wrapper</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>ui-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-lookup</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-windows</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-dialogs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-modules</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>visualization</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-sendopts</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-filesystems</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-api-progress</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-api-progress-nb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-nodes</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-core-output2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-awt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-autoupdate-services</artifactId>
        </dependency>
        <dependency>
            <groupId>io.sentry</groupId>
            <artifactId>sentry</artifactId>
        </dependency>
        <!-- required by Sentry -->
	    <dependency>
	        <groupId>com.google.code.gson</groupId>
	        <artifactId>gson</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Copy and filtering tasks -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <!-- Copy and replace %{gephi.app.version} variable in two Bundle.properties file that contains the application title -->
                    <execution>
                        <id>generate-bundles</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>src/main/nbm-branding</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <includes>
                                        <include>core/core.jar/org/netbeans/core/startup/Bundle.properties</include>
                                        <include>modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>

                    <!-- Configure AutoUpdate URLs and whether it's on or off -->
                    <execution>
                        <id>generate-autoupdate-urls</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <includes>
                                        <include>org/gephi/branding/desktop/layer.xml</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- NBM Options -->
            <plugin>
                <groupId>org.apache.netbeans.utilities</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <brandingToken>${brandingToken}</brandingToken>
                    <cluster>${brandingToken}</cluster>
                    <!-- TODO: Understand why validation fail when this is removed -->
                    <verifyRuntime>warn</verifyRuntime>
                </configuration>
                <executions>
                    <execution>
                        <id>default-branding</id>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- The deployment profile is built for releases  -->
        <profile>
            <id>deployment</id>
            <properties>
                <enableAutoUpdate>true</enableAutoUpdate>
            </properties>
        </profile>
    </profiles>
</project>
