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.
Summary: | manifest.mf is not processed for java applet project | ||
---|---|---|---|
Product: | java | Reporter: | estarkov <estarkov> |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jglick |
Priority: | P3 | Keywords: | REGRESSION |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Reproducing Project |
Description
estarkov
2009-06-11 06:42:26 UTC
Similar things happen in Final Release as well. Investigating shows that the new target -do-jar-with-libraries-without-manifest is invoked though a manifest is available. In fact, the situation is even worse: A library jar (Standard project created by NB67, provided with a manifest, but containing no main class) will be built twice: - first by target -do-jar-with-manifest (containing the specified manifest) - second by target -do-jar-with-libraries-without-manifest (containing a *DEFAULT* manifest) The resulting JAR in ${dist.dir} will not contain the contents of the specified manifest. Created attachment 84333 [details]
Reproducing Project
Steps to reproduce: 1. Create a new project for a Java Class Library 2. Add a package (com.foo) and a source file (A.java) in this package 3. Create a manifest.mf in the project's root containing e.g. "Implementation-Vendor: com.foo" 4. Execute "Clean and Build Project" The output window shows init: deps-clean: Deleting directory C:\Source\Tools\JavaLibrary1\build Deleting directory C:\Source\Tools\JavaLibrary1\dist clean: init: deps-jar: Created dir: C:\Source\Tools\JavaLibrary1\build\classes Created dir: C:\Source\Tools\JavaLibrary1\build\empty Compiling 1 source file to C:\Source\Tools\JavaLibrary1\build\classes compile: Created dir: C:\Source\Tools\JavaLibrary1\dist Building jar: C:\Source\Tools\JavaLibrary1\dist\JavaLibrary1.jar Building jar: C:\Source\Tools\JavaLibrary1\dist\JavaLibrary1.jar Not copying the libraries. jar: BUILD SUCCESSFUL (total time: 0 seconds) Note that the jar is built twice and the resulting jar's manifest does not contain the Implementation-Vendor. >System Info: Product Version = NetBeans IDE 6.7 (Build 200906241340) Operating System = Windows Vista version 6.0 running on x86 Java; VM; Vendor = 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_14-b08 attachment #84333 [details] contains complete project and verbose output log of running target 'jar' after a 'clean'. *** Issue 167315 has been marked as a duplicate of this issue. *** It seems that build-impl.xml doesn't support java library project (no main class) with manifest, because in such a project property 'manifest.available+main.class' is not defined and target '-do-jar-with-libraries-without-manifest' is executed and <copylibs> task does new jar processing, but without manifest file. Jesse, was "java library with manifest file" use case omitted intentionally? Probably just an oversight. If there is a reproducible test case, should be straightforward to fix. BTW I recommend adding a new test case to BuildImplTest to verify all the different combinations. Fixed in jet-main: 632b7153604d |