This is an automated email from the ASF dual-hosted git repository.

sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new ee2ad24  [NETBEANS-2577] Prevent Maven libraries from being exluded
     new 4a8d8bf  Merge pull request #1271 from 
sdedic/bugfix/2577-filtering_modules
ee2ad24 is described below

commit ee2ad247a45cc9d177a11a9c932cf27ade4f8b34
Author: Svata Dedic <svatopluk.de...@oracle.com>
AuthorDate: Thu May 30 15:01:01 2019 +0200

    [NETBEANS-2577] Prevent Maven libraries from being exluded
---
 .../org/netbeans/nbbuild/ModuleSelector.java       | 36 +++++++++++-----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java 
b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
index 321c156..fbe61a4 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleSelector.java
@@ -78,24 +78,6 @@ public final class ModuleSelector extends BaseExtendSelector 
{
         }
         
         String module = null;
-        if (file.getName().endsWith(".jar")) {
-            try (JarFile jar = new JarFile(file)) {
-                Manifest m = jar.getManifest();
-                if (m != null) {
-                    module = m.getMainAttributes().getValue("OpenIDE-Module"); 
// NOI18N
-                    if (module == null && !isExt(file)) {
-                        module = 
m.getMainAttributes().getValue("Bundle-SymbolicName"); // NOI18N
-                        int semicolon = module == null ? -1 : 
module.indexOf(';');
-                        if (semicolon >= 0) {
-                            module = module.substring(0, semicolon);
-                        }
-                    }
-                }
-            } catch (IOException ex) {
-                throw new BuildException("Problem with " + file + ": " + ex, 
ex, getLocation());
-            }
-        }
-
         String name = file.getName();
         File p = file.getParentFile();
         for(;;) {
@@ -124,6 +106,24 @@ public final class ModuleSelector extends 
BaseExtendSelector {
             name = p.getName() + '/' + name;
             p = p.getParentFile();
         }
+
+        if (module == null && name.endsWith(".jar")) {
+            try (JarFile jar = new JarFile(file)) {
+                Manifest m = jar.getManifest();
+                if (m != null) {
+                    module = m.getMainAttributes().getValue("OpenIDE-Module"); 
// NOI18N
+                    if (module == null && !isExt(file)) {
+                        module = 
m.getMainAttributes().getValue("Bundle-SymbolicName"); // NOI18N
+                        int semicolon = module == null ? -1 : 
module.indexOf(';');
+                        if (semicolon >= 0) {
+                            module = module.substring(0, semicolon);
+                        }
+                    }
+                }
+            } catch (IOException ex) {
+                throw new BuildException("Problem with " + file + ": " + ex, 
ex, getLocation());
+            }
+        }
         
         if (module == null) {
             log("No module in: " + file, Project.MSG_VERBOSE);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to