Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 24357 | Differences between
and this patch

Collapse All | Expand All

(-)a/apisupport.harness/manifest.mf (-1 / +1 lines)
 Lines 1-5    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.apisupport.harness
2
OpenIDE-Module: org.netbeans.modules.apisupport.harness
3
OpenIDE-Module-Specification-Version: 1.15
3
OpenIDE-Module-Specification-Version: 1.16
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/harness/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/harness/Bundle.properties
5
5
(-)a/apisupport.harness/release/README (+4 lines)
 Lines 725-730    Link Here 
725
nbm.distribution - optional URL to location where your NBM can be downloaded
725
nbm.distribution - optional URL to location where your NBM can be downloaded
726
from.
726
from.
727
727
728
nbm.executable.files [since 6.8] - comma- or space- separated list of patterns of 
729
files relative to cluster directory for which executable permissions should be set 
730
on Unix system when building the module and on NBM installation/update in runtime.
731
728
nbm.homepage - optional URL to HTML homepage for background about the module.
732
nbm.homepage - optional URL to HTML homepage for background about the module.
729
733
730
nbm.is.global - set to "true" if NBM cannot be installed in user directory.
734
nbm.is.global - set to "true" if NBM cannot be installed in user directory.
(-)a/autoupdate.services/libsrc/org/netbeans/updater/ModuleUpdater.java (-4 / +91 lines)
 Lines 42-47    Link Here 
42
package org.netbeans.updater;
42
package org.netbeans.updater;
43
43
44
import java.io.*;
44
import java.io.*;
45
import java.lang.reflect.Method;
45
import java.util.*;
46
import java.util.*;
46
import java.util.jar.*;
47
import java.util.jar.*;
47
48
 Lines 97-102    Link Here 
97
    
98
    
98
    public static final String UPDATER_JAR = "updater.jar"; // NOI18N
99
    public static final String UPDATER_JAR = "updater.jar"; // NOI18N
99
    public static final String AUTOUPDATE_UPDATER_JAR_PATH = "netbeans/modules/ext/" + UPDATER_JAR; // NOI18N
100
    public static final String AUTOUPDATE_UPDATER_JAR_PATH = "netbeans/modules/ext/" + UPDATER_JAR; // NOI18N
101
102
    public static final String EXECUTABLE_FILES_ENTRY = "Info/executable.list";
100
    
103
    
101
    /** files that are supposed to be installed (when running inside the ide) */
104
    /** files that are supposed to be installed (when running inside the ide) */
102
    private Collection<File> forInstall;
105
    private Collection<File> forInstall;
 Lines 354-359    Link Here 
354
                try {
357
                try {
355
                    jarFile = new JarFile (nbm);
358
                    jarFile = new JarFile (nbm);
356
                    Enumeration entries = jarFile.entries();
359
                    Enumeration entries = jarFile.entries();
360
                    List <String> executableFiles = readExecutableFilesList(jarFile);
361
                    List <File> filesToChmod = new ArrayList <File> ();
357
                    while( entries.hasMoreElements() ) {
362
                    while( entries.hasMoreElements() ) {
358
                        JarEntry entry = (JarEntry) entries.nextElement();
363
                        JarEntry entry = (JarEntry) entries.nextElement();
359
                        checkStop();
364
                        checkStop();
 Lines 383-401    Link Here 
383
                                    destFile.getParentFile ().mkdirs ();
388
                                    destFile.getParentFile ().mkdirs ();
384
                                }
389
                                }
385
                                bytesRead = copyStreams( jarFile.getInputStream( entry ), new FileOutputStream( destFile ), bytesRead );
390
                                bytesRead = copyStreams( jarFile.getInputStream( entry ), new FileOutputStream( destFile ), bytesRead );
391
                                if(executableFiles.contains(pathTo)) {
392
                                    filesToChmod.add(destFile);
393
                                }
386
                                UpdaterFrame.setProgressValue( bytesRead );
394
                                UpdaterFrame.setProgressValue( bytesRead );
387
                            }
395
                            }
