move netbeans-platform-app-archetype to his directory
diff --git a/archetype/netbeans-platform-app-archetype/pom.xml b/archetype/netbeans-platform-app-archetype/pom.xml
new file mode 100644
index 0000000..972ca5c
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/pom.xml
@@ -0,0 +1,37 @@
+<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">
+ <parent>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>mojo-parent</artifactId>
+ <version>38</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.codehaus.mojo.archetypes</groupId>
+ <artifactId>netbeans-platform-app-archetype</artifactId>
+ <version>1.21-SNAPSHOT</version>
+ <packaging>maven-archetype</packaging>
+ <name>NetBeans Platform Application Archetype</name>
+ <description>Archetype for sample application based on NetBeans Platform. Creates parent POM with branding and empty NBM project.</description>
+ <scm>
+ <connection>scm:git:https://github.com/mojohaus/netbeans-platform-app-archetype.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com/mojohaus/netbeans-platform-app-archetype.git</developerConnection>
+ <url>https://github.com/mojohaus/netbeans-platform-app-archetype/tree/${project.scm.tag}</url>
+ <tag>master</tag>
+ </scm>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0</version>
+ </extension>
+ </extensions>
+ </build>
+</project>
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetype/netbeans-platform-app-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000..8140bd7
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+ partial="false" name="NetBeans Platform Application Archetype">
+ <fileSets>
+ <fileSet filtered="true">
+ <directory>branding</directory>
+ <includes>
+ <include>pom.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true">
+ <directory>branding/src/main/nbm-branding</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true">
+ <directory>branding/src/main/resources</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true">
+ <directory>branding/src/main/nbm</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true">
+ <directory>application</directory>
+ <includes>
+ <include>pom.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true">
+ <directory>application/src/test/java</directory>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <requiredProperties>
+ <requiredProperty key="netbeansVersion">
+ <defaultValue>RELEASE81</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
+</archetype-descriptor>
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/pom.xml b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/pom.xml
new file mode 100644
index 0000000..21ee414
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/pom.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+#set( $D = '$' )
+<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>${groupId}</groupId>
+ <artifactId>${artifactId}-parent</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>${artifactId}-app</artifactId>
+ <packaging>nbm-application</packaging>
+
+ <name>${artifactId}-app</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <all.clusters>${D}{project.build.directory}/${D}{brandingToken}</all.clusters>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.netbeans.cluster</groupId>
+ <artifactId>platform</artifactId>
+ <version>${D}{netbeans.version}</version>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>${D}{project.groupId}</groupId>
+ <artifactId>${artifactId}-branding</artifactId>
+ <version>${D}{project.version}</version>
+ </dependency>
+ <!-- NbModuleSuite functional in RELEASE70 or later: -->
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-modules-nbjunit</artifactId>
+ <version>${D}{netbeans.version}</version>
+ <scope>test</scope> <!-- beyond platform cluster, this often needs to be dropped down to compile/runtime, some other modules in IDE clusters depend on it -->
+ </dependency>
+#if (${netbeansVersion} == "RELEASE71")
+ <!-- Cf.: https://netbeans.org/bugzilla/show_bug.cgi?id=207956 -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ <scope>test</scope>
+ </dependency>
+#end
+ <!-- To use Jelly Tools in your functional tests, add or replace with:
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-modules-jellytools-platform</artifactId>
+ <version>${D}{netbeans.version}</version>
+ <scope>test</scope>
+ </dependency>
+ -->
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ </plugin>
+ <!-- Permits NbModuleSuite to be run in integration-test phase: -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.12.2</version>
+ <configuration>
+#if (${netbeansVersion} == "RELEASE70" || ${netbeansVersion} == "RELEASE701")
+ <!-- For RELEASE70 or RELEASE701 only (adding in any other clusters imported by your app); RELEASE71+ uses all.clusters directly, plus branding.token: -->
+ <systemPropertyVariables>
+ <cluster.path.final>${D}{all.clusters}/${D}{brandingToken}:${D}{all.clusters}/platform</cluster.path.final>
+ </systemPropertyVariables>
+#else
+ <systemPropertyVariables>
+ <all.clusters>${D}{all.clusters}</all.clusters>
+ <branding.token>${D}{brandingToken}</branding.token>
+ </systemPropertyVariables>
+#end
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>deployment</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>extra</id>
+ <goals>
+ <goal>autoupdate</goal>
+ <goal>webstart-app</goal>
+ <goal>build-installers</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/src/test/java/ApplicationTest.java b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/src/test/java/ApplicationTest.java
new file mode 100644
index 0000000..1b73255
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/application/src/test/java/ApplicationTest.java
@@ -0,0 +1,32 @@
+package ${package};
+
+import java.util.logging.Level;
+import junit.framework.Test;
+import org.netbeans.junit.NbModuleSuite;
+import org.netbeans.junit.NbTestCase;
+
+public class ApplicationTest extends NbTestCase {
+
+ public static Test suite() {
+ return NbModuleSuite.createConfiguration(ApplicationTest.class).
+ gui(false).
+ failOnMessage(Level.WARNING). // works at least in RELEASE71
+ failOnException(Level.INFO).
+ enableClasspathModules(false).
+ clusters(".*").
+ suite(); // RELEASE71+, else use NbModuleSuite.create(NbModuleSuite.createConfiguration(...))
+ }
+
+ public ApplicationTest(String n) {
+ super(n);
+ }
+
+ public void testApplication() {
+ // pass if there are merely no warnings/exceptions
+ /* Example of using Jelly Tools (additional test dependencies required) with gui(true):
+ new ActionNoBlock("Help|About", null).performMenu();
+ new NbDialogOperator("About").closeByButton();
+ */
+ }
+
+}
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/pom.xml b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/pom.xml
new file mode 100644
index 0000000..36ba370
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/pom.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+#set( $D = '$' )
+<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>${groupId}</groupId>
+ <artifactId>${artifactId}-parent</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>${artifactId}-branding</artifactId>
+ <packaging>nbm</packaging>
+
+ <name>${artifactId}-branding</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-api-annotations-common</artifactId>
+ <version>${D}{netbeans.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <!-- to have the jar plugin pickup the nbm generated manifest -->
+ <useDefaultManifestFile>true</useDefaultManifestFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
new file mode 100644
index 0000000..0c991e6
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
@@ -0,0 +1,2 @@
+currentVersion=${artifactId} {0}
+LBL_splash_window_title=Starting ${artifactId}
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
new file mode 100644
index 0000000..b68602c
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
@@ -0,0 +1,2 @@
+CTL_MainWindow_Title=${artifactId} {0}
+CTL_MainWindow_Title_No_Project=${artifactId} {0}
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties
new file mode 100644
index 0000000..157512a
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm-branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties
@@ -0,0 +1 @@
+LBL_ProductInformation=${artifactId}
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm/manifest.mf b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm/manifest.mf
new file mode 100644
index 0000000..e5d042b
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/nbm/manifest.mf
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+#set( $slashed = $package.replaceAll("([.])", "/") )
+OpenIDE-Module-Localizing-Bundle: $slashed/branding/Bundle.properties
+AutoUpdate-Essential-Module: true
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/resources/branding/Bundle.properties b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/resources/branding/Bundle.properties
new file mode 100644
index 0000000..e999176
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/main/resources/branding/Bundle.properties
@@ -0,0 +1,5 @@
+# Localized module labels. Defaults taken from POM (<name>, <description>, <groupId>) if unset.
+#OpenIDE-Module-Name=
+#OpenIDE-Module-Short-Description=
+#OpenIDE-Module-Long-Description=
+#OpenIDE-Module-Display-Category=
diff --git a/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/pom.xml b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/pom.xml
new file mode 100644
index 0000000..3d0e03a
--- /dev/null
+++ b/archetype/netbeans-platform-app-archetype/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+#set( $D = '$' )
+<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>
+
+ <groupId>${groupId}</groupId>
+ <artifactId>${artifactId}-parent</artifactId>
+ <version>${version}</version>
+ <packaging>pom</packaging>
+
+ <name>${artifactId}-parent</name>
+
+ <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/nexus/content/groups/netbeans/</url>
+ </repository>
+ </repositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ <version>4.1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <brandingToken>${D}{brandingToken}</brandingToken>
+ <cluster>${D}{brandingToken}</cluster>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- NetBeans 6.9+ requires JDK 6, starting NetBeans 7.4 source 1.7 is required -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5.1</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <modules>
+ <module>branding</module>
+ <module>application</module>
+ </modules>
+
+ <properties>
+ <netbeans.version>${netbeansVersion}</netbeans.version>
+## XXX better to pass toLowerCase(java.util.Locale.ENGLISH), to fix Turkish problem, but Velocity rejects that syntax
+## XXX some other patterns are also rejected by NbBundle; it wants /[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*/
+ <brandingToken>${artifactId.toLowerCase().replaceAll("[^a-z0-9]+", "")}</brandingToken>
+ </properties>
+</project>