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

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


The following commit(s) were added to 
refs/heads/jtulach/BuildNetBeansWithNbJavac by this push:
     new c8be6424ea Support absolute path in nbjavac.class.path property
c8be6424ea is described below

commit c8be6424eaea456ba1f730afec9577e03afbe103
Author: Jaroslav Tulach <[email protected]>
AuthorDate: Sat Mar 11 06:39:45 2023 +0100

    Support absolute path in nbjavac.class.path property
---
 nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java 
b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
index ad39233960..2e17b218d4 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
@@ -297,13 +297,19 @@ public class CustomJavac extends Javac {
             Object c = System.getProperties().get(MAIN_COMPILER_CLASS);
             if (!(c instanceof Class<?>)) {
                 FileSet fs = new FileSet();
-                String nball = prj.getProperty("nb_all");
-                if (nball != null) {
-                    fs.setDir(new File(nball));
+                final File cpPath = new File(cp);
+                if (cpPath.isAbsolute()) {
+                    fs.setDir(cpPath.getParentFile());
+                    fs.setIncludes(cpPath.getName());
                 } else {
-                    fs.setDir(prj.getBaseDir());
+                    String nball = prj.getProperty("nb_all");
+                    if (nball != null) {
+                        fs.setDir(new File(nball));
+                    } else {
+                        fs.setDir(prj.getBaseDir());
+                    }
+                    fs.setIncludes(cp);
                 }
-                fs.setIncludes(cp);
                 List<URL> urls = new ArrayList<>();
                 final DirectoryScanner scan = fs.getDirectoryScanner(prj);
                 File base = scan.getBasedir();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to