Merge pull request #1539 from apache/master

Sync master to release112 branch for beta2
diff --git a/enterprise/glassfish.eecommon/licenseinfo.xml b/enterprise/glassfish.eecommon/licenseinfo.xml
new file mode 100644
index 0000000..27f675b
--- /dev/null
+++ b/enterprise/glassfish.eecommon/licenseinfo.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+      Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+   <licenseinfo>
+    <fileset>
+        <file>src/org/netbeans/modules/glassfish/eecommon/api/ddtemplates/javaee/glassfish-web.xml</file>
+        <license ref="EPL-v20" />
+        <comment type="TEMPLATE_MINIMAL_IP" />
+    </fileset>
+</licenseinfo>
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/Utils.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/Utils.java
index d0aa060..89cf116 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/Utils.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/Utils.java
@@ -187,10 +187,10 @@
             // appcli 1.3, 1.4, 5.0, 6.0
             // ear 1.3, 1.4, 5, 6
             if (modVer.equals("6") || modVer.equals("6.0") || modVer.endsWith("1.6") || modVer.equals("3.1")) {
-                suffix = "-java_ee_6/";
+                suffix = "-java_ee/";
             } else if (modVer.equals("3.0")) {
                 if (J2eeModule.Type.WAR.equals(t)) {
-                    suffix = "-java_ee_6/";
+                    suffix = "-java_ee/";
                 }
             } else if (modVer.equals("1.4") || modVer.equals("2.4") || modVer.equals("2.1")) {
                 suffix = "-j2ee_1_4/";
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
index 37fbb8a..62f197f 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java
@@ -136,6 +136,10 @@
         if (version == null) {
             return new int[]{0,1};
         }
+        // glassfish-resources.xml for v5
+        if (GlassFishVersion.ge(version, GlassFishVersion.GF_5) || GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) {
+            return new int[]{0};
+        }
         // glassfish-resources.xml for v4
         if (GlassFishVersion.ge(version, GlassFishVersion.GF_4)) {
             return new int[]{0};
@@ -333,7 +337,7 @@
                     (J2EEVersion.J2EE_1_4.compareSpecification(j2eeVersion) >= 0) : false;
             boolean isPreJavaEE6 = (j2eeVersion != null) ?
                     (J2EEVersion.JAVAEE_5_0.compareSpecification(j2eeVersion) >= 0) : false;
-            if (!primarySunDD.exists() && isPreJavaEE6) {
+            if (!primarySunDD.exists()) {
                 // If module is J2EE 1.4 (or 1.3), or this is a web app (where we have
                 // a default property even for JavaEE5), then copy the default template.
                 if (J2eeModule.Type.WAR.equals(mt) || isPreJavaEE5) {
@@ -545,7 +549,17 @@
     
     static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolder) {
         File dtdFolder = new File(asInstallFolder, "lib/dtds/"); // NOI18N
-        if (dtdFolder.exists()) {
+        File schemaFolder = new File(asInstallFolder, "lib/schemas");
+        
+        boolean geGF5 = false;
+        if(schemaFolder.exists()){
+            if(new File(schemaFolder, "javaee_8.xsd").exists() &&
+                    new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){
+              geGF5 = true;
+              return ASDDVersion.GLASSFISH_5_1;
+            }
+        }
+        if (!geGF5 && dtdFolder.exists()) {
             if (new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()) {
                 return ASDDVersion.SUN_APPSERVER_10_1;
             }
@@ -569,7 +583,7 @@
         return null;
     }
 
-    // ------------------------------------------------------------------------
+    // ---------------------------------- --------------------------------------
     // Access to V2/V3 specific information.  Allows for graceful deprecation
     // of unsupported features (e.g. CMP, etc.)
     // ------------------------------------------------------------------------
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
index fc26f16..15c72ff 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java
@@ -136,7 +136,7 @@
         return secondarySunDDName != null ?
             module.getDeploymentConfigurationFile(secondarySunDDName) : null;
     }
-
+    
     public RootInterface getStandardRootDD(J2eeModule module) {
         RootInterface stdRootDD = null;
         if (standardDDName != null) {
@@ -177,7 +177,7 @@
     public static class WebDDHelper extends J2eeModuleHelper {
 
         private WebDDHelper() {
-            this(GF_WEB_XML_V1, null);
+            this(GF_WEB_XML_V2, null);
         }
 
         private WebDDHelper(String dd1, String dd2) {
@@ -200,6 +200,8 @@
                 result = ASDDVersion.SUN_APPSERVER_9_0;
             } else if (ServletVersion.SERVLET_3_0.equals(servletVersion)) {
                 result = ASDDVersion.SUN_APPSERVER_10_0;
+            } else if (ServletVersion.SERVLET_4_0.equals(servletVersion)) {
+                result = ASDDVersion.GLASSFISH_5_1;
             }
             return result;
         }
@@ -228,6 +230,8 @@
                 result = ASDDVersion.SUN_APPSERVER_9_0;
             } else if (ServletVersion.SERVLET_3_0.equals(servletVersion)) {
                 result = ASDDVersion.SUN_APPSERVER_10_0;
+            } else if (ServletVersion.SERVLET_4_0.equals(servletVersion)) {
+                result = ASDDVersion.GLASSFISH_5_1;
             }
             return result;
         }
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
index 819b3a6..5224a85 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java
@@ -53,6 +53,13 @@
         "3.0", 3000,	// NOI18N
         "6.0", 6000	// NOI18N
         );
+    
+    /** Represents servlet version 4.0
+     */
+    public static final ServletVersion SERVLET_4_0 = new ServletVersion(
+        "4.0", 3000,	// NOI18N
+        "6.0", 6000	// NOI18N
+        );
 
     /** -----------------------------------------------------------------------
      *  Implementation
@@ -87,6 +94,8 @@
             result = SERVLET_2_5;
         } else if(SERVLET_3_0.toString().equals(version)) {
             result = SERVLET_3_0;
+        } else if(SERVLET_4_0.toString().equals(version)) {
+            result = SERVLET_4_0;
         }
 
         return result;
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/ddtemplates/javaee/glassfish-web.xml b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/ddtemplates/javaee/glassfish-web.xml
new file mode 100644
index 0000000..673cc06
--- /dev/null
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/ddtemplates/javaee/glassfish-web.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
+    
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v. 2.0, which is available at
+    http://www.eclipse.org/legal/epl-2.0.
+
+    This Source Code may also be made available under the following Secondary
+    Licenses when the conditions for such availability set forth in the
+    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+    version 2 with the GNU Classpath Exception, which is available at
+    https://www.gnu.org/software/classpath/license.html.
+
+    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+-->
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app error-url="">
+  <class-loader delegate="true"/>
+  <jsp-config>
+    <property name="keepgenerated" value="true">
+      <description>Keep a copy of the generated servlet class' java code.</description>
+    </property>
+  </jsp-config>
+</glassfish-web-app>
diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/layer.xml b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/layer.xml
index 8921ac4..c375e60 100644
--- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/layer.xml
+++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/layer.xml
@@ -27,7 +27,7 @@
             <attr name="displayName" bundlevalue="org.netbeans.modules.glassfish.eecommon.Bundle#SunResourcesFolder"/>
         </folder>
     </folder>
-<!--    <folder name="org-netbeans-modules-glassfish-eecommon-ddtemplates-j2ee_1_3">
+    <!--    <folder name="org-netbeans-modules-glassfish-eecommon-ddtemplates-j2ee_1_3">
         <file name="sun-web.xml" url="api/ddtemplates/j2ee13/sun-web.xml"/>
         <file name="sun-ejb-jar.xml" url="api/ddtemplates/j2ee13/sun-ejb-jar.xml"/>
         <file name="sun-cmp-mappings.xml" url="api/ddtemplates/j2ee13/sun-cmp-mappings.xml"/>
@@ -71,20 +71,8 @@
         <file name="weblogic-application-client.xml" url="api/ddtemplates/javaee5/weblogic-application-client.xml"/>
         <file name="weblogic-application.xml" url="api/ddtemplates/javaee5/weblogic-application.xml"/>
         <file name="weblogic-ejb-jar.xml" url="api/ddtemplates/javaee5/weblogic-ejb-jar.xml"/>
+    </folder-->
+    <folder name="org-netbeans-modules-glassfish-eecommon-ddtemplates-java_ee">
+        <file name="glassfish-web.xml" url="api/ddtemplates/javaee/glassfish-web.xml"/>
     </folder>
-    <folder name="org-netbeans-modules-glassfish-eecommon-ddtemplates-java_ee_6">
-        <file name="sun-web.xml" url="api/ddtemplates/javaee6/sun-web.xml"/>
-        <file name="sun-ejb-jar.xml" url="api/ddtemplates/javaee6/sun-ejb-jar.xml"/>
-        <file name="sun-cmp-mappings.xml" url="api/ddtemplates/javaee6/sun-cmp-mappings.xml"/>
-        <file name="sun-application.xml" url="api/ddtemplates/javaee6/sun-application.xml"/>
-        <file name="sun-application-client.xml" url="api/ddtemplates/javaee6/sun-application-client.xml"/>
-        <file name="glassfish-web.xml" url="api/ddtemplates/javaee6/glassfish-web.xml"/>
-        <file name="glassfish-ejb-jar.xml" url="api/ddtemplates/javaee6/glassfish-ejb-jar.xml"/>
-        <file name="glassfish-application.xml" url="api/ddtemplates/javaee6/glassfish-application.xml"/>
-        <file name="glassfish-application-client.xml" url="api/ddtemplates/javaee6/glassfish-application-client.xml"/>
-        <file name="weblogic.xml" url="api/ddtemplates/javaee6/weblogic.xml"/>
-        <file name="weblogic-application-client.xml" url="api/ddtemplates/javaee6/weblogic-application-client.xml"/>
-        <file name="weblogic-application.xml" url="api/ddtemplates/javaee6/weblogic-application.xml"/>
-        <file name="weblogic-ejb-jar.xml" url="api/ddtemplates/javaee6/weblogic-ejb-jar.xml"/>
-    </folder>-->
 </filesystem>
diff --git a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java
index d75c6d1..61b8e25 100644
--- a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java
+++ b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java
@@ -257,6 +257,59 @@
         601,
         "GlassFish Server 3.1" // NOI18N
     );
+    
+     /** Represents GF Server 5.1
+     */
+    public static final ASDDVersion GLASSFISH_5_0 = new ASDDVersion(
+        "5.0", 100,	// NOI18N
+        DTDRegistry.GLASSFISH_WEBAPP_301_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_WEBAPP_301_DTD_SYSTEM_ID,
+        SunWebApp.VERSION_3_0_1,
+        301,
+        DTDRegistry.GLASSFISH_EJBJAR_311_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_EJBJAR_311_DTD_SYSTEM_ID,
+        SunEjbJar.VERSION_3_1_1,
+        311,
+        DTDRegistry.SUN_CMP_MAPPING_810_DTD_PUBLIC_ID,
+        DTDRegistry.SUN_CMP_MAPPING_810_DTD_SYSTEM_ID,
+        "1.2",
+        120,
+        DTDRegistry.GLASSFISH_APPLICATION_601_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_APPLICATION_601_DTD_SYSTEM_ID,
+        SunApplication.VERSION_6_0_1,
+        601,
+        DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_SYSTEM_ID,
+        SunApplicationClient.VERSION_6_0_1,
+        601,
+        "GlassFish Server 5.0" // NOI18N
+    );
+    /** Represents GF Server 5.1
+     */
+    public static final ASDDVersion GLASSFISH_5_1 = new ASDDVersion(
+        "5.1", 100,	// NOI18N
+        DTDRegistry.GLASSFISH_WEBAPP_301_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_WEBAPP_301_DTD_SYSTEM_ID,
+        SunWebApp.VERSION_3_0_1,
+        301,
+        DTDRegistry.GLASSFISH_EJBJAR_311_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_EJBJAR_311_DTD_SYSTEM_ID,
+        SunEjbJar.VERSION_3_1_1,
+        311,
+        DTDRegistry.SUN_CMP_MAPPING_810_DTD_PUBLIC_ID,
+        DTDRegistry.SUN_CMP_MAPPING_810_DTD_SYSTEM_ID,
+        "1.2",
+        120,
+        DTDRegistry.GLASSFISH_APPLICATION_601_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_APPLICATION_601_DTD_SYSTEM_ID,
+        SunApplication.VERSION_6_0_1,
+        601,
+        DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_PUBLIC_ID,
+        DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_SYSTEM_ID,
+        SunApplicationClient.VERSION_6_0_1,
+        601,
+        "GlassFish Server 5.1" // NOI18N
+    );
     /** Represents Sun Java System Web Server 7.0
      */
     public static final ASDDVersion SUN_WEBSERVER_7_0 = new ASDDVersion(
diff --git a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/impl/DTDRegistry.java b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/impl/DTDRegistry.java
index 1d53492..5a820c3 100644
--- a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/impl/DTDRegistry.java
+++ b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/impl/DTDRegistry.java
@@ -26,7 +26,7 @@
      public static final String Package = "com.sun.enterprise.deployment.xml";
 
      // Standard DTDs
-    
+
      public static final String APPLICATION_13_DTD_PUBLIC_ID =
          "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN";
      public static final String APPLICATION_13_DTD_SYSTEM_ID =
@@ -106,17 +106,17 @@
     public static final String SUN_APPLICATION_140beta_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN";
     public static final String SUN_APPLICATION_140beta_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd";    
+        "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd";
     public static final String SUN_APPLICATION_140_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 8.0 J2EE Application 1.4//EN";
     public static final String SUN_APPLICATION_140_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-application_1_4-0.dtd";    
-    
+        "http://www.sun.com/software/appserver/dtds/sun-application_1_4-0.dtd";
+
     public static final String SUN_APPLICATION_50_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Java EE Application 5.0//EN";
     public static final String SUN_APPLICATION_50_DTD_SYSTEM_ID =
         "http://www.sun.com/software/appserver/dtds/sun-application_5_0-0.dtd";
-    
+
     public static final String SUN_APPLICATION_60_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Java EE Application 6.0//EN";
     public static final String SUN_APPLICATION_60_DTD_SYSTEM_ID =
@@ -140,27 +140,27 @@
     public static final String SUN_EJBJAR_210beta_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN";
     public static final String SUN_EJBJAR_210beta_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd";    
+        "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd";
     public static final String SUN_EJBJAR_210_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN";
     public static final String SUN_EJBJAR_210_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd";    
+        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd";
 
     public static final String SUN_EJBJAR_211_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 8.1 EJB 2.1//EN";
     public static final String SUN_EJBJAR_211_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd";    
-    
+        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd";
+
     public static final String SUN_EJBJAR_300_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN";
     public static final String SUN_EJBJAR_300_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd";  
+        "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd";
 
     public static final String SUN_EJBJAR_301_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 9.1.1 EJB 3.0//EN";
     public static final String SUN_EJBJAR_301_DTD_SYSTEM_ID =
         "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-1.dtd";
-    
+
     public static final String SUN_EJBJAR_310_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 EJB 3.1//EN";
     public static final String SUN_EJBJAR_310_DTD_SYSTEM_ID =
@@ -180,11 +180,11 @@
     public static final String SUN_APPCLIENT_140beta_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN";
     public static final String SUN_APPCLIENT_140beta_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd";    
+        "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd";
     public static final String SUN_APPCLIENT_140_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Application Client 1.4//EN";
     public static final String SUN_APPCLIENT_140_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-application-client_1_4-0.dtd";    
+        "http://www.sun.com/software/appserver/dtds/sun-application-client_1_4-0.dtd";
     public static final String SUN_APPCLIENT_141_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Application Client 1.4//EN";
     public static final String SUN_APPCLIENT_141_DTD_SYSTEM_ID =
@@ -192,12 +192,12 @@
     public static final String SUN_APPCLIENT_50_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Application Client 5.0//EN";
     public static final String SUN_APPCLIENT_50_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-application-client_5_0-0.dtd";    
+        "http://www.sun.com/software/appserver/dtds/sun-application-client_5_0-0.dtd";
     public static final String SUN_APPCLIENT_60_DTD_PUBLIC_ID =
         "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Application Client 6.0//EN";
     public static final String SUN_APPCLIENT_60_DTD_SYSTEM_ID =
         "http://www.sun.com/software/appserver/dtds/sun-application-client_6_0-0.dtd";
-    
+
     public static final String GLASSFISH_APPCLIENT_601_DTD_PUBLIC_ID =
         "-//GlassFish.org//DTD GlassFish Application Server 3.1 Java EE Application Client 6.0//EN";
     public static final String GLASSFISH_APPCLIENT_601_DTD_SYSTEM_ID =
@@ -224,21 +224,21 @@
         "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd";
 
     public static final String SUN_WEBAPP_240beta_DTD_PUBLIC_ID =
-        "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN";	
+        "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN";
     public static final String SUN_WEBAPP_240beta_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd";	
+        "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd";
     public static final String SUN_WEBAPP_240_DTD_PUBLIC_ID =
-        "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN";	
+        "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN";
     public static final String SUN_WEBAPP_240_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd";	
+        "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd";
 
     public static final String SUN_WEBAPP_241_DTD_PUBLIC_ID =
-        "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN";	
+        "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN";
     public static final String SUN_WEBAPP_241_DTD_SYSTEM_ID =
-        "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd";	
+        "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd";
 
     public static final String SUN_WEBAPP_250_DTD_PUBLIC_ID =
-        "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN";	
+        "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN";
     public static final String SUN_WEBAPP_250_DTD_SYSTEM_ID =
         "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd";
 
@@ -250,7 +250,7 @@
     public static final String GLASSFISH_WEBAPP_301_DTD_PUBLIC_ID =
         "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN";
     public static final String GLASSFISH_WEBAPP_301_DTD_SYSTEM_ID =
-        "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd";
+        "https://raw.githubusercontent.com/eclipse-ee4j/glassfish/master/appserver/deployment/dtds/src/main/resources/glassfish/lib/dtds/glassfish-web-app_3_0-1.dtd";
     /**
      * Application Client Container: Sun ONE App Server specific dtd info.
      */
@@ -280,4 +280,3 @@
 }
 
 // END OF IASRI 4661135
-
diff --git a/extra/nbjavac.api/build.xml b/extra/nbjavac.api/build.xml
new file mode 100644
index 0000000..4eccbad
--- /dev/null
+++ b/extra/nbjavac.api/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project basedir="." default="netbeans" name="extra/nbjavac.api">
+    <description>Builds, tests, and runs the project org.netbeans.modules.nbjavac.api</description>
+    <import file="../../nbbuild/templates/projectized.xml"/>
+</project>
diff --git a/extra/nbjavac.api/manifest.mf b/extra/nbjavac.api/manifest.mf
new file mode 100644
index 0000000..c8db586
--- /dev/null
+++ b/extra/nbjavac.api/manifest.mf
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: false
+OpenIDE-Module: org.netbeans.modules.nbjavac.api
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nbjavac/api/Bundle.properties
+OpenIDE-Module-Specification-Version: 2.0
+OpenIDE-Module-Hide-Classpath-Packages: com.sun.javadoc.**, com.sun.source.**, javax.annotation.processing.**, javax.lang.model.**, javax.tools.**, com.sun.tools.javac.**
+OpenIDE-Module-Fragment-Host: org.netbeans.libs.javacapi
diff --git a/extra/nbjavac.api/nbproject/project.properties b/extra/nbjavac.api/nbproject/project.properties
new file mode 100644
index 0000000..bf684e8
--- /dev/null
+++ b/extra/nbjavac.api/nbproject/project.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+javac.source=1.7
+javac.compilerargs=-Xlint -Xlint:-serial
+is.autoload=true
+license.file.override=${nb_all}/nbbuild/licenses/GPL-2-CP
diff --git a/extra/nbjavac.api/nbproject/project.xml b/extra/nbjavac.api/nbproject/project.xml
new file mode 100644
index 0000000..d94a9fe
--- /dev/null
+++ b/extra/nbjavac.api/nbproject/project.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>org.netbeans.modules.nbjavac.api</code-name-base>
+            <module-dependencies/>
+            <public-packages/>
+            <class-path-extension>
+                <runtime-relative-path>ext/nb-javac-13-api.jar</runtime-relative-path>
+                <binary-origin>release/modules/ext/nb-javac-13-api.jar</binary-origin>
+            </class-path-extension>
+        </data>
+    </configuration>
+</project>
diff --git a/extra/nbjavac.api/release/modules/ext/nb-javac-13-api.jar.external b/extra/nbjavac.api/release/modules/ext/nb-javac-13-api.jar.external
new file mode 100644
index 0000000..1097c08
--- /dev/null
+++ b/extra/nbjavac.api/release/modules/ext/nb-javac-13-api.jar.external
@@ -0,0 +1,4 @@
+CRC:205892258
+SIZE:195677
+URL:https://netbeans.osuosl.org/binaries/E6F49BAA176938C82F4EBAA148F8A8AB13556233-nb-javac-13-api.jar
+URL:https://hg.netbeans.org/binaries/E6F49BAA176938C82F4EBAA148F8A8AB13556233-nb-javac-13-api.jar
diff --git a/extra/nbjavac.api/src/org/netbeans/modules/nbjavac/api/Bundle.properties b/extra/nbjavac.api/src/org/netbeans/modules/nbjavac/api/Bundle.properties
new file mode 100644
index 0000000..7189737
--- /dev/null
+++ b/extra/nbjavac.api/src/org/netbeans/modules/nbjavac/api/Bundle.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+OpenIDE-Module-Name=nb-javac API
diff --git a/extra/nbjavac.impl/build.xml b/extra/nbjavac.impl/build.xml
new file mode 100644
index 0000000..ced7e4d
--- /dev/null
+++ b/extra/nbjavac.impl/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project basedir="." default="netbeans" name="extra/nbjavac.impl">
+    <description>Builds, tests, and runs the project org.netbeans.modules.nbjavac.impl</description>
+    <import file="../../nbbuild/templates/projectized.xml"/>
+</project>
diff --git a/extra/nbjavac.impl/manifest.mf b/extra/nbjavac.impl/manifest.mf
new file mode 100644
index 0000000..347dd76
--- /dev/null
+++ b/extra/nbjavac.impl/manifest.mf
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: false
+OpenIDE-Module: org.netbeans.modules.nbjavac.impl
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nbjavac/impl/Bundle.properties
+OpenIDE-Module-Specification-Version: 2.0
+OpenIDE-Module-Hide-Classpath-Packages: com.sun.tools.javac.**, com.sun.tools.javadoc.**, com.sun.tools.javap.**, com.sun.tools.classfile.**, com.sun.tools.doclint.**
+OpenIDE-Module-Fragment-Host: org.netbeans.libs.javacimpl
+OpenIDE-Module-Provides: org.netbeans.modules.nbjavac
diff --git a/extra/nbjavac.impl/nbproject/project.properties b/extra/nbjavac.impl/nbproject/project.properties
new file mode 100644
index 0000000..bf684e8
--- /dev/null
+++ b/extra/nbjavac.impl/nbproject/project.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+javac.source=1.7
+javac.compilerargs=-Xlint -Xlint:-serial
+is.autoload=true
+license.file.override=${nb_all}/nbbuild/licenses/GPL-2-CP
diff --git a/extra/nbjavac.impl/nbproject/project.xml b/extra/nbjavac.impl/nbproject/project.xml
new file mode 100644
index 0000000..01bfaa6
--- /dev/null
+++ b/extra/nbjavac.impl/nbproject/project.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>org.netbeans.modules.nbjavac.impl</code-name-base>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.nbjavac.api</code-name-base>
+                    <run-dependency>
+                        <specification-version>2.0</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages/>
+            <class-path-extension>
+                <runtime-relative-path>ext/nb-javac-13-impl.jar</runtime-relative-path>
+                <binary-origin>release/modules/ext/nb-javac-13-impl.jar</binary-origin>
+            </class-path-extension>
+        </data>
+    </configuration>
+</project>
diff --git a/extra/nbjavac.impl/release/modules/ext/nb-javac-13-impl.jar.external b/extra/nbjavac.impl/release/modules/ext/nb-javac-13-impl.jar.external
new file mode 100644
index 0000000..44c10ef
--- /dev/null
+++ b/extra/nbjavac.impl/release/modules/ext/nb-javac-13-impl.jar.external
@@ -0,0 +1,4 @@
+CRC:2001595618
+SIZE:3405169
+URL:https://netbeans.osuosl.org/binaries/58ECEA2987072A9AD96F2ECF82C18AB90CEF8CFD-nb-javac-13-impl.jar
+URL:https://hg.netbeans.org/binaries/58ECEA2987072A9AD96F2ECF82C18AB90CEF8CFD-nb-javac-13-impl.jar
diff --git a/extra/nbjavac.impl/src/org/netbeans/modules/nbjavac/impl/Bundle.properties b/extra/nbjavac.impl/src/org/netbeans/modules/nbjavac/impl/Bundle.properties
new file mode 100644
index 0000000..a47bee0
--- /dev/null
+++ b/extra/nbjavac.impl/src/org/netbeans/modules/nbjavac/impl/Bundle.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+OpenIDE-Module-Name=nb-javac Impl
diff --git a/extra/nbjavac/build.xml b/extra/nbjavac/build.xml
new file mode 100644
index 0000000..670ff56
--- /dev/null
+++ b/extra/nbjavac/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project basedir="." default="netbeans" name="extra/nbjavac">
+    <description>Builds, tests, and runs the project org.netbeans.modules.nbjavac</description>
+    <import file="../../nbbuild/templates/projectized.xml"/>
+</project>
diff --git a/extra/nbjavac/manifest.mf b/extra/nbjavac/manifest.mf
new file mode 100644
index 0000000..582b59e
--- /dev/null
+++ b/extra/nbjavac/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
+OpenIDE-Module: org.netbeans.modules.nbjavac
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nbjavac/Bundle.properties
+OpenIDE-Module-Specification-Version: 2.0
+
diff --git a/extra/nbjavac/nbproject/project.properties b/extra/nbjavac/nbproject/project.properties
new file mode 100644
index 0000000..fec4048
--- /dev/null
+++ b/extra/nbjavac/nbproject/project.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+javac.source=1.8
+javac.compilerargs=-Xlint -Xlint:-serial
+license.file.override=${nb_all}/nbbuild/licenses/GPL-2-CP
diff --git a/extra/nbjavac/nbproject/project.xml b/extra/nbjavac/nbproject/project.xml
new file mode 100644
index 0000000..ff889ed
--- /dev/null
+++ b/extra/nbjavac/nbproject/project.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>org.netbeans.modules.nbjavac</code-name-base>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.nbjavac.api</code-name-base>
+                    <run-dependency>
+                        <specification-version>2.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.nbjavac.impl</code-name-base>
+                    <run-dependency>
+                        <specification-version>2.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.awt</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.74</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.modules</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.54</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.39</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.ui</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>9.14</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages/>
+        </data>
+    </configuration>
+</project>
diff --git a/extra/nbjavac/src/org/netbeans/modules/nbjavac/Bundle.properties b/extra/nbjavac/src/org/netbeans/modules/nbjavac/Bundle.properties
new file mode 100644
index 0000000..fdea444
--- /dev/null
+++ b/extra/nbjavac/src/org/netbeans/modules/nbjavac/Bundle.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+OpenIDE-Module-Display-Category=Java
+OpenIDE-Module-Name=The nb-javac Java editing support library
diff --git a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-ejb.xsl b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-ejb.xsl
index 717ac97..086acca 100644
--- a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-ejb.xsl
+++ b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-ejb.xsl
@@ -94,6 +94,7 @@
                         <property name="empty.dir" location="${{build.dir}}/empty"/>
                         <mkdir dir="${{empty.dir}}"/>
                         <groovyc>
+                            <xsl:attribute name="javahome">${platform.home}</xsl:attribute>
                             <xsl:attribute name="srcdir">@{srcdir}</xsl:attribute>
                             <xsl:attribute name="sourcepath">@{sourcepath}</xsl:attribute>
                             <xsl:attribute name="destdir">@{destdir}</xsl:attribute>
diff --git a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-j2se.xsl b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-j2se.xsl
index 161b596..a87ffb3 100644
--- a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-j2se.xsl
+++ b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-j2se.xsl
@@ -106,6 +106,7 @@
                         <property name="empty.dir" location="${{build.dir}}/empty"/><!-- #157692 -->
                         <mkdir dir="${{empty.dir}}"/>
                         <groovyc>
+                            <xsl:attribute name="javahome">${platform.home}</xsl:attribute>
                             <xsl:attribute name="srcdir">@{srcdir}</xsl:attribute>
                             <xsl:attribute name="sourcepath">@{sourcepath}</xsl:attribute>
                             <xsl:attribute name="destdir">@{destdir}</xsl:attribute>
diff --git a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-web.xsl b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-web.xsl
index cb1265b..0ce3609 100644
--- a/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-web.xsl
+++ b/groovy/groovy.antproject/src/org/netbeans/modules/groovy/antproject/resources/groovy-build-web.xsl
@@ -94,6 +94,7 @@
                         <property name="empty.dir" location="${{build.dir}}/empty"/>
                         <mkdir dir="${{empty.dir}}"/>
                         <groovyc>
+                            <xsl:attribute name="javahome">${platform.home}</xsl:attribute>
                             <xsl:attribute name="srcdir">@{srcdir}</xsl:attribute>
                             <xsl:attribute name="sourcepath">@{sourcepath}</xsl:attribute>
                             <xsl:attribute name="destdir">@{destdir}</xsl:attribute>
diff --git a/ide/diff/src/org/netbeans/modules/diff/DiffAction.java b/ide/diff/src/org/netbeans/modules/diff/DiffAction.java
index 6a62efa..7d24274 100644
--- a/ide/diff/src/org/netbeans/modules/diff/DiffAction.java
+++ b/ide/diff/src/org/netbeans/modules/diff/DiffAction.java
@@ -48,7 +48,6 @@
 import org.netbeans.modules.diff.options.AccessibleJFileChooser;
 import org.openide.DialogDisplayer;
 import org.openide.ErrorManager;
-import org.openide.util.lookup.ProxyLookup;
 
 /**
  * Diff Action. It gets the default diff visualizer and diff provider if needed
@@ -183,6 +182,11 @@
         int result = fileChooser.showDialog(WindowManager.getDefault().getMainWindow(), NbBundle.getMessage(DiffAction.class, "DiffTo_BrowseFile_OK")); // NOI18N
         if (result != JFileChooser.APPROVE_OPTION) return null;
 
+        FileObject userSelectedFo = editorSelector.getSelectedEditorFile();
+        if (userSelectedFo != null) {
+            return userSelectedFo;
+        }
+        
         File f = fileChooser.getSelectedFile();
         if (f != null) {
             File file = f.getAbsoluteFile();
diff --git a/ide/diff/src/org/netbeans/modules/diff/EditorBufferSelectorPanel.java b/ide/diff/src/org/netbeans/modules/diff/EditorBufferSelectorPanel.java
index 12a5231..9f13c4e 100644
--- a/ide/diff/src/org/netbeans/modules/diff/EditorBufferSelectorPanel.java
+++ b/ide/diff/src/org/netbeans/modules/diff/EditorBufferSelectorPanel.java
@@ -33,16 +33,19 @@
 import java.util.*;
 import java.io.File;
 import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
 
 /**
  *
  * @author Maros Sandor
  */
-class EditorBufferSelectorPanel extends JPanel implements ListSelectionListener {
+class EditorBufferSelectorPanel extends JPanel implements ListSelectionListener, PropertyChangeListener {
     
     private final JFileChooser fileChooser;
     private final FileObject peer;
     private JList elementsList;
+    private FileObject selectedEditorFile;
 
     /** Creates new form EditorBufferSelectorPanel 
      * @param fileChooser*/
@@ -51,6 +54,7 @@
         this.peer = peer;
         initComponents();
         initEditorDocuments();
+        fileChooser.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY, this);
     }
 
     private void initEditorDocuments() {
@@ -125,12 +129,35 @@
         EditorListElement element = (EditorListElement) elementsList.getSelectedValue();
         if (element != null) {
             File file = FileUtil.toFile(element.fileObject);
-            fileChooser.setSelectedFile(file);
+            if (file != null) {
+                fileChooser.setSelectedFile(file);
+            } else {
+                /*FileObject may not be disk file but a remote file. Following line serves only to 
+                   enable open action on JFileChooser. The URL gets prefixed with current directory
+                   and cannot be used to get FileObject from File
+                 */
+                fileChooser.setSelectedFile(new File(element.fileObject.toURL().toString()));
+            }
+            selectedEditorFile = element.fileObject;
         } else {
             File file = new File("");
             fileChooser.setSelectedFile(file);
+            selectedEditorFile = null;
         }
     }
+    
+    @Override
+    public void propertyChange(PropertyChangeEvent evt) {
+        //user has selected a different file from file chooser
+        selectedEditorFile = null;
+    }
+    
+    /**
+     * @return FileObject of the editor tab chosen by the user
+     */
+    public final FileObject getSelectedEditorFile() {
+        return selectedEditorFile;
+    }
 
     /** This method is called from within the constructor to
      * initialize the form.
diff --git a/java/java.editor/src/org/netbeans/modules/java/editor/imports/ComputeImports.java b/java/java.editor/src/org/netbeans/modules/java/editor/imports/ComputeImports.java
index d0ec54a..03891c3 100644
--- a/java/java.editor/src/org/netbeans/modules/java/editor/imports/ComputeImports.java
+++ b/java/java.editor/src/org/netbeans/modules/java/editor/imports/ComputeImports.java
@@ -630,7 +630,10 @@
                     if (type != null && type.getKind() == TypeKind.PACKAGE) {
                         //does the package really exists?
                         String s = ((PackageElement) el).getQualifiedName().toString();
-                        if (info.getElements().getPackageElement(s) == null) {
+                        Element thisPack = info.getTrees().getElement(new TreePath(info.getCompilationUnit()));
+                        ModuleElement module = thisPack != null ? info.getElements().getModuleOf(thisPack) : null;
+                        PackageElement pack = module != null ? info.getElements().getPackageElement(module, s) : info.getElements().getPackageElement(s);
+                        if (pack == null) {
                             //probably situation like:
                             //Map.Entry e;
                             //where Map is not imported
diff --git a/java/java.editor/test/unit/src/org/netbeans/modules/java/editor/imports/ComputeImportsTest.java b/java/java.editor/test/unit/src/org/netbeans/modules/java/editor/imports/ComputeImportsTest.java
index b68de31..423a066 100644
--- a/java/java.editor/test/unit/src/org/netbeans/modules/java/editor/imports/ComputeImportsTest.java
+++ b/java/java.editor/test/unit/src/org/netbeans/modules/java/editor/imports/ComputeImportsTest.java
@@ -18,9 +18,20 @@
  */
 package org.netbeans.modules.java.editor.imports;
 
+import java.io.BufferedInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintStream;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -30,6 +41,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.regex.Pattern;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.ExecutableElement;
@@ -82,6 +94,11 @@
         "com.sun.xml.internal.ws.policy.privateutil.PolicyUtils.Collections"
     }));
     
+    private static final List<Pattern> IGNORE_PATTERNS = Collections.unmodifiableList(Arrays.asList(
+        Pattern.compile("jdk\\..*\\.internal\\..*"),
+        Pattern.compile("org\\.graalvm\\..*")
+    ));
+
     private FileObject testSource;
     private JavaSource js;
     private CompilationInfo info;
@@ -217,7 +234,61 @@
         doTest("TestNotImportFieldAsClass");
     }
 
-    private void prepareTest(String capitalizedName, String sourceLevel) throws Exception {
+    public void testJIRA2914a() throws Exception {
+        doTest("test/Test",
+               "11",
+               Arrays.asList(
+                   new FileData("test/Test.java",
+                                "package test;\n" +
+                                "import io.test.IO;\n" +
+                                "public class Test {\n" +
+                                "    IO i1;\n" +
+                                "    io.test.IO i2;\n" +
+                                "}\n"),
+                   new FileData("io/test/IO.java",
+                                "package io.test;\n" +
+                                "public class IO {\n" +
+                                "    public static IO io() { return null; }\n" +
+                                "}\n")
+               ),
+               "",
+               "");
+    }
+
+    public void testJIRA2914b() throws Exception {
+        doTest("test/Test",
+               "11",
+               Arrays.asList(
+                   new FileData("test/Test.java",
+                                "package test;\n" +
+                                "import io.test.IO;\n"),
+                   new FileData("io/test/IO.java",
+                                "package io.test;\n" +
+                                "public class IO {\n" +
+                                "    public static IO io() { return null; }\n" +
+                                "}\n")
+               ),
+               "",
+               "");
+    }
+
+    public void testJIRA2914c() throws Exception {
+        doTest("test/Test",
+               "11",
+               Arrays.asList(
+                   new FileData("test/Test.java",
+                                "import io.test.IO;\n"),
+                   new FileData("io/test/IO.java",
+                                "package io.test;\n" +
+                                "public class IO {\n" +
+                                "    public static IO io() { return null; }\n" +
+                                "}\n")
+               ),
+               "",
+               "");
+    }
+
+    private void prepareTest(String capitalizedName, String sourceLevel, Iterable<FileData> files) throws Exception {
         FileObject workFO = FileUtil.toFileObject(getWorkDir());
         
         assertNotNull(workFO);
@@ -225,35 +296,22 @@
         FileObject sourceRoot = workFO.createFolder("src");
         FileObject buildRoot  = workFO.createFolder("build");
 //        FileObject cache = workFO.createFolder("cache");
-        FileObject packageRoot = FileUtil.createFolder(sourceRoot, "org/netbeans/modules/java/editor/imports/data");
         
         SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cacheFO);
         
-        String testPackagePath = "org/netbeans/modules/java/editor/imports/data/";
-        File   testPackageFile = new File(getDataDir(), testPackagePath);
-        
-        String[] names = testPackageFile.list(new FilenameFilter() {
-            public boolean accept(File dir, String name) {
-                if (name.endsWith(".java"))
-                    return true;
-                
-                return false;
+        for (FileData fd : files) {
+            FileObject target = FileUtil.createData(sourceRoot, fd.fileName);
+            try (OutputStream out = target.getOutputStream();
+                 Writer w = new OutputStreamWriter(out, StandardCharsets.UTF_8)) {
+                w.write(fd.content);
             }
-        });
-        
-        String[] files = new String[names.length];
-        
-        for (int cntr = 0; cntr < files.length; cntr++) {
-            files[cntr] = testPackagePath + names[cntr];
         }
         
-        TestUtil.copyFiles(getDataDir(), FileUtil.toFile(sourceRoot), files);
-        
-        packageRoot.refresh();
+        FileUtil.refreshAll();
         
         SourceUtilsTestUtil.compileRecursively(sourceRoot);
         
-        testSource = packageRoot.getFileObject(capitalizedName + ".java");
+        testSource = sourceRoot.getFileObject(capitalizedName + ".java");
         
         assertNotNull(testSource);
         
@@ -268,7 +326,8 @@
         assertNotNull(info);
     }
     
-    private void dump(PrintStream out, Map<String, List<Element>> set, Set<String> masks) {
+    private String dump(Map<String, List<Element>> set) {
+        StringWriter out = new StringWriter();
         List<String> keys = new LinkedList<String>(set.keySet());
         
         Collections.sort(keys);
@@ -304,14 +363,17 @@
                     fqn = fqnSB.toString();
                 }
                 
-                if (!masks.contains(fqn))
+                if (!IGNORE_CLASSES.contains(fqn) && IGNORE_PATTERNS.stream().noneMatch(p -> p.matcher(fqn).matches())) {
                     fqns.add(fqn);
+                }
             }
             
             Collections.sort(fqns);
             
-            out.println(key + ":" + fqns.toString());
+            out.write(key + ":" + fqns.toString() + "\n");
         }
+
+        return out.toString();
     }
     
     private void doTest(String name) throws Exception {
@@ -319,8 +381,48 @@
     }
     
     private void doTest(String name, String sourceLevel) throws Exception {
-        prepareTest(name, sourceLevel);
+        String testPackagePath = "org/netbeans/modules/java/editor/imports/data/";
+        File   testPackageFile = new File(getDataDir(), testPackagePath);
+        List<FileData> files = new ArrayList<>();
         
+        String[] names = testPackageFile.list(new FilenameFilter() {
+            public boolean accept(File dir, String name) {
+                if (name.endsWith(".java"))
+                    return true;
+
+                return false;
+            }
+        });
+
+        for (int cntr = 0; cntr < names.length; cntr++) {
+            files.add(new FileData(testPackagePath + names[cntr],
+                                   readContent(new File(testPackageFile, names[cntr]))));
+        }
+
+
+        doTest(testPackagePath + name,
+               sourceLevel,
+               files,
+               readContent(getGoldenFile(getName() + "-unfiltered.pass")),
+               readContent(getGoldenFile(getName() + "-filtered.pass")));
+    }
+
+    private String readContent(File file) throws IOException {
+        try (InputStream in = new BufferedInputStream(new FileInputStream(file));
+             Reader r = new InputStreamReader(in, StandardCharsets.UTF_8)) {
+            StringWriter sw = new StringWriter();
+            int read;
+
+            while ((read = r.read()) != (-1)) {
+                sw.write(read);
+            }
+            return sw.toString();
+        }
+    }
+
+    private void doTest(String name, String sourceLevel, Iterable<FileData> files, String unfilteredPass, String filteredPass) throws Exception {
+        prepareTest(name, sourceLevel, files);
+
         DataObject testDO = DataObject.find(testSource);
         EditorCookie ec = testDO.getCookie(EditorCookie.class);
         
@@ -330,12 +432,45 @@
         
         Pair<Map<String, List<Element>>, Map<String, List<Element>>> candidates = new ComputeImports(info).computeCandidates();
         
-        dump(getLog(getName() + "-unfiltered.ref"), candidates.b, IGNORE_CLASSES);
-        dump(getLog(getName() + "-filtered.ref"), candidates.a, IGNORE_CLASSES);
+        assertEquals(unfilteredPass, dump(candidates.b));
+        assertEquals(filteredPass, dump(candidates.a));
+    }
+    
+    private static final class FileData {
+        public final String fileName;
+        public final String content;
 
-        String version = System.getProperty("java.specification.version") + "/";
-        
-        compareReferenceFiles(getName() + "-unfiltered.ref", version + getName() + "-unfiltered.pass", getName() + "-unfiltered.diff");
-        compareReferenceFiles(getName() + "-filtered.ref", version + getName() + "-filtered.pass", getName() + "-filtered.diff");
+        public FileData(String fileName, String content) {
+            this.fileName = fileName;
+            this.content = content;
+        }
+
+    }
+
+    //from CompletionTestBaseBase:
+    private   final String goldenFilePath = "org/netbeans/modules/java/editor/imports/ComputeImportsTest";
+    public File getGoldenFile(String goldenFileName) {
+        File goldenFile = null;
+        String version = System.getProperty("java.specification.version");
+        for (String variant : computeVersionVariantsFor(version)) {
+            goldenFile = new File(getDataDir(), "/goldenfiles/" + goldenFilePath + "/" + variant + "/" + goldenFileName);
+            if (goldenFile.exists())
+                break;
+        }
+        assertNotNull(goldenFile);
+        return goldenFile;
+    }
+
+    private List<String> computeVersionVariantsFor(String version) {
+        int dot = version.indexOf('.');
+        version = version.substring(dot + 1);
+        int versionNum = Integer.parseInt(version);
+        List<String> versions = new ArrayList<>();
+
+        for (int v = versionNum; v >= 8; v--) {
+            versions.add(v != 8 ? "" + v : "1." + v);
+        }
+
+        return versions;
     }
 }
