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 170056
Collapse All | Expand All

(-)a/ant.debugger/nbproject/project.xml (+1 lines)
Lines 48-53 Link Here
48
            <module-dependencies>
48
            <module-dependencies>
49
                <dependency>
49
                <dependency>
50
                    <code-name-base>org.apache.tools.ant.module</code-name-base>
50
                    <code-name-base>org.apache.tools.ant.module</code-name-base>
51
                    <build-prerequisite/>
51
                    <compile-dependency/>
52
                    <compile-dependency/>
52
                    <run-dependency>
53
                    <run-dependency>
53
                        <release-version>3</release-version>
54
                        <release-version>3</release-version>
(-)a/apisupport.ant/nbproject/project.properties (-1 / +1 lines)
Lines 39-44 Link Here
39
39
40
antsrc.cp=\
40
antsrc.cp=\
41
    ${ant.core.lib}:\
41
    ${ant.core.lib}:\
42
    ${o.n.core.dir}/core/core.jar
42
    ${core.startup.dir}/core/core.jar
43
43
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
(-)a/apisupport.harness/nbproject/project.properties (+1 lines)
Lines 42-47 Link Here
42
jnlp.cp=\
42
jnlp.cp=\
43
    ${o.n.bootstrap.dir}/lib/boot.jar:\
43
    ${o.n.bootstrap.dir}/lib/boot.jar:\
44
    ${openide.modules.dir}/lib/org-openide-modules.jar:\
44
    ${openide.modules.dir}/lib/org-openide-modules.jar:\
45
    ${openide.util.dir}/lib/org-openide-util-lookup.jar:\
45
    ${openide.util.dir}/lib/org-openide-util.jar
46
    ${openide.util.dir}/lib/org-openide-util.jar
46
47
47
release.../nbbuild/templates/common.xml=common.xml
48
release.../nbbuild/templates/common.xml=common.xml
(-)a/autoupdate.pluginimporter/nbproject/project.xml (-1 / +10 lines)
Lines 33-38 Link Here
33
                </dependency>
33
                </dependency>
34
                <dependency>
34
                <dependency>
35
                    <code-name-base>org.netbeans.modules.autoupdate.ui</code-name-base>
35
                    <code-name-base>org.netbeans.modules.autoupdate.ui</code-name-base>
36
                    <build-prerequisite/>
36
                    <compile-dependency/>
37
                    <compile-dependency/>
37
                    <run-dependency>
38
                    <run-dependency>
38
                        <specification-version>1.6</specification-version>
39
                        <specification-version>1.6</specification-version>
Lines 75-81 Link Here
75
                    <build-prerequisite/>
76
                    <build-prerequisite/>
76
                    <compile-dependency/>
77
                    <compile-dependency/>
77
                    <run-dependency>
78
                    <run-dependency>
78
                        <specification-version>7.22</specification-version>
79
                        <specification-version>8.0</specification-version>
80
                    </run-dependency>
81
                </dependency>
82
                <dependency>
83
                    <code-name-base>org.openide.util.lookup</code-name-base>
84
                    <build-prerequisite/>
85
                    <compile-dependency/>
86
                    <run-dependency>
87
                        <specification-version>8.0</specification-version>
79
                    </run-dependency>
88
                    </run-dependency>
80
                </dependency>
89
                </dependency>
81
                <dependency>
90
                <dependency>
(-)a/core.startup/nbproject/project.xml (+8 lines)
Lines 79-84 Link Here
79
                        <implementation-version/>
79
                        <implementation-version/>
80
                    </run-dependency>
80
                    </run-dependency>
81
                </dependency>
81
                </dependency>
82
                <dependency>
83
                    <code-name-base>org.openide.util.lookup</code-name-base>
84
                    <build-prerequisite/>
85
                    <compile-dependency/>
86
                    <run-dependency>
87
                        <implementation-version/>
88
                    </run-dependency>
89
                </dependency>
82
            </module-dependencies>
90
            </module-dependencies>
83
            <test-dependencies>
91
            <test-dependencies>
84
                <test-type>
92
                <test-type>
(-)a/db/nbproject/project.properties (+1 lines)
Lines 51-56 Link Here
51
fake-jdbc-40.build=${fake-jdbc-40}/build
51
fake-jdbc-40.build=${fake-jdbc-40}/build
52
lib.cp=\
52
lib.cp=\
53
    ${fake-jdbc-40.build}:\
53
    ${fake-jdbc-40.build}:\
54
    ${openide.util.lookup.dir}/lib/org-openide-util-lookup.jar:\
54
    ${openide.util.dir}/lib/org-openide-util.jar:\
55
    ${openide.util.dir}/lib/org-openide-util.jar:\
55
    ${openide.dialogs.dir}/modules/org-openide-dialogs.jar:\
56
    ${openide.dialogs.dir}/modules/org-openide-dialogs.jar:\
56
    ${openide.io.dir}/modules/org-openide-io.jar
57
    ${openide.io.dir}/modules/org-openide-io.jar
(-)a/gsfpath.api/nbproject/project.properties (-1 lines)
Lines 40-43 Link Here
40
is.autoload=true
40
is.autoload=true
41
javac.compilerargs=-Xlint:unchecked
41
javac.compilerargs=-Xlint:unchecked
42
javac.source=1.5
42
javac.source=1.5
43
test.unit.run.cp.extra=${o.n.core.dir}/lib/boot.jar:${o.n.core.dir}/core/core.jar
(-)a/j2ee.sun.appsrv81/appsrvbridge/nbproject/project.properties (+2 lines)
Lines 28-33 Link Here
28
file.reference.org-openide-explorer.jar=../../nbbuild/netbeans/platform11/modules/org-openide-explorer.jar
28
file.reference.org-openide-explorer.jar=../../nbbuild/netbeans/platform11/modules/org-openide-explorer.jar
29
file.reference.org-openide-nodes.jar=../../nbbuild/netbeans/platform11/modules/org-openide-nodes.jar
29
file.reference.org-openide-nodes.jar=../../nbbuild/netbeans/platform11/modules/org-openide-nodes.jar
30
file.reference.org-openide-util.jar=../../nbbuild/netbeans/platform11/lib/org-openide-util.jar
30
file.reference.org-openide-util.jar=../../nbbuild/netbeans/platform11/lib/org-openide-util.jar
31
file.reference.org-openide-util-lookup.jar=../../nbbuild/netbeans/platform11/lib/org-openide-util-lookup.jar
31
application.args=
32
application.args=
32
build.classes.dir=${build.dir}/classes
33
build.classes.dir=${build.dir}/classes
33
build.classes.excludes=**/*.java,**/*.form
34
build.classes.excludes=**/*.java,**/*.form
Lines 56-61 Link Here
56
    ${file.reference.org-netbeans-modules-j2ee-sun-appsrv.jar}:\
57
    ${file.reference.org-netbeans-modules-j2ee-sun-appsrv.jar}:\
57
    ${file.reference.org-netbeans-modules-schema2beans.jar}:\
58
    ${file.reference.org-netbeans-modules-schema2beans.jar}:\
58
    ${file.reference.org-openide-util.jar}:\
59
    ${file.reference.org-openide-util.jar}:\
60
    ${file.reference.org-openide-util-lookup.jar}:\
59
    ${file.reference.org-openide-nodes.jar}:\
61
    ${file.reference.org-openide-nodes.jar}:\
60
    ${file.reference.org-openide-dialogs.jar}:\
62
    ${file.reference.org-openide-dialogs.jar}:\
61
    ${file.reference.org-openide-actions.jar}:\
63
    ${file.reference.org-openide-actions.jar}:\
(-)a/jemmy/nbproject/project.properties (-1 lines)
Lines 39-45 Link Here
39
is.autoload=true
39
is.autoload=true
40
javac.compilerargs=-Xlint -Xlint:-serial
40
javac.compilerargs=-Xlint -Xlint:-serial
41
javac.source=1.5
41
javac.source=1.5
42
test.unit.cp.extra=${ant.core.lib}
43
release.external/jemmy-2.3.0.0.jar=modules/ext/jemmy-2.3.0.0.jar
42
release.external/jemmy-2.3.0.0.jar=modules/ext/jemmy-2.3.0.0.jar
44
sigtest.gen.fail.on.error=false
43
sigtest.gen.fail.on.error=false
45
44
(-)a/nbbuild/antsrc/org/netbeans/nbbuild/FixDependencies.java (-15 / +65 lines)
Lines 66-72 Link Here
66
    /** files to fix */
66
    /** files to fix */
67
    private FileSet set;
67
    private FileSet set;
68
    /** verify target */
68
    /** verify target */
69
    private String target;
69
    private String tgt;
70
    /** clean target */
70
    /** clean target */
71
    private String clean;
71
    private String clean;
72
    /** relative path from module file to build script to use for verification */
72
    /** relative path from module file to build script to use for verification */
Lines 75-80 Link Here
75
    private boolean onlyChanged;
75
    private boolean onlyChanged;
76
    /** fail on error */
76
    /** fail on error */
77
    private boolean fail;
77
    private boolean fail;
78
    private boolean doSanity = true;
78
    
79
    
79
    
80
    
80
    /** tasks to be executed */
81
    /** tasks to be executed */
Lines 95-103 Link Here
95
        this.set = new FileSet();
96
        this.set = new FileSet();
96
        return this.set;
97
        return this.set;
97
    }
98
    }
99
100
    public void setSanityCheck(boolean s) {
101
        doSanity = s;
102
    }
98
    
103
    
99
    public void setBuildTarget (String s) {
104
    public void setBuildTarget (String s) {
100
        target = s;
105
        tgt = s;
101
    }
106
    }
102
    
107
    
103
    public void setCleanTarget (String s) {
108
    public void setCleanTarget (String s) {
Lines 116-121 Link Here
116
        fail = b;
121
        fail = b;
117
    }
122
    }
118
123
124
    @Override
