This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 49113
Collapse All | Expand All

(-)src/org/netbeans/modules/ant/freeform/Classpaths.java (-3 / +8 lines)
Lines 380-386 Link Here
380
        return Arrays.asList(pathURL);
380
        return Arrays.asList(pathURL);
381
    }
381
    }
382
    
382
    
383
    private List/*<URL>*/ createExecuteClasspath(Element compilationUnitEl) {
383
    private List/*<URL>*/ createExecuteClasspath(List/*<String>*/ packageRoots, Element compilationUnitEl) {
384
        Iterator/*<Element>*/ it = Util.findSubElements(compilationUnitEl).iterator();
384
        Iterator/*<Element>*/ it = Util.findSubElements(compilationUnitEl).iterator();
385
        while (it.hasNext()) {
385
        while (it.hasNext()) {
386
            Element e = (Element)it.next();
386
            Element e = (Element)it.next();
Lines 390-396 Link Here
390
        }
390
        }
391
        // None specified; assume it is same as compile classpath.
391
        // None specified; assume it is same as compile classpath.
392
        // XXX but add built-to dirs
392
        // XXX but add built-to dirs
393
        return createCompileClasspath(compilationUnitEl);
393
        List urls = new ArrayList();
394
        // #49113 - EXECUTE classpath needs to contains also bundles etc.
395
        // Add source package roots to resolve that.
396
        urls.addAll(createSourcePath(packageRoots));
397
        urls.addAll(createCompileClasspath(compilationUnitEl));
398
        return urls;
394
    }
399
    }
395
    
400
    
396
    private List/*<URL>*/ createBootClasspath(Element compilationUnitEl) {
401
    private List/*<URL>*/ createBootClasspath(Element compilationUnitEl) {
Lines 515-521 Link Here
515
            } else if (type.equals(ClassPath.COMPILE)) {
520
            } else if (type.equals(ClassPath.COMPILE)) {
516
                roots = createCompileClasspath(compilationUnitEl);
521
                roots = createCompileClasspath(compilationUnitEl);
517
            } else if (type.equals(ClassPath.EXECUTE)) {
522
            } else if (type.equals(ClassPath.EXECUTE)) {
518
                roots = createExecuteClasspath(compilationUnitEl);
523
                roots = createExecuteClasspath(packageRootNames, compilationUnitEl);
519
            } else {
524
            } else {
520
                assert type.equals(ClassPath.BOOT) : type;
525
                assert type.equals(ClassPath.BOOT) : type;
521
                roots = createBootClasspath(compilationUnitEl);
526
                roots = createBootClasspath(compilationUnitEl);

Return to bug 49113