diff --git a/java/maven/src/org/netbeans/modules/maven/newproject/MavenWizardIterator.java b/java/maven/src/org/netbeans/modules/maven/newproject/MavenWizardIterator.java
index 17e684b..7d566a2 100644
--- a/java/maven/src/org/netbeans/modules/maven/newproject/MavenWizardIterator.java
+++ b/java/maven/src/org/netbeans/modules/maven/newproject/MavenWizardIterator.java
@@ -73,11 +73,11 @@
 //        return ArchetypeWizards.definedArchetype("org.apache.maven.archetypes", "maven-archetype-quickstart", "1.1", null, LBL_Maven_Quickstart_Archetype());
 //    }
     
-    @TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position=920, displayName="#LBL_Maven_JavaFx_Archetype", iconBase="org/netbeans/modules/maven/resources/jaricon.png", description="javafx.html")
-    @Messages("LBL_Maven_JavaFx_Archetype=JavaFX Application")
-    public static WizardDescriptor.InstantiatingIterator<?> javafx() {
-        return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "javafx", "0.6", null, LBL_Maven_JavaFx_Archetype());
-    }
+//    @TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position=920, displayName="#LBL_Maven_JavaFx_Archetype", iconBase="org/netbeans/modules/maven/resources/jaricon.png", description="javafx.html")
+//    @Messages("LBL_Maven_JavaFx_Archetype=JavaFX Application")
+//    public static WizardDescriptor.InstantiatingIterator<?> javafx() {
+//        return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "javafx", "0.6", null, LBL_Maven_JavaFx_Archetype());
+//    }
 
 //    @TemplateRegistration(folder=JAVAFX_SAMPLES_TEMPLATE_FOLDER, position=2450, displayName="#LBL_Maven_JavaFx_Sample_Archetype", iconBase="org/netbeans/modules/maven/resources/jaricon.png", description="javafx.html")
 //    @Messages("LBL_Maven_JavaFx_Sample_Archetype=Maven FXML MigPane Sample")
@@ -85,13 +85,13 @@
 //        return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "sample-javafx", "0.5", null, LBL_Maven_JavaFx_Sample_Archetype());
 //    }
     
-    @TemplateRegistration(folder=JAVAFX_SAMPLES_TEMPLATE_FOLDER, position = 925, displayName = "#LBL_Maven_FXML_Archetype", iconBase = "org/netbeans/modules/maven/resources/jaricon.png", description = "javafx.html")
+    @TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position = 925, displayName = "#LBL_Maven_FXML_Archetype", iconBase = "org/netbeans/modules/maven/resources/jaricon.png", description = "javafx.html")
     @Messages("LBL_Maven_FXML_Archetype=FXML JavaFX Maven Archetype (Gluon)")
     public static WizardDescriptor.InstantiatingIterator<?> openJFXFML() {
        return ArchetypeWizards.definedArchetype("org.openjfx", "javafx-archetype-fxml", "0.0.3", null, LBL_Maven_FXML_Archetype());
     }
 
-    @TemplateRegistration(folder=JAVAFX_SAMPLES_TEMPLATE_FOLDER, position = 926, displayName = "#LBL_Maven_Simple_Archetype", iconBase = "org/netbeans/modules/maven/resources/jaricon.png", description = "javafx.html")
+    @TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position = 926, displayName = "#LBL_Maven_Simple_Archetype", iconBase = "org/netbeans/modules/maven/resources/jaricon.png", description = "javafx.html")
     @Messages("LBL_Maven_Simple_Archetype=Simple JavaFX Maven Archetype (Gluon)")
     public static WizardDescriptor.InstantiatingIterator<?> openJFXSimple() {
        return ArchetypeWizards.definedArchetype("org.openjfx", "javafx-archetype-simple", "0.0.3", null, LBL_Maven_Simple_Archetype());
diff --git a/nb/updatecenters/build.xml b/nb/updatecenters/build.xml
index 5bdbfbc..e3c807a 100644
--- a/nb/updatecenters/build.xml
+++ b/nb/updatecenters/build.xml
@@ -44,7 +44,10 @@
           <property name="keystore" location="${netbeans.bundled.ks}"/>
           <property name="storepass" value="${netbeans.bundled.ks}"/>
           <property name="nbm_alias" value="netbeans-bundled"/>
-          <fileset dir="${nb_all}/extra" includes="libs.javafx.*/build.xml"/>
+          <fileset dir="${nb_all}/extra" includes="libs.javafx.*/build.xml,nbjavac*/build.xml"/>
+      </subant>
+      <subant  target="clean" inheritall="false">
+          <fileset dir="${nb_all}/extra" includes="nbjavac*/build.xml"/>
       </subant>
       <exec executable="${java.home}/bin/keytool" failonerror="true">
           <arg value="-exportcert"/>
diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java b/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
index 31bbf68..d144b9a 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
@@ -117,7 +117,7 @@
         // sort all information
         Collections.sort(ri);
         // build a sorted xml
-        
+
         for (ReleaseInfo releaseInfo : ri) {
             log(releaseInfo.toString());
             for (Object milestone : releaseInfo.milestones) {
@@ -191,7 +191,7 @@
             throw new BuildException("Properties File for release cannot be created");
         }
 
-        log("Writing releasinfo file " + xmlFile );
+        log("Writing releasinfo file " + xmlFile);
 
         xmlFile.getParentFile().mkdirs();
         try (OutputStream config = new FileOutputStream(xmlFile)) {
@@ -385,11 +385,7 @@
         }
 
         private void setVersion(String version) {
-            if (version.equals("-")) {
-                this.version = "dev";
-            } else {
-                this.version = version;
-            }
+            this.version = version;
         }
 
         private void setApidocurl(String apidocurl) {
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
index a8b68cf..0606ae0 100644
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -116,13 +116,13 @@
         </not>
     </condition>
     <get dest="${metabuild.releasejson}" skipexisting="false" src="${metabuild.jsonurl}" />
-    <!-- get branches and git information -->
-    <antcall target="getgitinformation" />
-    <!-- javadoc content filtering -->
-    <taskdef name="setjavadoc" classname="org.netbeans.nbbuild.SetApidocClustersConfig" classpath="${nbantext.jar}"/>
     <!-- read info from gitinfo.properties , if present in source bundle copy gitinfo-->
     <copy file="${nb_all}/nbbuild/gitinfo.properties" tofile="${nb_all}/nbbuild/build/gitinfo.properties" failonerror="false"/>
     <copy file="${nb_all}/nbbuild/netbeansrelease.properties" tofile="${nb_all}/nbbuild/build/netbeansrelease.properties" failonerror="false"/>
+    <!-- get branches and git information as previous not overrided this will take new-->
+    <antcall target="getgitinformation" />
+    <!-- javadoc content filtering -->
+    <taskdef name="setjavadoc" classname="org.netbeans.nbbuild.SetApidocClustersConfig" classpath="${nbantext.jar}"/>
     <property file="${nb_all}/nbbuild/build/gitinfo.properties"/>
     <property file="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
     <setjavadoc branch="${metabuild.branch}"/>
@@ -139,13 +139,12 @@
         </classpath>
     </taskdef>
     <releasejson file="${releasejson}" xmloutput="${xmlrelease}" propertiesoutput="${propertiesrelease}" branch="${metabuild.branch}" hash="${metabuild.hash}"/>
-    <!--<fail />-->
   </target>
   <target name="-gitinfo.ispresent">
       <available file="${nb_all}/nbbuild/build/gitinfo.properties" property="gitinfo.present" />      
   </target>
   <target name="-git.down" unless="${gitinfo.present}" depends="-gitinfo.ispresent">
-      <!-- try to get information from jenkins or travis -->
+      <!-- try to get information from jenkins apache multi branch build or travis -->
       <property environment="env"/>
       <condition property="metabuild.branch" value="${env.GIT_BRANCH}" >
           <isset property="env.GIT_BRANCH" />
diff --git a/nbbuild/default.xml b/nbbuild/default.xml
index d8ae9d8..b0a5a4d 100644
--- a/nbbuild/default.xml
+++ b/nbbuild/default.xml
@@ -162,7 +162,12 @@
     <tstamp>
     	<format property="buildday" pattern="d MMM yyyy" locale="en" />
     </tstamp>
-
+    <condition property="buildnumber" value="${metabuild.RawVersion}-${metabuild.hash}">
+        <and>
+            <isset property="metabuild.hash" />
+            <isset property="metabuild.RawVersion" />
+        </and>
+    </condition>
     <property environment="hudson"/>
     <condition property="buildnumber" value="${hudson.JOB_NAME}-${hudson.BUILD_NUMBER}-on-${buildstamp}">
       <and>
@@ -172,7 +177,7 @@
     </condition>
     <hgid property="hg.id" file="."/>
     <property name="buildnumber" value="${buildstamp}-${hg.id}"/>
-    <echo message="${buildnumber}" level="verbose"/>
+    <echo message="Build number : ${buildnumber}" />
   </target>
   <target name="set-buildnumber" depends="-do-set-buildnumber">
     <!-- Overridable. Note: need not necessarily be a number at all): -->
diff --git a/nbbuild/packaging/netbeans_snap/snap/snapcraft.yaml b/nbbuild/packaging/netbeans_snap/snap/snapcraft.yaml
index 52328d2..d79f0bb 100644
--- a/nbbuild/packaging/netbeans_snap/snap/snapcraft.yaml
+++ b/nbbuild/packaging/netbeans_snap/snap/snapcraft.yaml
@@ -40,6 +40,7 @@
     override-pull: |
       snapcraftctl pull
       snapcraftctl set-version "${VERSION}"
+    parse-info: []
       
   build:
     build-attributes: [ no-patchelf ]
diff --git a/nbbuild/templates/common.xml b/nbbuild/templates/common.xml
index 1182ee1..e917424 100644
--- a/nbbuild/templates/common.xml
+++ b/nbbuild/templates/common.xml
@@ -435,7 +435,7 @@
         <mkdir dir="${build.dir}"/>
         <property name="nbm.target.cluster" value=""/> <!-- fallback -->
         <property name="license.file.override" value="${license.file}"/>
-        <property name="use.pack200" value="true"/>
+        <property name="use.pack200" value="false"/>
         <property name="pack200.excludes" value=""/>
         <property name="nbm.locales" value="${locales}"/>
         <makenbm file="${build.dir}/${nbm}"