119
    public void execute () throws org.apache.tools.ant.BuildException {
125
    public void execute () throws org.apache.tools.ant.BuildException {
120
        FileScanner scan = this.set.getDirectoryScanner(getProject());
126
        FileScanner scan = this.set.getDirectoryScanner(getProject());
121
        File dir = scan.getBasedir();
127
        File dir = scan.getBasedir();
Lines 128-134 Link Here
128
            File script = null;
134
            File script = null;
129
            Ant task = null;
135
            Ant task = null;
130
            Ant cleanTask = null;
136
            Ant cleanTask = null;
131
            if (ant != null && target != null) {
137
            if (ant != null && tgt != null) {
132
                task = (org.apache.tools.ant.taskdefs.Ant)getProject ().createTask ("ant");
138
                task = (org.apache.tools.ant.taskdefs.Ant)getProject ().createTask ("ant");
133
                script = FileUtils.getFileUtils().resolveFile(xml, ant);
139
                script = FileUtils.getFileUtils().resolveFile(xml, ant);
134
                if (!script.exists ()) {
140
                if (!script.exists ()) {
Lines 141-147 Link Here
141
                }
147
                }
142
                task.setAntfile (script.getPath ());
148
                task.setAntfile (script.getPath ());
143
                task.setDir (script.getParentFile ());
149
                task.setDir (script.getParentFile ());
144
                task.setTarget (target);
150
                task.setTarget (tgt);
145
                if (clean != null) {
151
                if (clean != null) {
146
                    cleanTask = (Ant) getProject().createTask("ant");
152
                    cleanTask = (Ant) getProject().createTask("ant");
147
                    cleanTask.setAntfile (script.getPath ());
153
                    cleanTask.setAntfile (script.getPath ());
Lines 155-168 Link Here
155
                        log ("Cleaning " + clean + " in " + script, org.apache.tools.ant.Project.MSG_INFO);
161
                        log ("Cleaning " + clean + " in " + script, org.apache.tools.ant.Project.MSG_INFO);
156
                        cleanTask.execute ();
162
                        cleanTask.execute ();
157
                    }
163
                    }
158
                    log ("Sanity check executes " + target + " in " + script, org.apache.tools.ant.Project.MSG_INFO);
164
                    if (doSanity) {
159
                    task.execute ();
165
                        log ("Sanity check executes " + tgt + " in " + script, org.apache.tools.ant.Project.MSG_INFO);
166
                        task.execute ();
167
                    }
160
                } catch (BuildException ex) {
168
                } catch (BuildException ex) {
161
                    if (fail) {
169
                    if (fail) {
162
                        throw ex;
170
                        throw ex;
163
                    }
171
                    }
164
172
165
                    log("Skipping. Could not execute " + target + " in " + script, org.apache.tools.ant.Project.MSG_ERR);
173
                    log("Skipping. Could not execute " + tgt + " in " + script, org.apache.tools.ant.Project.MSG_ERR);
166
                    continue;
174
                    continue;
167
                }
175
                }
168
            }
176
            }
Lines 199-206 Link Here
199
        data = null;
207
        data = null;