388
                        } else if ( entry.getName().startsWith( UPDATE_MAIN_DIR )&&
396
                        } else if ( entry.getName().startsWith( UPDATE_MAIN_DIR )&&
389
                                  !entry.isDirectory() ) {
397
                                  !entry.isDirectory() ) {
390
                            // run main                  
398
                            // run main
391
                            File destFile = new File (getMainDirectory (cluster),
399
                            String pathTo = entry.getName().substring(UPDATE_MAIN_DIR.length() + 1);
392
                                entry.getName().substring(UPDATE_MAIN_DIR.length() + 1) );
400
                            File destFile = new File (getMainDirectory (cluster), pathTo);
401
                            if(executableFiles.contains(pathTo)) {
402
                                filesToChmod.add(destFile);
403
                            }
393
                            destFile.getParentFile ().mkdirs ();
404
                            destFile.getParentFile ().mkdirs ();
394
                            hasMainClass = true;
405
                            hasMainClass = true;
395
                            bytesRead = copyStreams( jarFile.getInputStream( entry ), new FileOutputStream( destFile ), bytesRead );
406
                            bytesRead = copyStreams( jarFile.getInputStream( entry ), new FileOutputStream( destFile ), bytesRead );
396
                            UpdaterFrame.setProgressValue( bytesRead );
407
                            UpdaterFrame.setProgressValue( bytesRead );
397
                        }
408
                        }
398
                    }
409
                    }
410
                    chmod(filesToChmod);
399
                    if ( hasMainClass ) {                    
411
                    if ( hasMainClass ) {                    
400
                        MainConfig mconfig = new MainConfig (getMainDirString (cluster) + UpdateTracking.FILE_SEPARATOR + JVM_PARAMS_FILE, cluster);
412
                        MainConfig mconfig = new MainConfig (getMainDirString (cluster) + UpdateTracking.FILE_SEPARATOR + JVM_PARAMS_FILE, cluster);
401
                        if (mconfig.isValid()) {
413
                        if (mconfig.isValid()) {
 Lines 455-461    Link Here 
455
            t.deleteUnusedFiles ();            
467
            t.deleteUnusedFiles ();            
456
        }
468
        }
457
    }
469
    }
458
    
470
471
    private List<String> readExecutableFilesList(JarFile jarFile) {
472
        List<String> list = new ArrayList<String>();
473
        JarEntry executableFilesEntry = jarFile.getJarEntry(EXECUTABLE_FILES_ENTRY);
474
        if (executableFilesEntry != null) {
475
            BufferedReader reader = null;
476
            try {
477
                reader = new BufferedReader(new InputStreamReader(jarFile.getInputStream(executableFilesEntry), "UTF-8"));
478
                String s = null;
479
                while ((s = reader.readLine()) != null) {
480
                    list.add(s);
481
                }
482
                reader.close();
483
            } catch (Exception e) {
484
                e.printStackTrace();
485
            } finally {
486
                if (reader != null) {
487
                    try {
488
                        reader.close();
489
                    } catch (IOException e) {
490
                    }
491
                }
492
            }
493
        }
494
        return list;
495
    }
496
497
    private void chmod(List<File> executableFiles) {
498
        if (isWindows() || executableFiles.isEmpty()) {
499
            return;
500
        }
501
        // Determine if java.io.File.setExecutable method is supported
502
        Method setExecutableMethod = null;
503
        try {
504
            setExecutableMethod = File.class.getMethod("setExecutable", Boolean.TYPE, Boolean.TYPE);
505
        } catch (NoSuchMethodException e) {
506
            e.printStackTrace();
507
        }
508
509
        if (setExecutableMethod != null) {
510
            for (File executableFile : executableFiles) {
511
                try {
512
                    setExecutableMethod.invoke(executableFile, true, false);
513
                } catch (Exception e) {
514
                    e.printStackTrace();
515
                }
516
            }
517
        } else {
518
            // Find chmod
519
            File chmod = new File("/bin/chmod"); // NOI18N
520
            if (!chmod.isFile()) {
521
                chmod = new File("/usr/bin/chmod"); // NOI18N
522
            }
523
            if (chmod.isFile()) {
524
                Process process = null;
525
                try {
526
                    List<String> command = new ArrayList<String>();
527
                    command.add(chmod.getAbsolutePath());
528
                    command.add("a+x");
529
                    for (File executableFile : executableFiles) {
530
                        command.add(executableFile.getAbsolutePath());
531
                    }
532
                    process = new ProcessBuilder(command).start();
533
                    process.waitFor();
534
                } catch (Exception e) {
535
                    e.printStackTrace();
536
                } finally {
537
                    if (process != null) {
538
                        process.destroy();
539
                    }
540
                }
541
542
            }
543
        }
544
    }