200
208
201
        for (Replace r : replaces) {
209
        for (Replace r : replaces) {
202
            int idx = stream.indexOf ("<code-name-base>" + r.codeNameBase + "</code-name-base>");
210
            int md = stream.indexOf("<module-dependencies");
203
            if (idx == -1) continue;
211
            if (md == -1) {
212
                throw new BuildException("No module dependencies in " + file);
213
            }
214
215
            int ed = stream.indexOf ("</module-dependencies>", md);
216
            ed = ed == -1 ? stream.indexOf ("<module-dependencies/>", md) : ed;
217
            if (ed == -1) {
218
                ed = stream.length();
219
            }
220
221
            int idx = stream.indexOf ("<code-name-base>" + r.codeNameBase + "</code-name-base>", md);
222
            if (idx == -1 || idx > ed) continue;
204
            
223
            
205
            int from = stream.lastIndexOf ("<dependency>", idx);
224
            int from = stream.lastIndexOf ("<dependency>", idx);
206
            if (from == -1) throw new BuildException ("No <dependency> tag before index " + idx);
225
            if (from == -1) throw new BuildException ("No <dependency> tag before index " + idx);
Lines 220-227 Link Here
220
            sb.append (stream.substring (0, from));
239
            sb.append (stream.substring (0, from));
221
            
240
            
222
            for (Module m : r.modules) {
241
            for (Module m : r.modules) {
223
                if (stream.indexOf ("<code-name-base>" + m.codeNameBase + "</code-name-base>") != -1) {
242
                if (m.codeNameBase.equals(r.codeNameBase)) {
224
                    continue;
243
                    if (remove.contains("<implementation-version/>")) {
244
                        return false;
245
                    }
246
247
                    String b = "<specification-version>";
248
                    int specBeg = remove.indexOf(b);
249
                    int specEnd = remove.indexOf("</specification-version>");
250
                    if (specBeg != -1 && specEnd != -1) {
251
                        String v = remove.substring(specBeg + b.length(), specEnd);
252
                        if (olderThanOrEqual(m.specVersion, v)) {
253
                            return false;
254
                        }
255
                    }
256
                } else {
257
                    if (stream.indexOf ("<code-name-base>" + m.codeNameBase + "</code-name-base>") != -1) {
258
                        continue;
259
                    }
225
                }
260
                }
226
261
227
                int beg = remove.indexOf (r.codeNameBase);
262
                int beg = remove.indexOf (r.codeNameBase);
Lines 263-269 Link Here
263
    private void simplify (
298
    private void simplify (
264
        File file, File script, org.apache.tools.ant.taskdefs.Ant task, org.apache.tools.ant.taskdefs.Ant cleanTask
299
        File file, File script, org.apache.tools.ant.taskdefs.Ant task, org.apache.tools.ant.taskdefs.Ant cleanTask
265
    ) throws IOException, BuildException {
300
    ) throws IOException, BuildException {
266
        if (ant == null || target == null) {
301
        if (ant == null || tgt == null) {
267
            return;
302
            return;
268
        }
303
        }
269
        
304
        
Lines 328-334 Link Here
328
363
329
            String result;
364
            String result;
330
            try {
365
            try {
331
                log ("Executing target " + target + " in " + script, Project.MSG_INFO);
366
                log ("Executing target " + tgt + " in " + script, Project.MSG_INFO);
332
                task.execute ();
367
                task.execute ();
333
                result = "Ok";
368
                result = "Ok";
334
                success.append (dep);
369
                success.append (dep);
Lines 349-358 Link Here
349
            fw.close ();
384
            fw.close ();
350
        }
385
        }
351
        
386
        
352
        log ("Final verification runs " + target + " in " + script, Project.MSG_INFO);
387
        log ("Final verification runs " + tgt + " in " + script, Project.MSG_INFO);
353
        // now verify, if there is a failure then something is wrong now
388
        // now verify, if there is a failure then something is wrong now
354
        task.execute ();
389
        task.execute ();
355
        
356
        if (success.length () == 0) {
390
        if (success.length () == 0) {
357
            log ("No dependencies removed from " + script);
391
            log ("No dependencies removed from " + script);
358
        } else {
392
        } else {
Lines 367-372 Link Here
367
        return from;
401
        return from;
368
    }
402
    }
369
403
404
    private static boolean olderThanOrEqual(String v1, String v2) {
405
        String[] arr1 = v1.split("\\.");
406
        String[] arr2 = v2.split("\\.");
407
        int min = Math.min(arr1.length, arr2.length);
408
        for (int i = 0; i < min; i++) {
409
            int i1 = Integer.parseInt(arr1[i]);
410
            int i2 = Integer.parseInt(arr2[i]);
411
412
            if (i1 == i2) {
413
                continue;
414
            }
415
            return i1 < i2;
416
        }
417
        return arr1.length <= arr2.length;
418
    }
419
370
    public static final class Replace extends Object {
420
    public static final class Replace extends Object {
371
        String codeNameBase;
421
        String codeNameBase;
372
        List<Module> modules = new ArrayList<Module>();
422
        List<Module> modules = new ArrayList<Module>();
(-)a/nbbuild/antsrc/org/netbeans/nbbuild/FixTestDependencies.java (-18 / +63 lines)
Lines 56-61 Link Here
56
import java.util.Set;
56
import java.util.Set;
57
import java.util.StringTokenizer;
57
import java.util.StringTokenizer;
58
import java.util.TreeSet;
58
import java.util.TreeSet;
59
import java.util.regex.Matcher;
60
import java.util.regex.Pattern;
59
import org.apache.tools.ant.BuildException;
61
import org.apache.tools.ant.BuildException;
60
import org.apache.tools.ant.Task;
62
import org.apache.tools.ant.Task;
61
63
Lines 129-139 Link Here
129
                if (cnb.length() <= 0) {
131
                if (cnb.length() <= 0) {
130
                    throw new BuildException("Invalid codename base:" + cnb);
132
                    throw new BuildException("Invalid codename base:" + cnb);
131
                }
133
                }
134
                final boolean td = xml.contains("<test-dependencies>");
132
                // test if project.xml contains test-deps
135
                // test if project.xml contains test-deps
133
                if (xml.contains("<test-dependencies>") && !testFix) {
136
                if (td && !testFix) {
134
                    // yes -> exit
137
                    // yes -> exit
135
                    log("<test-dependencies> already exists.");
138
                    xml = fixOpenideUtil(xml);
136
                    log("update only schema version");
137
                    PrintStream ps = new PrintStream(projectXmlFile);
139
                    PrintStream ps = new PrintStream(projectXmlFile);
138
                    ps.print(xml);
140
                    ps.print(xml);
139
                    ps.close();                  
141
                    ps.close();                  
Lines 153-162 Link Here
153
                Set<String> runtimeTestCNB = new TreeSet<String>();
155
                Set<String> runtimeTestCNB = new TreeSet<String>();
154
156
155
                Properties projectProperties = getTestProperties();
157
                Properties projectProperties = getTestProperties();
156
                readCodeNameBases(compileCNB,compileTestCNB,projectProperties,"test.unit.cp",allCnbs,entries);
158
                boolean found;
157
                readCodeNameBases(compileCNB,compileTestCNB,projectProperties,"test.unit.cp.extra",allCnbs,entries);
159
                found = readCodeNameBases(compileCNB,compileTestCNB,projectProperties,"test.unit.cp",allCnbs,entries);
158
                readCodeNameBases(runtimeCNB,runtimeTestCNB,projectProperties,"test.unit.run.cp",allCnbs,entries);
160
                found |= readCodeNameBases(compileCNB,compileTestCNB,projectProperties,"test.unit.cp.extra",allCnbs,entries);
159
                readCodeNameBases(runtimeCNB,runtimeTestCNB,projectProperties,"test.unit.run.cp.extra",allCnbs,entries);
161
                found |= readCodeNameBases(runtimeCNB,runtimeTestCNB,projectProperties,"test.unit.run.cp",allCnbs,entries);
162
                found |= readCodeNameBases(runtimeCNB,runtimeTestCNB,projectProperties,"test.unit.run.cp.extra",allCnbs,entries);
163
164
                if (!found && !td) {
165
                    return;
166
                }
167
160
                updateProperties(projectProperties,new String[]{"test.unit.cp","test.unit.cp.extra","test.unit.run.cp","test.unit.run.cp.extra"});
168
                updateProperties(projectProperties,new String[]{"test.unit.cp","test.unit.cp.extra","test.unit.run.cp","test.unit.run.cp.extra"});
161
169
162
                StringWriter writer = new StringWriter();
170
                StringWriter writer = new StringWriter();
Lines 220-226 Link Here
220
                resultXml.append(xml.substring(moduleDepEnd + 1, xml.length()));
228
                resultXml.append(xml.substring(moduleDepEnd + 1, xml.length()));
221
                if (!testFix) {
229
                if (!testFix) {
222
                   PrintStream ps = new PrintStream(projectXmlFile);
230
                   PrintStream ps = new PrintStream(projectXmlFile);
223
                   ps.print(resultXml);
231
                   ps.print(fixOpenideUtil(resultXml.toString()));
224
                   ps.close();
232
                   ps.close();
225
                } else {
233
                } else {
226
                    System.out.println(resultXml);
234
                    System.out.println(resultXml);
Lines 255-261 Link Here
255
    }
263
    }
256
    /** parses all codenamebases from path
264
    /** parses all codenamebases from path
257
     */
265
     */
258
     void readCodeNameBases(Set<String> compileCNB,
266
     boolean readCodeNameBases(Set<String> compileCNB,
259
            Set <String> testsCNB,
267
            Set <String> testsCNB,
260
            Properties projectPropertis,
268
            Properties projectPropertis,
261
            String property,
269
            String property,
Lines 343-349 Link Here
343
                }
351
                }
344
            } // while
352
            } // while
345
            projectPropertis.setProperty(property,newProp.toString());
353
            projectPropertis.setProperty(property,newProp.toString());
354
            return true;
346
        }
355
        }
356
        return false;
347
    }
357
    }
348
    
358
    
349
    private void addDependencies(PrintWriter buffer, Set<String> moduleCNB, Set<String> testCNB, boolean compile, boolean recursive) {
359
    private void addDependencies(PrintWriter buffer, Set<String> moduleCNB, Set<String> testCNB, boolean compile, boolean recursive) {
Lines 370-376 Link Here
370
    
380
    
371
    private Properties getTestProperties() throws IOException {
381
    private Properties getTestProperties() throws IOException {
372
        if (propertiesFile == null || !propertiesFile.isFile()) {
382
        if (propertiesFile == null || !propertiesFile.isFile()) {
373
            throw new BuildException("Property file doesn't exist");
383
            return new Properties();
374
        }
384
        }
375
        Properties props = new Properties();
385
        Properties props = new Properties();
376
        FileInputStream fis = new FileInputStream(propertiesFile);
386
        FileInputStream fis = new FileInputStream(propertiesFile);
Lines 393-414 Link Here
393
        return null;
403
        return null;
394
    }
404
    }
395
    private void updateProperties(Properties projectProperties,String names[]) {
405
    private void updateProperties(Properties projectProperties,String names[]) {
406
        if (propertiesFile == null) {
407
            return;
408
        }
396
        try {
409
        try {
397
            
398
            // read properties
399
            BufferedReader reader = new BufferedReader (new FileReader(propertiesFile));
400
            List<String> lines = new ArrayList<String>();
410
            List<String> lines = new ArrayList<String>();
401
            String line = null;
411
            if (propertiesFile.isFile()) {
402
            while ((line = reader.readLine()) != null) {
412
                // read properties
403
                lines.add(line);
413
                BufferedReader reader = new BufferedReader (new FileReader(propertiesFile));
414
                String line = null;
415
                while ((line = reader.readLine()) != null) {
416
                    lines.add(line);
417
                }
418
                reader.close();
404
            }
419
            }
405
            reader.close();
406
            
420
            
407
            // merge properties
421
            // merge properties
408
            for (String propName : names) {
422
            for (String propName : names) {
409
               String value = projectProperties.getProperty(propName);
423
               String value = projectProperties.getProperty(propName);
410
               lines = replaceProperty(propName,value,lines);    
424
               lines = replaceProperty(propName,value,lines);    
411
            }
425
            }
426
            if (lines.isEmpty() && !propertiesFile.isFile()) {
427
                return;
428
            }
429
412
            // store properties
430
            // store properties
413
            PrintStream ps = new PrintStream(propertiesFile);
431
            PrintStream ps = new PrintStream(propertiesFile);
414
            for (String l : lines) {
432
            for (String l : lines) {
Lines 444-449 Link Here
444
            retLines.add(line);
462
            retLines.add(line);
445
        }
463
        }
446
        return retLines;
464
        return retLines;
447
    } 
465
    }
466
467
    private String fixOpenideUtil(String xml) {
468
        Pattern l = Pattern.compile(
469
                "^ *<test-dependency>[^/]*" +
470
                "<code-name-base>org.openide.util.lookup</code-name-base>", Pattern.MULTILINE);
471
        if (l.matcher(xml).find()) {
472
            return xml;
473
        }
474
475
        Pattern p = Pattern.compile(
476
                "^ *<test-dependency>[^/]*" +
477
                "<code-name-base>org.openide.util</code-name-base>", Pattern.MULTILINE);
478
479
        Matcher m = p.matcher(xml);
480
        if (m.find()) {
481
            final String txt = "</test-dependency>";
482
            final int s = m.start();
483
            int end = xml.indexOf(txt, s);
484
            if (end == -1) {
485
                throw new BuildException("No end of dependency " + xml);
486
            }
487
            final int e = end + txt.length();
488
            String dep = xml.substring(s, e);
489
            return xml.substring(0, s) + dep + '\n' + dep.replace("org.openide.util", "org.openide.util.lookup") + xml.substring(e);
490
        }
491
        return xml;
492
    }
448
493
449
}
494
}
(-)a/nbbuild/build.xml (-1 / +18 lines)
Lines 180-186 Link Here
180
  </target>
180
  </target>
181
  <target name="nbm"/><!-- dummy target -->
181
  <target name="nbm"/><!-- dummy target -->
182
  <target name="conditional-nbm"/><!-- dummy target -->
182
  <target name="conditional-nbm"/><!-- dummy target -->
183
  
183
184
  <target name="fix-dependencies" depends="init">
185
      <pathconvert property="modules.fullpath" >
186
          <path>
187
              <dirset dir="${nb_all}" includes="${allmodules}" />
188
          </path>
189
          <mapper type="identity" />
190
      </pathconvert>
191
192
      <sortsuitemodules unsortedmodules="${modules.fullpath}" sortedmodulesproperty="modules.sorted"/>
193
194
      <subant-junit target="fix-dependencies" failonerror="true">
195
          <buildpath path="${modules.sorted}"/>
196
      </subant-junit>
197
  </target>
198
184
  <property name="jnlp.signjar.keystore" location="build/default.keystore" />
199
  <property name="jnlp.signjar.keystore" location="build/default.keystore" />
185
  <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}" />
200
  <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}" />
186
  <target name="jnlp-generate-keystore" depends="init" unless="jnlp.signjar.keystore.exists" >
201
  <target name="jnlp-generate-keystore" depends="init" unless="jnlp.signjar.keystore.exists" >
Lines 1630-1635 Link Here
1630
  </target>
1645
  </target>
1631
  <target name="build-test-dist" depends="init-test-dist" description="Build test distribution">
1646
  <target name="build-test-dist" depends="init-test-dist" description="Build test distribution">
1632
      <mkdir dir="build"/>
1647
      <mkdir dir="build"/>
1648
      <subant-junit buildpath="${modules.sorted}" target="fix-test-dependencies" failonerror="${test.fail.on.error}" report="build/build-all-tests.xml"/>
1649
      <subant-junit buildpath="${nb_all}${file.separator}performance" target="fix-test-dependencies" failonerror="${test.fail.on.error}" report="build/build-performance-tests.xml"/>
1633
      <subant-junit buildpath="${modules.sorted}" target="test-build" failonerror="${test.fail.on.error}" report="build/build-all-tests.xml"/>
1650
      <subant-junit buildpath="${modules.sorted}" target="test-build" failonerror="${test.fail.on.error}" report="build/build-all-tests.xml"/>
1634
      <!-- adding performance tests to BTD -->
1651
      <!-- adding performance tests to BTD -->
1635
      <subant-junit buildpath="${nb_all}${file.separator}performance" target="test-build" failonerror="${test.fail.on.error}" report="build/build-performance-tests.xml"/>
1652
      <subant-junit buildpath="${nb_all}${file.separator}performance" target="test-build" failonerror="${test.fail.on.error}" report="build/build-performance-tests.xml"/>
(-)a/nbbuild/cluster.properties (+1 lines)
Lines 230-235 Link Here
230
        openide.text,\
230
        openide.text,\
231
        openide.util,\
231
        openide.util,\
232
        openide.util.enumerations,\
232
        openide.util.enumerations,\
233
        openide.util.lookup,\
233
        openide.windows,\
234
        openide.windows,\
234
        options.api,\
235
        options.api,\
235
        options.keymap,\
236
        options.keymap,\
(-)a/nbbuild/templates/common.xml (-1 / +14 lines)
Lines 62-67 Link Here
62
    <import file="${testcoverage.import}"/>
62
    <import file="${testcoverage.import}"/>
63
63
64
    <target name="basic-init" depends="common-init,-jdk-init">
64
    <target name="basic-init" depends="common-init,-jdk-init">
65
        <fixdependencies antfile="../../build.xml" failonerror="false" sanitycheck="false">
66
            <replace codenamebase="org.openide.util" addcompiletime="true" >
67
                <module codenamebase="org.openide.util" spec="8.0"/>
68
                <module codenamebase="org.openide.util.lookup" spec="8.0"/>
69
            </replace>
70
            <fileset dir="nbproject" >
71
                <include name="project.xml" />
72
            </fileset>
73
        </fixdependencies>
65
        <!-- Synch the following property loads with NbModuleProject.makeEvalDefs: -->
74
        <!-- Synch the following property loads with NbModuleProject.makeEvalDefs: -->
66
        <property file="nbproject/private/private.properties"/>
75
        <property file="nbproject/private/private.properties"/>
67
        <property file="nbproject/project.properties"/>
76
        <property file="nbproject/project.properties"/>
Lines 922-928 Link Here
922
931
923
    <target name="fix-dependencies" depends="basic-init" description="Removes unused compilation dependencies on other modules.">
932
    <target name="fix-dependencies" depends="basic-init" description="Removes unused compilation dependencies on other modules.">
924
        <property name="build.compiler.deprecation" value="false" />
933
        <property name="build.compiler.deprecation" value="false" />
925
        <fixdependencies antfile="../../build.xml" buildtarget="netbeans" cleantarget="clean" failonerror="true" >
934
        <fixdependencies antfile="../../build.xml" buildtarget="netbeans" cleantarget="clean" failonerror="true" sanitycheck="false">
926
            <replace codenamebase="org.openide" addcompiletime="true" >
935
            <replace codenamebase="org.openide" addcompiletime="true" >
927
                <module codenamebase="org.openide.filesystems" spec="6.2"/>
936
                <module codenamebase="org.openide.filesystems" spec="6.2"/>
928
                <module codenamebase="org.openide.util" spec="6.2"/>
937
                <module codenamebase="org.openide.util" spec="6.2"/>
Lines 939-944 Link Here
939
                <module codenamebase="org.openide.actions" spec="6.2"/>
948
                <module codenamebase="org.openide.actions" spec="6.2"/>
940
                <module codenamebase="org.openide.loaders" spec="5.3"/>
949
                <module codenamebase="org.openide.loaders" spec="5.3"/>
941
            </replace>
950
            </replace>
951
            <replace codenamebase="org.openide.util" addcompiletime="true" >
952
                <module codenamebase="org.openide.util" spec="8.0"/>
953
                <module codenamebase="org.openide.util.lookup" spec="8.0"/>
954
            </replace>
942
955
943
            <fileset dir="nbproject" >
956
            <fileset dir="nbproject" >
944
                <include name="project.xml" />
957
                <include name="project.xml" />
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixDependencies-core.kit.xml (+144 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.core.kit</code-name-base>
7
            <module-dependencies>
8
                <dependency>
9
                    <code-name-base>org.netbeans.core</code-name-base>
10
                    <run-dependency>
11
                        <release-version>2</release-version>
12
                        <specification-version>3.6</specification-version>
13
                    </run-dependency>
14
                </dependency>
15
                <dependency>
16
                    <code-name-base>org.netbeans.core.ui</code-name-base>
17
                    <run-dependency>
18
                        <release-version>1</release-version>
19
                        <specification-version>1.10</specification-version>
20
                    </run-dependency>
21
                </dependency>
22
                <dependency>
23
                    <code-name-base>org.netbeans.core.windows</code-name-base>
24
                    <run-dependency>
25
                        <release-version>2</release-version>
26
                        <specification-version>2.10</specification-version>
27
                    </run-dependency>
28
                </dependency>
29
                <dependency>
30
                    <code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
31
                    <run-dependency>
32
                        <specification-version>1.3</specification-version>
33
                    </run-dependency>
34
                </dependency>
35
                <dependency>
36
                    <code-name-base>org.netbeans.modules.autoupdate.ui</code-name-base>
37
                    <run-dependency>
38
                        <specification-version>1.2</specification-version>
39
                    </run-dependency>
40
                </dependency>
41
                <dependency>
42
                    <code-name-base>org.netbeans.modules.favorites</code-name-base>
43
                    <run-dependency>
44
                        <release-version>1</release-version>
45
                        <specification-version>1.12</specification-version>
46
                    </run-dependency>
47
                </dependency>
48
                <dependency>
49
                    <code-name-base>org.netbeans.modules.masterfs</code-name-base>
50
                    <run-dependency>
51
                        <release-version>2</release-version>
52
                        <specification-version>1.11</specification-version>
53
                    </run-dependency>
54
                </dependency>
55
                <dependency>
56
                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
57
                    <run-dependency>
58
                        <release-version>1</release-version>
59
                        <specification-version>1.5</specification-version>
60
                    </run-dependency>
61
                </dependency>
62
                <dependency>
63
                    <code-name-base>org.netbeans.modules.options.keymap</code-name-base>
64
                    <run-dependency>
65
                        <specification-version>1.1</specification-version>
66
                    </run-dependency>
67
                </dependency>
68
                <dependency>
69
                    <code-name-base>org.netbeans.modules.print</code-name-base>
70
                    <run-dependency>
71
                        <specification-version>7.0</specification-version>
72
                    </run-dependency>
73
                </dependency>
74
                <dependency>
75
                    <code-name-base>org.netbeans.modules.templates</code-name-base>
76
                    <run-dependency>
77
                        <specification-version>1.0</specification-version>
78
                    </run-dependency>
79
                </dependency>
80
                <dependency>
81
                    <code-name-base>org.netbeans.swing.plaf</code-name-base>
82
                    <run-dependency>
83
                        <specification-version>1.6</specification-version>
84
                    </run-dependency>
85
                </dependency>
86
            </module-dependencies>
87
            <test-dependencies>
88
                <test-type>
89
                    <name>unit</name>
90
                    <test-dependency>
91
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
92
                        <compile-dependency/>
93
                    </test-dependency>
94
                    <test-dependency>
95
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
96
                        <recursive/>
97
                        <compile-dependency/>
98
                    </test-dependency>
99
                    <test-dependency>
100
                        <code-name-base>org.openide.actions</code-name-base>
101
                        <compile-dependency/>
102
                    </test-dependency>
103
                    <test-dependency>
104
                        <code-name-base>org.openide.awt</code-name-base>
105
                        <compile-dependency/>
106
                    </test-dependency>
107
                    <test-dependency>
108
                        <code-name-base>org.openide.compat</code-name-base>
109
                        <compile-dependency/>
110
                    </test-dependency>
111
                    <test-dependency>
112
                        <code-name-base>org.openide.dialogs</code-name-base>
113
                        <compile-dependency/>
114
                    </test-dependency>
115
                    <test-dependency>
116
                        <code-name-base>org.openide.explorer</code-name-base>
117
                        <compile-dependency/>
118
                    </test-dependency>
119
                    <test-dependency>
120
                        <code-name-base>org.openide.filesystems</code-name-base>
121
                        <compile-dependency/>
122
                    </test-dependency>
123
                    <test-dependency>
124
                        <code-name-base>org.openide.loaders</code-name-base>
125
                        <compile-dependency/>
126
                    </test-dependency>
127
                    <test-dependency>
128
                        <code-name-base>org.openide.nodes</code-name-base>
129
                        <compile-dependency/>
130
                    </test-dependency>
131
                    <test-dependency>
132
                        <code-name-base>org.openide.util</code-name-base>
133
                        <compile-dependency/>
134
                    </test-dependency>
135
                    <test-dependency>
136
                        <code-name-base>org.openide.windows</code-name-base>
137
                        <compile-dependency/>
138
                    </test-dependency>
139
                </test-type>
140
            </test-dependencies>
141
            <public-packages/>
142
        </data>
143
    </configuration>
144
</project>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixDependencies-openide.util.xml (+88 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.openide.util</code-name-base>
48
            <module-dependencies>
49
                <dependency>
50
                    <code-name-base>org.openide.util.lookup</code-name-base>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
53
                    <run-dependency>
54
                        <implementation-version/>
55
                    </run-dependency>
56
                </dependency>
57
            </module-dependencies>
58
            <test-dependencies>
59
                <test-type>
60
                    <name>unit</name>
61
                    <test-dependency>
62
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
63
                        <compile-dependency/>
64
                    </test-dependency>
65
                    <test-dependency>
66
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
67
                        <recursive/>
68
                        <compile-dependency/>
69
                    </test-dependency>
70
                    <test-dependency>
71
                        <code-name-base>org.openide.util.lookup</code-name-base>
72
                        <compile-dependency/>
73
                        <test/>
74
                    </test-dependency>
75
                </test-type>
76
            </test-dependencies>
77
            <public-packages>
78
                <package>org.openide</package>
79
                <package>org.openide.util</package>
80
                <package>org.openide.util.datatransfer</package>
81
                <package>org.openide.util.actions</package>
82
                <package>org.openide.util.lookup</package>
83
                <package>org.openide.util.io</package>
84
                <package>org.openide.xml</package>
85
            </public-packages>
86
        </data>
87
    </configuration>
88
</project>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixDependencies-xml.wsdl.model.xml (+118 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
 The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
 Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.netbeans.modules.xml.wsdl.model</code-name-base>
48
            <module-dependencies>
49
                <dependency>
50
                    <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
53
                    <run-dependency>
54
                        <release-version>1</release-version>
55
                        <specification-version>1.0</specification-version>
56
                    </run-dependency>
57
                </dependency>
58
                <dependency>
59
                    <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
60
                    <build-prerequisite/>
61
                    <compile-dependency/>
62
                    <run-dependency>
63
                        <release-version>1</release-version>
64
                        <specification-version>1.0</specification-version>
65
                    </run-dependency>
66
                </dependency>
67
                <dependency>
68
                    <code-name-base>org.openide.util</code-name-base>
69
                    <build-prerequisite/>
70
                    <compile-dependency/>
71
                    <run-dependency/>
72
                </dependency>
73
            </module-dependencies>
74
            <test-dependencies>
75
                <!-- Dependencies for a source root with tests: -->
76
                <test-type>
77
                    <name>unit</name>
78
                    <!-- A dependency on a module or its tests: -->
79
                    <test-dependency>
80
                        <!-- Identification of module our tests depend upon: -->
81
                        <code-name-base>org.netbeans.modules.xml.text</code-name-base>
82
                        <!-- Include also transitive module dependencies of that module: -->
83
                        <recursive/>
84
                        <!-- Always available when running, but to include at compile time also: -->
85
                        <compile-dependency/>
86
                        <!-- To request the tests of that module as well: -->
87
                        <test/>
88
                    </test-dependency>
89
                    <test-dependency>
90
                        <code-name-base>org.netbeans.modules.xml.xdm</code-name-base>
91
                        <recursive/>
92
                        <compile-dependency/>
93
                    </test-dependency>
94
                    <test-dependency>
95
                        <code-name-base>org.netbeans.modules.xml.retriever</code-name-base>
96
                        <recursive/>
97
                        <compile-dependency/>
98
                    </test-dependency>
99
                    <test-dependency>
100
                        <code-name-base>org.netbeans.modules.masterfs</code-name-base>
101
                        <recursive/>
102
                        <compile-dependency/>
103
                    </test-dependency>
104
                </test-type>
105
            </test-dependencies>
106
            <public-packages>
107
                <package>org.netbeans.modules.xml.wsdl.model</package>
108
                <package>org.netbeans.modules.xml.wsdl.model.extensions.http</package>
109
                <package>org.netbeans.modules.xml.wsdl.model.extensions.soap</package>
110
                <package>org.netbeans.modules.xml.wsdl.model.extensions.soap12</package>
111
                <package>org.netbeans.modules.xml.wsdl.model.extensions.xsd</package>
112
                <package>org.netbeans.modules.xml.wsdl.model.spi</package>
113
                <package>org.netbeans.modules.xml.wsdl.model.visitor</package>
114
                <package>org.netbeans.modules.xml.wsdl.validator.spi</package>
115
            </public-packages>
116
        </data>
117
    </configuration>
118
</project>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixDependenciesTest.java (-14 / +240 lines)
Lines 41-60 Link Here
41
41
42
package org.netbeans.nbbuild;
42
package org.netbeans.nbbuild;
43
43
44
import java.io.ByteArrayOutputStream;
45
import java.io.File;
46
import java.io.FileOutputStream;
47
import java.io.FileReader;
48
import java.io.IOException;
49
import java.io.InputStream;
50
import java.util.Arrays;
51
import java.util.StringTokenizer;
52
import java.util.jar.JarEntry;
53
import java.util.jar.JarOutputStream;
54
import java.util.jar.Manifest;
55
import java.util.zip.ZipEntry;
56
import java.util.zip.ZipOutputStream;
57
import junit.framework.*;
58
44
59
import org.netbeans.junit.*;
45
import org.netbeans.junit.*;
60
46
Lines 68-73 Link Here
68
    public FixDependenciesTest (String name) {
54
    public FixDependenciesTest (String name) {
69
        super (name);
55
        super (name);
70
    }
56
    }
57
    public void testCanFixXmlWsdlModel() throws Exception {
58
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractResource("FixDependencies-xml.wsdl.model.xml");
59
60
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
61
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
62
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
63
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
64
            "<target name=\"all\" >" +
65
            "<fix>" +
66
            "  <replace codenamebase=\"org.openide.util\">" +
67
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
68
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
69
            "  </replace>" +
70
            "  <fileset dir=\"" + xml.getParent () + "\">" +
71
            "    <include name=\"" + xml.getName () + "\" /> " +
72
            "  </fileset>" +
73
            "</fix>" +
74
            "</target>" +
75
            "</project>"
76
77
        );
78
79
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
80
        String result = PublicPackagesInProjectizedXMLTest.readFile (xml);
81
82
        if (result.indexOf ("org.openide.util") == -1) {
83
            fail ("org.openide.util should be there: " + result);
84
        }
85
        if (result.indexOf ("org.openide.util.lookup") == -1) {
86
            fail ("org.openide.util.lookup should be there: " + result);
87
        }
88
    }
89
    public void testCanParseCoreKit () throws Exception {
90
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractResource("FixDependencies-core.kit.xml");
91
92
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
93
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
94
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
95
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
96
            "<target name=\"all\" >" +
97
            "<fix>" +
98
            "  <replace codenamebase=\"org.openide.util\">" +
99
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
100
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
101
            "  </replace>" +
102
            "  <fileset dir=\"" + xml.getParent () + "\">" +
103
            "    <include name=\"" + xml.getName () + "\" /> " +
104
            "  </fileset>" +
105
            "</fix>" +
106
            "</target>" +
107
            "</project>"
108
109
        );
110
111
        String before = PublicPackagesInProjectizedXMLTest.readFile(xml);
112
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
113
        String after = PublicPackagesInProjectizedXMLTest.readFile(xml);
114
115
        assertEquals("No change", before, after);
116
    }
117
    public void testCanParseOpenideUtil () throws Exception {
118
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractResource("FixDependencies-openide.util.xml");
119
120
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
121
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
122
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
123
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
124
            "<target name=\"all\" >" +
125
            "<fix>" +
126
            "  <replace codenamebase=\"org.openide.util\">" +
127
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
128
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
129
            "  </replace>" +
130
            "  <fileset dir=\"" + xml.getParent () + "\">" +
131
            "    <include name=\"" + xml.getName () + "\" /> " +
132
            "  </fileset>" +
133
            "</fix>" +
134
            "</target>" +
135
            "</project>"
136
137
        );
138
139
        String before = PublicPackagesInProjectizedXMLTest.readFile(xml);
140
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
141
        String after = PublicPackagesInProjectizedXMLTest.readFile(xml);
142
143
        assertEquals("No change", before, after);
144
    }
145
    public void testNoModuleDependenciesDoesNotCrash() throws Exception {
146
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractString(
147
                "<?xml version='1.0' encoding='UTF-8'?>" +
148
                "<project xmlns='http://www.netbeans.org/ns/project/1'>" +
149
                "<type>org.netbeans.modules.apisupport.project</type>" +
150
                "<configuration>" +
151
                "<data xmlns='http://www.netbeans.org/ns/nb-module-project/3'>" +
152
                "<code-name-base>org.netbeans.api.annotations.common</code-name-base>" +
153
                "<module-dependencies/>" +
154
                "<public-packages/>" +
155
                "</data>" +
156
                "</configuration>" +
157
                "</project>"
158
        );
159
160
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
161
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
162
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
163
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
164
            "<target name=\"all\" >" +
165
            "<fix>" +
166
            "  <replace codenamebase=\"org.openide.util\">" +
167
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
168
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
169
            "  </replace>" +
170
            "  <fileset dir=\"" + xml.getParent () + "\">" +
171
            "    <include name=\"" + xml.getName () + "\" /> " +
172
            "  </fileset>" +
173
            "</fix>" +
174
            "</target>" +
175
            "</project>"
176
177
        );
178
179
        String before = PublicPackagesInProjectizedXMLTest.readFile(xml);
180
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
181
        String after = PublicPackagesInProjectizedXMLTest.readFile(xml);
182
183
        assertEquals("No change", before, after);
184
    }
71
    public void testReplaceOpenideDepWithSmallerOnes () throws Exception {
185
    public void testReplaceOpenideDepWithSmallerOnes () throws Exception {
72
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractString (
186
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractString (
73
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
187
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
Lines 118-123 Link Here
118
            fail ("Spec version must be updated to 6.2: " + result);
232
            fail ("Spec version must be updated to 6.2: " + result);
119
        }
233
        }
120
    }
234
    }
235
236
    public void testReplaceOpenideUtilWithUtilAndLookup () throws Exception {
237
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractString (
238
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
239
            "<project>" +
240
            "  <module-dependencies>" +
241
            "    <dependency>" +
242
            "        <code-name-base>org.openide.util</code-name-base>" +
243
            "        <build-prerequisite/> " +
244
            "        <compile-dependency/> " +
245
            "        <run-dependency>" +
246
            "            <specification-version>7.28</specification-version> " +
247
            "        </run-dependency>" +
248
            "    </dependency>" +
249
            "  </module-dependencies>" +
250
            "</project>"
251
        );
252
253
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
254
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
255
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
256
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
257
            "<target name=\"all\" >" +
258
            "<fix>" +
259
            "  <replace codenamebase=\"org.openide.util\">" +
260
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
261
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
262
            "  </replace>" +
263
            "  <fileset dir=\"" + xml.getParent () + "\">" +
264
            "    <include name=\"" + xml.getName () + "\" /> " +
265
            "  </fileset>" +
266
            "</fix>" +
267
            "</target>" +
268
            "</project>"
269
270
        );
271
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
272
273
        String result = PublicPackagesInProjectizedXMLTest.readFile (xml);
274
275
        if (result.indexOf ("org.openide.util") == -1) {
276
            fail ("org.openide.util should be there: " + result);
277
        }
278
        if (result.indexOf ("org.openide.util.lookup") == -1) {
279
            fail ("org.openide.util.lookup should be there: " + result);
280
        }
281
282
        int where;
283
        if ((where = result.indexOf ("<specification-version>8.0</specification-version>")) == -1) {
284
            fail ("Spec version must be updated to 8.0: " + result);
285
        }
286
        if (result.indexOf("<specification-version>8.0</specification-version>", where + 1) == -1) {
287
            fail ("Snd Spec version must be updated to 8.0: " + result);
288
        }
289
    }
290
    public void testDontReplaceNewerVersionOfItself() throws Exception {
291
        doDontReplaceNewerVersionOfItself("8.1");
292
    }
293
    public void testDontReplaceNewerVersionOfItself9() throws Exception {
294
        doDontReplaceNewerVersionOfItself("9.0");
295
    }
296
297
    private void doDontReplaceNewerVersionOfItself(String version) throws Exception {
298
        java.io.File xml = PublicPackagesInProjectizedXMLTest.extractString (
299
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
300
            "<project>" +
301
            "  <module-dependencies>" +
302
            "    <dependency>" +
303
            "        <code-name-base>org.openide.util</code-name-base>" +
304
            "        <build-prerequisite/> " +
305
            "        <compile-dependency/> " +
306
            "        <run-dependency>" +
307
            "            <specification-version>" + version + "</specification-version> " +
308
            "        </run-dependency>" +
309
            "    </dependency>" +
310
            "  </module-dependencies>" +
311
            "</project>"
312
        );
313
314
        java.io.File f = PublicPackagesInProjectizedXMLTest.extractString (
315
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
316
            "<project name=\"Replace Openide\" basedir=\".\" default=\"all\" >" +
317
            "  <taskdef name=\"fix\" classname=\"org.netbeans.nbbuild.FixDependencies\" classpath=\"${nb_all}/nbbuild/nbantext.jar\"/>" +
318
            "<target name=\"all\" >" +
319
            "<fix>" +
320
            "  <replace codenamebase=\"org.openide.util\">" +
321
            "    <module codenamebase=\"org.openide.util\" spec=\"8.0\" />" +
322
            "    <module codenamebase=\"org.openide.util.lookup\" spec=\"8.0\" />" +
323
            "  </replace>" +
324
            "  <fileset dir=\"" + xml.getParent () + "\">" +
325
            "    <include name=\"" + xml.getName () + "\" /> " +
326
            "  </fileset>" +
327
            "</fix>" +
328
            "</target>" +
329
            "</project>"
330
331
        );
332
        PublicPackagesInProjectizedXMLTest.execute (f, new String[] { });
333
334
        String result = PublicPackagesInProjectizedXMLTest.readFile (xml);
335
336
        if (result.indexOf ("org.openide.util") == -1) {
337
            fail ("org.openide.util should be there: " + result);
338
        }
339
        if (result.indexOf ("org.openide.util.lookup") >= 0) {
340
            fail ("org.openide.util.lookup should not be there: " + result);
341
        }
342
343
        if (result.indexOf ("<specification-version>" + version + "</specification-version>") == -1) {
344
            fail ("Spec version stays at updated to kept: " + result);
345
        }
346
    }
121
    
347
    
122
    
348
    
123
    public void testVerificationOfRemovedDependencies () throws Exception {
349
    public void testVerificationOfRemovedDependencies () throws Exception {
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependencies-o.apache.xml.resolver.xml (+58 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
47
            <code-name-base>org.apache.xml.resolver</code-name-base>
48
            <module-dependencies/>
49
            <public-packages>
50
                <subpackages>org.apache.xml.resolver</subpackages>
51
            </public-packages>
52
            <class-path-extension>
53
                <runtime-relative-path>ext/resolver-1.2.jar</runtime-relative-path>
54
                <binary-origin>external/resolver-1.2.jar</binary-origin>
55
            </class-path-extension>
56
        </data>
57
    </configuration>
58
</project>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependencies-openide.filesystems.xml (+96 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<project xmlns="http://www.netbeans.org/ns/project/1">
44
    <type>org.netbeans.modules.apisupport.project</type>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.openide.filesystems</code-name-base>
48
            <module-dependencies>
49
                <dependency>
50
                    <code-name-base>org.openide.util</code-name-base>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
53
                    <run-dependency>
54
                        <implementation-version/>
55
                    </run-dependency>
56
                </dependency>
57
                <dependency>
58
                    <code-name-base>org.openide.util.lookup</code-name-base>
59
                    <build-prerequisite/>
60
                    <compile-dependency/>
61
                    <run-dependency>
62
                        <implementation-version/>
63
                    </run-dependency>
64
                </dependency>
65
            </module-dependencies>
66
            <test-dependencies>
67
                <test-type>
68
                    <name>unit</name>
69
                    <test-dependency>
70
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
71
                        <compile-dependency/>
72
                    </test-dependency>
73
                    <test-dependency>
74
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
75
                        <recursive/>
76
                        <compile-dependency/>
77
                    </test-dependency>
78
                    <test-dependency>
79
                        <code-name-base>org.openide.filesystems</code-name-base>
80
                        <recursive/>
81
                        <compile-dependency/>
82
                    </test-dependency>
83
                    <test-dependency>
84
                        <code-name-base>org.openide.util</code-name-base>
85
                        <compile-dependency/>
86
                        <test/>
87
                    </test-dependency>
88
                </test-type>
89
            </test-dependencies>
90
            <public-packages>
91
                <package>org.openide.filesystems</package>
92
                <package>org.openide.filesystems.annotations</package>
93
            </public-packages>
94
        </data>
95
    </configuration>
96
</project>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProjectPass.xml (+3 lines)
Lines 348-353 Link Here
348
                  <test-dependency>
348
                  <test-dependency>
349
                      <code-name-base>org.openide.util</code-name-base>
349
                      <code-name-base>org.openide.util</code-name-base>
350
                  </test-dependency>
350
                  </test-dependency>
351
                  <test-dependency>
352
                      <code-name-base>org.openide.util.lookup</code-name-base>
353
                  </test-dependency>
351
              </test-type>
354
              </test-type>
352
            </test-dependencies>
355
            </test-dependencies>
353
            <public-packages/>
356
            <public-packages/>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProjectStandalonePass.xml (+3 lines)
Lines 349-354 Link Here
349
                  <test-dependency>
349
                  <test-dependency>
350
                      <code-name-base>org.openide.util</code-name-base>
350
                      <code-name-base>org.openide.util</code-name-base>
351
                  </test-dependency>
351
                  </test-dependency>
352
                  <test-dependency>
353
                      <code-name-base>org.openide.util.lookup</code-name-base>
354
                  </test-dependency>
352
              </test-type>
355
              </test-type>
353
            </test-dependencies>
356
            </test-dependencies>
354
            <public-packages/>
357
            <public-packages/>
(-)a/nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesTest.java (+41 lines)
Lines 63-68 Link Here
63
        super(testName);
63
        super(testName);
64
    }
64
    }
65
65
66
    public void testOpenideUtilTestDepNeedsToBeRecursive() throws IOException, Exception {
67
        File prjFile = copyFile("FixTestDependencies-openide.filesystems.xml");
68
        File propertiesFile = new File(getWorkDir(), "empty.properties");
69
        propertiesFile.createNewFile();
70
        FixTestDependencies ftd = newFixTestDependencies();
71
        ftd.setPropertiesFile(propertiesFile);
72
        ftd.setProjectXml(prjFile);
73
        ftd.cachedEntries = getEntries();
74
        ftd.execute();
75
76
        String result = PublicPackagesInProjectizedXMLTest.readFile(prjFile);
77
        int first = result.indexOf("test-dependencies");
78
        if (first == -1) {
79
            fail("No test deps found in " + result);
80
        }
81
        result = result.substring(first);
82
83
        if (result.indexOf("org.openide.util") == -1) {
84
            fail("org.openide.util should be there: " + result);
85
        }
86
        if (result.indexOf("org.openide.util.lookup") == -1) {
87
            fail("org.openide.util.lookup should be there: " + result);
88
        }
89
    }
90
    public void testNoChangeForProjectsWithoutTests() throws IOException, Exception {
91
        File prjFile = copyFile("FixTestDependencies-o.apache.xml.resolver.xml");
92
        String before = PublicPackagesInProjectizedXMLTest.readFile(prjFile);
93
        File propertiesFile = new File(getWorkDir(), "some.properties");
94
        Properties np = new Properties();
95
        np.put("is.autoload", "true");
96
        np.store(new FileOutputStream(propertiesFile), "");
97
        FixTestDependencies ftd = newFixTestDependencies();
98
        ftd.setPropertiesFile(propertiesFile);
99
        ftd.setProjectXml(prjFile);
100
        ftd.cachedEntries = getEntries();
101
        ftd.execute();
102
103
        String result = PublicPackagesInProjectizedXMLTest.readFile(prjFile);
104
        assertEquals("No change expected", before, result);
105
    }
106
66
    public void testSimple() throws IOException, Exception {
107
    public void testSimple() throws IOException, Exception {
67
          File prjFile = copyFile("FixTestDependenciesProject.xml");
108
          File prjFile = copyFile("FixTestDependenciesProject.xml");
68
          File propertiesFile = copyFile("FixTestDependencies.properties");
109
          File propertiesFile = copyFile("FixTestDependencies.properties");
(-)a/nbjunit/nbproject/project.xml (-1 / +1 lines)
Lines 63-69 Link Here
63
                    </run-dependency>
63
                    </run-dependency>
64
                </dependency>
64
                </dependency>
65
                <dependency>
65
                <dependency>
66
                    <code-name-base>org.openide.util</code-name-base>
66
                    <code-name-base>org.openide.util.lookup</code-name-base>
67
                    <build-prerequisite/>
67
                    <build-prerequisite/>
68
                    <compile-dependency/>
68
                    <compile-dependency/>
69
                </dependency>
69
                </dependency>
(-)a/openide.actions/nbproject/project.xml (+8 lines)
Lines 55-60 Link Here
55
                    </run-dependency>
55
                    </run-dependency>
56
                </dependency>
56
                </dependency>
57
                <dependency>
57
                <dependency>
58
                    <code-name-base>org.openide.util.lookup</code-name-base>
59
                    <build-prerequisite/>
60
                    <compile-dependency/>
61
                    <run-dependency>
62
                        <implementation-version/>
63
                    </run-dependency>
64
                </dependency>
65
                <dependency>
58
                    <code-name-base>org.openide.nodes</code-name-base>
66
                    <code-name-base>org.openide.nodes</code-name-base>
59
                    <build-prerequisite/>
67
                    <build-prerequisite/>
60
                    <compile-dependency/>
68
                    <compile-dependency/>
(-)a/openide.awt/nbproject/project.xml (+8 lines)
Lines 54-59 Link Here
54
                        <implementation-version/>
54
                        <implementation-version/>
55
                    </run-dependency>
55
                    </run-dependency>
56
                </dependency>
56
                </dependency>
57
                <dependency>
58
                    <code-name-base>org.openide.util.lookup</code-name-base>
59
                    <build-prerequisite/>
60
                    <compile-dependency/>
61
                    <run-dependency>
62
                        <implementation-version/>
63
                    </run-dependency>
64
                </dependency>
57
            </module-dependencies>
65
            </module-dependencies>
58
            <test-dependencies>
66
            <test-dependencies>
59
                <test-type>
67
                <test-type>
(-)a/openide.filesystems/nbproject/project.xml (+8 lines)
Lines 54-59 Link Here
54
                        <implementation-version/>
54
                        <implementation-version/>
55
                    </run-dependency>
55
                    </run-dependency>
56
                </dependency>
56
                </dependency>
57
                <dependency>
58
                    <code-name-base>org.openide.util.lookup</code-name-base>
59
                    <build-prerequisite/>
60
                    <compile-dependency/>
61
                    <run-dependency>
62
                        <implementation-version/>
63
                    </run-dependency>
64
                </dependency>
57
            </module-dependencies>
65
            </module-dependencies>
58
            <test-dependencies>
66
            <test-dependencies>
59
                <test-type>
67
                <test-type>
(-)a/openide.nodes/nbproject/project.xml (+8 lines)
Lines 70-75 Link Here
70
                        <implementation-version/>
70
                        <implementation-version/>
71
                    </run-dependency>
71
                    </run-dependency>
72
                </dependency>
72
                </dependency>
73
                <dependency>
74
                    <code-name-base>org.openide.util.lookup</code-name-base>
75
                    <build-prerequisite/>
76
                    <compile-dependency/>
77
                    <run-dependency>
78
                        <implementation-version/>
79
                    </run-dependency>
80
                </dependency>
73
            </module-dependencies>
81
            </module-dependencies>
74
            <test-dependencies>
82
            <test-dependencies>
75
                <test-type>
83
                <test-type>
(-)a/openide.util.lookup/build.xml (+5 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project basedir="." default="netbeans" name="openide.util.lookup">
3
    <description>Builds, tests, and runs the project org.openide.util.lookup</description>
4
    <import file="../nbbuild/templates/projectized.xml"/>
5
</project>
(-)a/openide.util.lookup/manifest.mf (+5 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.util.lookup
3
OpenIDE-Module-Implementation-Version: 1
4
OpenIDE-Module-Localizing-Bundle: org/openide/util/lookup/Bundle.properties
5
(-)a/openide.util.lookup/nbproject/project.properties (+43 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
4
#
5
# The contents of this file are subject to the terms of either the GNU
6
# General Public License Version 2 only ("GPL") or the Common
7
# Development and Distribution License("CDDL") (collectively, the
8
# "License"). You may not use this file except in compliance with the
9
# License. You can obtain a copy of the License at
10
# http://www.netbeans.org/cddl-gplv2.html
11
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
12
# specific language governing permissions and limitations under the
13
# License.  When distributing the software, include this License Header
14
# Notice in each file and include the License file at
15
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
16
# particular file as subject to the "Classpath" exception as provided
17
# by Sun in the GPL Version 2 section of the License file that
18
# accompanied this code. If applicable, add the following below the
19
# License Header, with the fields enclosed by brackets [] replaced by
20
# your own identifying information:
21
# "Portions Copyrighted [year] [name of copyright owner]"
22
#
23
# Contributor(s):
24
#
25
# The Original Software is NetBeans. The Initial Developer of the Original
26
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
# Microsystems, Inc. All Rights Reserved.
28
#
29
# If you wish your version of this file to be governed by only the CDDL
30
# or only the GPL Version 2, indicate your decision by adding
31
# "[Contributor] elects to include this software in this distribution
32
# under the [CDDL or GPL Version 2] license." If you do not indicate a
33
# single choice of license, a recipient has the option to distribute
34
# your version of this file under either the CDDL, the GPL Version 2 or
35
# to extend the choice of license to its licensees as provided above.
36
# However, if you add GPL Version 2 code and therefore, elected the GPL
37
# Version 2 license, then the option applies only if the new code is
38
# made subject to such option by the copyright holder.
39
40
module.jar.dir=lib
41
javac.source=1.5
42
javac.compilerargs=-Xlint -Xlint:-serial
43
spec.version.base=8.0.0
(-)a/openide.util.lookup/nbproject/project.xml (+28 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.openide.util.lookup</code-name-base>
7
            <module-dependencies/>
8
            <test-dependencies>
9
                <test-type>
10
                    <name>unit</name>
11
                    <test-dependency>
12
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
13
                        <compile-dependency/>
14
                    </test-dependency>
15
                    <test-dependency>
16
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
17
                        <recursive/>
18
                        <compile-dependency/>
19
                    </test-dependency>
20
                </test-type>
21
            </test-dependencies>
22
            <public-packages>
23
                <package>org.openide.util</package>
24
                <package>org.openide.util.lookup</package>
25
            </public-packages>
26
        </data>
27
    </configuration>
28
</project>
(-)a/openide.util/src/META-INF/services/javax.annotation.processing.Processor (-1 lines)
Lines 1-2 Link Here
1
org.netbeans.modules.openide.util.ServiceProviderProcessor
1
org.netbeans.modules.openide.util.ServiceProviderProcessor
2
org.netbeans.modules.openide.util.URLStreamHandlerRegistrationProcessor
(-)a/openide.util.lookup/src/org/openide/util/lookup/Bundle.properties (+1 lines)
Line 0 Link Here
1
OpenIDE-Module-Name=Lookup
(-)a/openide.util/src/org/openide/util/lookup/MetaInfServicesLookup.java (-2 / +6 lines)
Lines 57-66 Link Here
57
import java.util.List;
57
import java.util.List;
58
import java.util.Map;
58
import java.util.Map;
59
import java.util.WeakHashMap;
59
import java.util.WeakHashMap;
60
import java.util.concurrent.Executor;
61
import java.util.concurrent.Executors;
60
import java.util.logging.Level;
62
import java.util.logging.Level;
61
import java.util.logging.Logger;
63
import java.util.logging.Logger;
62
import org.openide.util.Lookup;
64
import org.openide.util.Lookup;
63
import org.openide.util.RequestProcessor;
64
65
65
/**
66
/**
66
 * @author Jaroslav Tulach, Jesse Glick
67
 * @author Jaroslav Tulach, Jesse Glick
Lines 70-76 Link Here
70
final class MetaInfServicesLookup extends AbstractLookup {
71
final class MetaInfServicesLookup extends AbstractLookup {
71
72
72
    private static final Logger LOGGER = Logger.getLogger(MetaInfServicesLookup.class.getName());
73
    private static final Logger LOGGER = Logger.getLogger(MetaInfServicesLookup.class.getName());
73
    static final RequestProcessor RP = new RequestProcessor(MetaInfServicesLookup.class.getName(), 1);
74
    static final Executor RP = Executors.newSingleThreadExecutor(); 
75
    /*TBD: Inject RequestProcessor somehow
76
     new RequestProcessor(MetaInfServicesLookup.class.getName(), 1);
77
     */
74
    private static int knownInstancesCount;
78
    private static int knownInstancesCount;
75
    private static final List<Reference<Object>> knownInstances;
79
    private static final List<Reference<Object>> knownInstances;
76
    static {
80
    static {
(-)a/openide.util.lookup/test/unit/src/org/netbeans/modules/openide/util/ActiveQueueTest.java (+132 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2009 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.openide.util;
41
42
import java.lang.ref.Reference;
43
import java.lang.ref.ReferenceQueue;
44
import java.lang.ref.WeakReference;
45
import java.net.URL;
46
import java.net.URLClassLoader;
47
import org.netbeans.junit.NbTestCase;
48
49
/**
50
 *
51
 * @author Jaroslav Tulach <jtulach@netbeans.org>
52
 */
53
public class ActiveQueueTest extends NbTestCase{
54
55
    public ActiveQueueTest(String name) {
56
        super(name);
57
    }
58
59
    public void testMemoryLeak() throws Exception {
60
        final Class<?> u1 = ActiveQueue.class;
61
        class L extends URLClassLoader {
62
            public L() {
63
                super(new URL[] {u1.getProtectionDomain().getCodeSource().getLocation()}, u1.getClassLoader().getParent());
64
            }
65
            @Override
66
            protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
67
                if (name.equals(u1.getName()) || name.startsWith(u1.getName() + "$")) {
68
                    Class c = findLoadedClass(name);
69
                    if (c == null) {
70
                        c = findClass(name);
71
                    }
72
                    if (resolve) {
73
                        resolveClass(c);
74
                    }
75
                    return c;
76
                } else {
77
                    return super.loadClass(name, resolve);
78
                }
79
            }
80
        }
81
        ClassLoader l = new L();
82
        Class<?> u2 = l.loadClass(u1.getName());
83
        assertEquals(l, u2.getClassLoader());
84
        Object obj = new Object();
85
        @SuppressWarnings("unchecked")
86
        ReferenceQueue<Object> q = (ReferenceQueue<Object>) u2.getMethod("queue").invoke(null);
87
        RunnableRef ref = new RunnableRef(obj, q);
88
        synchronized (ref) {
89
            obj = null;
90
            assertGC("Ref should be GC'ed as usual", ref);
91
            ref.wait();
92
            assertTrue("Run method has been executed", ref.executed);
93
        }
94
        Reference<?> r = new WeakReference<Object>(u2);
95
        q = null;
96
        u2 = null;
97
        l = null;
98
        assertGC("#86625: Utilities.class can also be collected now", r);
99
    }
100
101
102
    private static class RunnableRef extends WeakReference<Object>
103
    implements Runnable {
104
        public boolean wait;
105
        public boolean entered;
106
        public boolean executed;
107
108
        public RunnableRef (Object o) {
109
            this(o, ActiveQueue.queue());
110
        }
111
112
        public RunnableRef(Object o, ReferenceQueue<Object> q) {
113
            super(o, q);
114
        }
115
116
        public synchronized void run () {
117
            entered = true;
118
            if (wait) {
119
                // notify we are here
120
                notify ();
121
                try {
122
                    wait ();
123
                } catch (InterruptedException ex) {
124
                }
125
            }
126
            executed = true;
127
128
            notifyAll ();
129
        }
130
    }
131
132
}
(-)a/openide.util/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTest.java (-6 / +23 lines)
Lines 75-82 Link Here
75
import org.bar.Comparator2;
75
import org.bar.Comparator2;
76
import org.netbeans.junit.MockServices;
76
import org.netbeans.junit.MockServices;
77
import org.netbeans.junit.NbTestCase;
77
import org.netbeans.junit.NbTestCase;
78
import org.openide.util.Enumerations;
79
import org.openide.util.Exceptions;
80
import org.openide.util.Lookup;
78
import org.openide.util.Lookup;
81
import org.openide.util.LookupEvent;
79
import org.openide.util.LookupEvent;
82
import org.openide.util.LookupListener;
80
import org.openide.util.LookupListener;
Lines 410-416 Link Here
410
        });
408
        });
411
        assertNotNull("Interface found", l.lookup(xface));
409
        assertNotNull("Interface found", l.lookup(xface));
412
        assertFalse(event.get());
410
        assertFalse(event.get());
413
        MetaInfServicesLookup.RP.post(new Runnable() {public void run() {}}).waitFinished();
411
        class W implements Runnable {
412
            boolean ok;
413
            public synchronized void run() {
414
                ok = true;
415
                notifyAll();
416
            }
417
418
            public synchronized void await() throws Exception {
419
                while (!ok) {
420
                    wait();
421
                }
422
            }
423
        }
424
        W w = new W();
425
        MetaInfServicesLookup.RP.execute(w);
426
        w.await();
414
        assertEquals("Now two", 2, res.allInstances().size());
427
        assertEquals("Now two", 2, res.allInstances().size());
415
    }
428
    }
416
    
429
    
Lines 470-476 Link Here
470
                    try {
483
                    try {
471
                        wait();
484
                        wait();
472
                    } catch (InterruptedException ex) {
485
                    } catch (InterruptedException ex) {
473
                        Exceptions.printStackTrace(ex);
486
                        Logger.getLogger("global").log(Level.WARNING, "", ex);
474
                    }
487
                    }
475
                }
488
                }
476
            }
489
            }
Lines 503-509 Link Here
503
        assertNull(Lookups.metaInfServices(new ClassLoader() {
516
        assertNull(Lookups.metaInfServices(new ClassLoader() {
504
            protected @Override Enumeration<URL> findResources(String name) throws IOException {
517
            protected @Override Enumeration<URL> findResources(String name) throws IOException {
505
                if (name.equals("META-INF/services/java.lang.Object")) {
518
                if (name.equals("META-INF/services/java.lang.Object")) {
506
                    return Enumerations.singleton(new URL(null, "dummy:stuff", new URLStreamHandler() {
519
                    return singleton(new URL(null, "dummy:stuff", new URLStreamHandler() {
507
                        protected URLConnection openConnection(URL u) throws IOException {
520
                        protected URLConnection openConnection(URL u) throws IOException {
508
                            return new URLConnection(u) {
521
                            return new URLConnection(u) {
509
                                public void connect() throws IOException {}
522
                                public void connect() throws IOException {}
Lines 514-522 Link Here
514
                        }
527
                        }
515
                    }));
528
                    }));
516
                } else {
529
                } else {
517
                    return Enumerations.empty();
530
                    return Collections.enumeration(Collections.<URL>emptyList());
518
                }
531
                }
519
            }
532
            }
533
520
        }).lookup(Object.class));
534
        }).lookup(Object.class));
521
    }
535
    }
522
    public static class Broken1 {
536
    public static class Broken1 {
Lines 532-535 Link Here
532
        }
546
        }
533
    }
547
    }
534
548
549
    static <T> Enumeration<T> singleton(T t) {
550
        return Collections.enumeration(Collections.singleton(t));
551
    }
535
}
552
}
(-)a/openide.util/nbproject/project.properties (-1 / +1 lines)
Lines 42-48 Link Here
42
module.jar.dir=lib
42
module.jar.dir=lib
43
cp.extra=${nb_all}/apisupport.harness/external/openjdk-javac-6-b12.jar
43
cp.extra=${nb_all}/apisupport.harness/external/openjdk-javac-6-b12.jar
44
44
45
spec.version.base=7.31.0
45
spec.version.base=8.0
46
46
47
# For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4:
47
# For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4:
48
48
(-)a/openide.util/nbproject/project.xml (-1 / +15 lines)
Lines 45-51 Link Here
45
    <configuration>
45
    <configuration>
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
46
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
47
            <code-name-base>org.openide.util</code-name-base>
47
            <code-name-base>org.openide.util</code-name-base>
48
            <module-dependencies/>
48
            <module-dependencies>
49
                <dependency>
50
                    <code-name-base>org.openide.util.lookup</code-name-base>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
53
                    <run-dependency>
54
                        <implementation-version/>
55
                    </run-dependency>
56
                </dependency>
57
            </module-dependencies>
49
            <test-dependencies>
58
            <test-dependencies>
50
                <test-type>
59
                <test-type>
51
                    <name>unit</name>
60
                    <name>unit</name>
Lines 58-63 Link Here
58
                        <recursive/>
67
                        <recursive/>
59
                        <compile-dependency/>
68
                        <compile-dependency/>
60
                    </test-dependency>
69
                    </test-dependency>
70
                    <test-dependency>
71
                        <code-name-base>org.openide.util.lookup</code-name-base>
72
                        <compile-dependency/>
73
                        <test/>
74
                    </test-dependency>
61
                </test-type>
75
                </test-type>
62
            </test-dependencies>
76
            </test-dependencies>
63
            <public-packages>
77
            <public-packages>
(-)a/openide.util/src/META-INF/services/javax.annotation.processing.Processor (-1 lines)
Lines 1-2 Link Here
1
org.netbeans.modules.openide.util.ServiceProviderProcessor
2
org.netbeans.modules.openide.util.URLStreamHandlerRegistrationProcessor
1
org.netbeans.modules.openide.util.URLStreamHandlerRegistrationProcessor
(-)a/openide.util/test/unit/src/org/openide/util/InitJobTest.java (+5 lines)
Lines 81-86 Link Here
81
    protected boolean runInEQ() {
81
    protected boolean runInEQ() {
82
        return true;
82
        return true;
83
    }
83
    }
84
85
    @Override
86
    protected int timeOut() {
87
        return 15000;
88
    }
84
    
89
    
85
    /** Basic testing of Utilities.attachInitJob, if calls to AsyncGUIJob
90
    /** Basic testing of Utilities.attachInitJob, if calls to AsyncGUIJob
86
     * impl conforms to the API behaviour described in javadoc *
91
     * impl conforms to the API behaviour described in javadoc *
(-)a/openide.util/test/unit/src/org/openide/util/UtilitiesActiveQueueTest.java (-42 lines)
Lines 114-161 Link Here
114
        }
114
        }
115
    }
115
    }
116
    
116
    
117
    public void testMemoryLeak() throws Exception {
118
        final Class<?> u1 = Utilities.class;
119
        class L extends URLClassLoader {
120
            public L() {
121
                super(new URL[] {u1.getProtectionDomain().getCodeSource().getLocation()}, u1.getClassLoader().getParent());
122
            }
123
            protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
124
                if (name.equals(u1.getName()) || name.startsWith(u1.getName() + "$")) {
125
                    Class c = findLoadedClass(name);
126
                    if (c == null) {
127
                        c = findClass(name);
128
                    }
129
                    if (resolve) {
130
                        resolveClass(c);
131
                    }
132
                    return c;
133
                } else {
134
                    return super.loadClass(name, resolve);
135
                }
136
            }
137
        }
138
        ClassLoader l = new L();
139
        Class<?> u2 = l.loadClass(u1.getName());
140
        assertEquals(l, u2.getClassLoader());
141
        Object obj = new Object();
142
        @SuppressWarnings("unchecked")
143
        ReferenceQueue<Object> q = (ReferenceQueue<Object>) u2.getMethod("activeReferenceQueue").invoke(null);
144
        RunnableRef ref = new RunnableRef(obj, q);
145
        synchronized (ref) {
146
            obj = null;
147
            assertGC("Ref should be GC'ed as usual", ref);
148
            ref.wait();
149
            assertTrue("Run method has been executed", ref.executed);
150
        }
151
        Reference<?> r = new WeakReference<Object>(u2);
152
        q = null;
153
        u2 = null;
154
        l = null;
155
        assertGC("#86625: Utilities.class can also be collected now", r);
156
    }
157
158
    
159
    private static class RunnableRef extends WeakReference<Object>
117
    private static class RunnableRef extends WeakReference<Object>
160
    implements Runnable {
118
    implements Runnable {
161
        public boolean wait;
119
        public boolean wait;
(-)a/profiler/nbproject/project.properties (+1 lines)
Lines 45-50 Link Here
45
    ${openide.filesystems.dir}/core/org-openide-filesystems.jar:\
45
    ${openide.filesystems.dir}/core/org-openide-filesystems.jar:\
46
    ${java.platform.dir}/modules/org-netbeans-modules-java-platform.jar:\
46
    ${java.platform.dir}/modules/org-netbeans-modules-java-platform.jar:\
47
    ${openide.util.dir}/lib/org-openide-util.jar:\
47
    ${openide.util.dir}/lib/org-openide-util.jar:\
48
    ${openide.util.lookup.dir}/lib/org-openide-util-lookup.jar:\
48
    ${projectapi.dir}/modules/org-netbeans-modules-projectapi.jar:\
49
    ${projectapi.dir}/modules/org-netbeans-modules-projectapi.jar:\
49
    ${lib.profiler.common.dir}/modules/org-netbeans-lib-profiler-common.jar:\
50
    ${lib.profiler.common.dir}/modules/org-netbeans-lib-profiler-common.jar:\
50
    ${lib.profiler.dir}/modules/org-netbeans-lib-profiler.jar
51
    ${lib.profiler.dir}/modules/org-netbeans-lib-profiler.jar
(-)a/ruby.rakeproject/nbproject/project.properties (-4 lines)
Lines 39-47 Link Here
39
39
40
is.autoload=true
40
is.autoload=true
41
41
42
test.unit.cp.extra=
43
# For XMLSerializer, needed for XMLUtil.write to work w/ namespaces:
44
test.unit.run.cp.extra=${libs.xerces.dir}/modules/ext/xerces-2.8.0.jar:${libs.xerces.dir}/modules/ext/xml-commons-dom-ranges-1.0.b2.jar
45
46
javac.compilerargs=-Xlint:unchecked -Xlint -Xlint:-serial
42
javac.compilerargs=-Xlint:unchecked -Xlint -Xlint:-serial
47
javac.source=1.5
43
javac.source=1.5
(-)a/settings/nbproject/project.xml (+8 lines)
Lines 98-103 Link Here
98
                    <build-prerequisite/>
98
                    <build-prerequisite/>
99
                    <compile-dependency/>
99
                    <compile-dependency/>
100
                    <run-dependency>
100
                    <run-dependency>
101
                        <specification-version>8.0</specification-version>
102
                    </run-dependency>
103
                </dependency>
104
                <dependency>
105
                    <code-name-base>org.openide.util.lookup</code-name-base>
106
                    <build-prerequisite/>
107
                    <compile-dependency/>
108
                    <run-dependency>
101
                        <implementation-version/>
109
                        <implementation-version/>
102
                    </run-dependency>
110
                    </run-dependency>
103
                </dependency>
111
                </dependency>
(-)a/xml.lexer/nbproject/project.xml (-11 lines)
Lines 5-21 Link Here
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.xml.lexer</code-name-base>
6
            <code-name-base>org.netbeans.modules.xml.lexer</code-name-base>
7
            <module-dependencies>
7
            <module-dependencies>
8
                <!--
9
                <dependency>
10
                    <code-name-base>org.netbeans.modules.editor</code-name-base>
11
                    <build-prerequisite/>
12
                    <compile-dependency/>
13
                    <run-dependency>
14
                        <release-version>3</release-version>
15
                        <specification-version>1.36</specification-version>
16
                    </run-dependency>
17
                </dependency>
18
                -->
19
                <dependency>
8
                <dependency>
20
                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
9
                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
21
                    <build-prerequisite/>
10
                    <build-prerequisite/>

Return to bug 170056