545
459
    public static boolean trickyDeleteOnWindows(File destFile) {
546
    public static boolean trickyDeleteOnWindows(File destFile) {
460
        assert isWindows() : "Call it only on Windows but system is " + System.getProperty("os.name");
547
        assert isWindows() : "Call it only on Windows but system is " + System.getProperty("os.name");
461
        File f = new File(destFile.getParentFile(), destFile.getName());
548
        File f = new File(destFile.getParentFile(), destFile.getName());
(-)a/autoupdate.services/manifest.mf (-1 / +1 lines)
 Lines 1-6    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.autoupdate.services
2
OpenIDE-Module: org.netbeans.modules.autoupdate.services
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/services/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/services/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.9
4
OpenIDE-Module-Specification-Version: 1.10
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Essential-Module: true
6
AutoUpdate-Essential-Module: true
(-)a/autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/services/ExecutablePermissionsTest.java (+174 lines)
Line 0    Link Here 
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2008 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
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
package org.netbeans.modules.autoupdate.services;
42
43
import java.io.File;
44
import java.io.IOException;
45
import java.io.InputStream;
46
import java.lang.reflect.Method;
47
import java.util.HashMap;
48
import java.util.Map;
49
import org.netbeans.api.autoupdate.UpdateUnit;
50
import org.netbeans.spi.autoupdate.UpdateItem;
51
import org.netbeans.spi.autoupdate.UpdateProvider;
52
53
/**
54
 *
55
 * @author Dmitry Lipin
56
 */
57
public class ExecutablePermissionsTest extends NbmAdvancedTestCase {
58
59
    private UpdateProvider p = null;
60
    private String testModuleVersion = "1.0";
61
    private String testModuleName = "org.yourorghere.executable.permissions";
62
63
    public ExecutablePermissionsTest(String name) {
64
        super(name);
65
    }
66
67
    @Override
68
    protected void setUp() throws IOException, Exception {
69
        super.setUp();
70
    }
71
72
    @Override
73
    public boolean canRun() {
74
        return super.canRun() && !System.getProperty("os.name").startsWith("Windows");
75
    }
76
77
    private String generateExecutablePermissionsModuleElement() {
78
        String res = "\n<module codenamebase=\"" + testModuleName + "\" " +
79
                "homepage=\"http://www.netbeans.org/\" distribution=\"nbresloc:/org/netbeans/api/autoupdate/data/org-yourorghere-executable-permissions.nbm\" " +
80
                "license=\"standard-nbm-license.txt\" downloadsize=\"5122\" " +
81
                "needsrestart=\"false\" moduleauthor=\"\" " +
82
                "eager=\"false\" " +
83
                "releasedate=\"2006/02/23\">\n";
84
        res += "<manifest OpenIDE-Module=\"" + testModuleName + "\" " +
85
                "OpenIDE-Module-Name=\"" + testModuleName + "\" " +
86
                "AutoUpdate-Show-In-Client=\"true\" " +
87
                "OpenIDE-Module-Specification-Version=\"" + testModuleVersion + "\"/>\n";
88
        res += "</module>";
89
        return res;
90
    }
91
92
    public void testExecutablePermissionsModule() throws IOException {
93
        String os = !org.openide.util.Utilities.isUnix() ? "Windows" : "Unix";
94
        String catalog = generateCatalog(generateExecutablePermissionsModuleElement());
95
96
        p = createUpdateProvider(catalog);
97
        p.refresh(true);
98
99
        Map<String, UpdateUnit> unitImpls = new HashMap<String, UpdateUnit>();
100
        Map<String, UpdateItem> updates = p.getUpdateItems();
101
        assertNotNull("Some modules are installed.", updates);
102
        assertFalse("Some modules are installed.", updates.isEmpty());
103
        assertTrue(testModuleName + " found in parsed items.", updates.keySet().contains(testModuleName + "_" + testModuleVersion));
104
105
        Map<String, UpdateUnit> newImpls = UpdateUnitFactory.getDefault().appendUpdateItems(unitImpls, p);
106
        assertNotNull("Some units found.", newImpls);
107
        assertFalse("Some units found.", newImpls.isEmpty());
108
109
        UpdateUnit u1 = newImpls.get(testModuleName);
110
        installUpdateUnit(u1);
111
        File f = new File(userDir, "bin/start.sh");
112
        assertTrue("File " + f + " should exist after module installation", f.exists());
113
        if (System.getProperty("java.version").startsWith("1.5")) {
114
            File ls = new File("/bin/ls");
115
            if (!ls.isFile()) {
116
                ls = new File("/usr/bin/ls");
117
            }
118
            if (ls.isFile()) {
119
                String output = readCommandOutput(ls.getAbsolutePath(), "-la", f.getAbsolutePath()).trim();
120
                int index = output.indexOf(" ");
121
                assertFalse("Can`t read permissions from output:\n" + output, index == -1);
122
                String permissions = output.substring(0, index);
123
                assertTrue("File " + f + " does not have executable permissions after installation, actual perms : " + permissions,
124
                        permissions.matches(".*x.*x.*x.*"));
125
            }
126
        } else {
127
            Method canExecuteMethod = null;
128
            try {
129
                canExecuteMethod = File.class.getMethod("canExecute", new Class[]{});
130
            } catch (Exception e) {
131
                assertTrue("java.io.File.canExecute method is not accessible", false);
132
            }
133
            boolean canExecute = false;
134
            try {
135
                canExecute = (Boolean) canExecuteMethod.invoke(f);
136
            } catch (Exception e) {
137
                assertTrue("File " + f + " is not executable after module installation", canExecute);
138
                e.printStackTrace();
139
            }
140
        }
141
    }
142
143
    private String readCommandOutput(String... command) {
144
        ProcessBuilder builder = new ProcessBuilder(command);
145
        boolean doRun = true;
146
        StringBuilder sb = new StringBuilder();
147
        byte[] bytes = new byte[8192];
148
        int c = 0;
149
150
        try {
151
            Process process = builder.start();
152
            while (doRun) {
153
                try {
154
                    Thread.sleep(20);
155
                } catch (InterruptedException e) {
156
                }
157
                try {
158
                    process.exitValue();
159
                    doRun = false;
160
                } catch (IllegalThreadStateException e) {
161
                    ; // do nothing - the process is still running
162
                }
163
                InputStream is = process.getInputStream();
164
                while ((c = is.read(bytes)) != -1) {
165
                    sb.append(new String(bytes, 0, c));
166
                }
167
            }
168
            return sb.toString();
169
        } catch (IOException e) {
170
            e.printStackTrace();
171
            return new String();
172
        }
173
    }
174
}
(-)a/nbbuild/antsrc/org/netbeans/nbbuild/MakeNBM.java (-4 / +54 lines)
 Lines 73-82    Link Here 
73
import javax.xml.parsers.ParserConfigurationException;
73
import javax.xml.parsers.ParserConfigurationException;
74
import org.apache.tools.ant.AntClassLoader;
74
import org.apache.tools.ant.AntClassLoader;
75
import org.apache.tools.ant.BuildException;
75
import org.apache.tools.ant.BuildException;
76
import org.apache.tools.ant.DirectoryScanner;
76
import org.apache.tools.ant.Project;
77
import org.apache.tools.ant.Project;
77
import org.apache.tools.ant.Task;
78
import org.apache.tools.ant.Task;
78
import org.apache.tools.ant.taskdefs.Jar;
79
import org.apache.tools.ant.taskdefs.Jar;
79
import org.apache.tools.ant.taskdefs.SignJar;
80
import org.apache.tools.ant.taskdefs.SignJar;
81
import org.apache.tools.ant.types.FileSet;
80
import org.apache.tools.ant.types.Path;
82
import org.apache.tools.ant.types.Path;
81
import org.apache.tools.ant.types.ZipFileSet;
83
import org.apache.tools.ant.types.ZipFileSet;
82
import org.w3c.dom.DOMImplementation;
84
import org.w3c.dom.DOMImplementation;
 Lines 320-326    Link Here 
320
    private ArrayList<Attributes> moduleAttributes = null;
322
    private ArrayList<Attributes> moduleAttributes = null;
321
    private Attributes englishAttr = null;
323
    private Attributes englishAttr = null;
322
    private Path updaterJar;
324
    private Path updaterJar;
323
    
325
    private FileSet executablesSet;
326
324
    /** Try to find and create localized info.xml files */
327
    /** Try to find and create localized info.xml files */
325
    public void setLocales(String s) {
328
    public void setLocales(String s) {
326
        locales = new ArrayList<String>();
329
        locales = new ArrayList<String>();
 Lines 342-347    Link Here 
342
    public void setFile(File file) {
345
    public void setFile(File file) {
343
        this.file = file;
346
        this.file = file;
344
    }
347
    }
348
349
    /** List of executable files in NBM concatinated by ${line.separator}. */
350
    public FileSet createExecutables() {
351
        return (executablesSet = new FileSet());
352
    }
345
    
353
    
346
    /** Module manifest needed for versioning.
354
    /** Module manifest needed for versioning.
347
     * @deprecated Use {@link #setModule} instead.
355
     * @deprecated Use {@link #setModule} instead.
 Lines 638-649    Link Here 
638
 	UpdateTracking tracking = new UpdateTracking(productDir.getAbsolutePath());
646
 	UpdateTracking tracking = new UpdateTracking(productDir.getAbsolutePath());
639
 	String files[] = tracking.getListOfNBM( codename );
647
 	String files[] = tracking.getListOfNBM( codename );
640
 	ZipFileSet fs = new ZipFileSet();
648
 	ZipFileSet fs = new ZipFileSet();
649
        List <String> moduleFiles = new ArrayList <String>();
641
 	fs.setDir( productDir );
650
 	fs.setDir( productDir );
642
 	for (int i=0; i < files.length; i++)
651
 	for (int i=0; i < files.length; i++) {
643
 	    fs.createInclude().setName( files[i] );
652
 	    fs.createInclude().setName( files[i] );
653
            moduleFiles.add(files[i]);
654
        }
644
 	fs.setPrefix("netbeans/");
655
 	fs.setPrefix("netbeans/");
645
656
646
	// JAR it all up together.
657
        // JAR it all up together.
647
        long jarModified = nbm.lastModified(); // may be 0
658
        long jarModified = nbm.lastModified(); // may be 0
648
	//log ("Ensuring existence of NBM file " + file);
659
	//log ("Ensuring existence of NBM file " + file);
649
	Jar jar = (Jar) getProject().createTask("jar");
660
	Jar jar = (Jar) getProject().createTask("jar");
 Lines 657-664    Link Here 
657
        if (main != null) { // Add the main dir
668
        if (main != null) { // Add the main dir
658
            main.setPrefix("main"); // use main prefix
669
            main.setPrefix("main"); // use main prefix
659
            jar.addZipfileset(main);
670
            jar.addZipfileset(main);
671
            DirectoryScanner ds = main.getDirectoryScanner();
672
            ds.scan();
673
            String  [] mainFiles = ds.getIncludedFiles();
674
            for(String m : mainFiles) {
675
                moduleFiles.add(m);
676
            }
660
        }
677
        }
661
            
678
679
680
        DirectoryScanner eds = executablesSet.getDirectoryScanner();
681
        eds.scan();
682
        String  [] executables = eds.getIncludedFiles();
683
684
        if(executables.length > 0) {
685
            ZipFileSet executablesList = new ZipFileSet();
686
            File executablesFile;
687
            StringBuilder sb = new StringBuilder("");
688
                String ls = System.getProperty("line.separator");
689
                for(int i=0;i < executables.length;i++) {
690
                    if(i!=0) {
691
                        sb.append(ls);
692
                    }
693
                    sb.append(executables[i].replace("\\","/"));
694
                }
695
            try {
696
                executablesFile = File.createTempFile("executables",".list");
697
                OutputStream infoStream = new FileOutputStream (executablesFile);
698
                try {
699
                    infoStream.write(sb.toString().getBytes("UTF-8"));
700
                } finally {
701
                    infoStream.close ();
702
                }
703
            } catch (IOException e) {
704
                throw new BuildException("exception when creating Info/executables.list", e, getLocation());
705
            }
706
            executablesFile.deleteOnExit();
707
            executablesList.setFile(executablesFile);
708
            executablesList.setFullpath("Info/executables.list");
709
            jar.addZipfileset(executablesList);
710
        }
711
662
        jar.setCompress(true);
712
        jar.setCompress(true);
663
	jar.setLocation(getLocation());
713
	jar.setLocation(getLocation());
664
	jar.init ();
714
	jar.init ();
(-)a/nbbuild/templates/common.xml (-3 / +32 lines)
 Lines 251-257    Link Here 
251
            <fileset dir="${release.dir}">
251
            <fileset dir="${release.dir}">
252
                <patternset includes="${release.files}"/>
252
                <patternset includes="${release.files}"/>
253
            </fileset>
253
            </fileset>
254
        </copy>
254
        </copy>        
255
    </target>
256
257
    
258
    <target name="chmod-executables" depends="-init-executables" if="has.executables">
259
        <chmod perm="a+x" dir="${cluster}">
260
            <fileset refid="module.executable.files"/>
261
        </chmod>
255
    </target>
262
    </target>
256
263
257
    <target name="verify-class-linkage" depends="jar,release">
264
    <target name="verify-class-linkage" depends="jar,release">
 Lines 264-270    Link Here 
264
    <target name="-verify-apichanges"/><!-- just for overriding -->
271
    <target name="-verify-apichanges"/><!-- just for overriding -->
265
272
266
    <target name="netbeans" depends="init,jar,netbeans-extra,module-xml-regular,module-xml-autoload,
273
    <target name="netbeans" depends="init,jar,netbeans-extra,module-xml-regular,module-xml-autoload,
267
            module-xml-eager,javahelp,module-auto-deps,release,verify-class-linkage,-verify-apichanges">
274
            module-xml-eager,javahelp,module-auto-deps,release,chmod-executables,verify-class-linkage,-verify-apichanges">
268
        <property name="module.files.toString" refid="module.files"/>
275
        <property name="module.files.toString" refid="module.files"/>
269
        <echo level="verbose">Basic matching module files: ${module.files.toString}</echo>
276
        <echo level="verbose">Basic matching module files: ${module.files.toString}</echo>
270
        <genlist outputfiledir="${cluster}" module="${module.jar}">
277
        <genlist outputfiledir="${cluster}" module="${module.jar}">
 Lines 332-338    Link Here 
332
    <target name="-nbm-prompt-for-storepass" if="keystore" unless="storepass">
339
    <target name="-nbm-prompt-for-storepass" if="keystore" unless="storepass">
333
        <input addproperty="storepass" message="Enter password for ${keystore}:"/>
340
        <input addproperty="storepass" message="Enter password for ${keystore}:"/>
334
    </target>
341
    </target>
335
    <target name="nbm" depends="init,netbeans,-nbm-prompt-for-storepass" description="Build NBM archive.">
342
343
    <target name="-init-executables" depends="-check-executables,-define-executables-reference-defined,-define-executables-reference-undefined"/>
344
345
    <target name="-check-executables">
346
        <condition property="has.executables">
347
            <and>
348
            <isset property="nbm.executable.files"/>
349
            <not>
350
               <equals arg1="${nbm.executable.files}" arg2=""/>
351
            </not>
352
            </and>
353
        </condition>
354
    </target>
355
356
    <target name="-define-executables-reference-defined" if="has.executables">
357
        <fileset dir="${cluster}" id="module.executable.files" includes="${nbm.executable.files}"/>
358
    </target>
359
    <target name="-define-executables-reference-undefined" unless="has.executables">
360
        <fileset dir="${cluster}" id="module.executable.files" excludes="**"/>
361
    </target>
362
363
    <target name="nbm" depends="init,netbeans,-nbm-prompt-for-storepass,-init-executables" description="Build NBM archive.">
336
        <mkdir dir="build"/>
364
        <mkdir dir="build"/>
337
        <property name="nbm.target.cluster" value=""/> <!-- fallback -->
365
        <property name="nbm.target.cluster" value=""/> <!-- fallback -->
338
        <property name="license.file.override" value="${license.file}"/>
366
        <property name="license.file.override" value="${license.file}"/>
 Lines 354-359    Link Here 
354
                    <filename name="modules/ext/updater.jar"/>
382
                    <filename name="modules/ext/updater.jar"/>
355
                </pathfileset>
383
                </pathfileset>
356
            </updaterjar>
384
            </updaterjar>
385
            <executables refid="module.executable.files"/>
357
        </makenbm>
386
        </makenbm>
358
    </target>
387
    </target>
359
388

Return to bug 24357
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo