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.

Bug 51617 - Tag Problems in build-impl.xml for 4.0 beta2
Summary: Tag Problems in build-impl.xml for 4.0 beta2
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-18 01:32 UTC by Andre Bonin
Modified: 2004-11-19 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
My Build.xml file (24.95 KB, text/plain)
2004-11-18 01:39 UTC, Andre Bonin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Bonin 2004-11-18 01:32:08 UTC
After NetBeans 4.0 beta2 build 200409220845 
Generated my project, it also generated the 
build-impl.xml file (as expected).

When clicking rebuild (or build) from the 
project, an error occures during the building 
process. 

The code compiles fine but the actual building 
of the 'jar' file in dist fails. (Compiling 
using java 1.5)

The error is in the "j2seproject" tag.

build-impl.xml:511: The 
<http://www.netbeans.org/ns/j2se-project/1:jar> 
type doesn't support the "name" attribute.
BUILD FAILED (total time: 5 seconds)

Removing the "Name" attribute from the tag 
results in another error.  

"Manifest is invalid: Manifest sections should 
start with a "Name" attribute and not "X-
COMMENT""


Here is the appropriate XML section that fails 
(the second tag is the erroneous one, 
j2seproject)


    <target name="-do-jar-with-mainclass" 
depends="init,compile,-pre-pre-jar,-pre-jar" 
if="manifest.available+main.class">
        <j2seproject:jar Name="MyProject.jar" 
manifest="${manifest.file}" 
xmlns:j2seproject="http://www.netbeans.org/ns/j2s
e-project/1">
            <manifest 
xmlns="http://www.netbeans.org/ns/j2se-
project/1">
                <attribute 
j2seproject:name="Main-Class" 
value="${main.class}"/>
            </manifest>
        </j2seproject:jar>
    </target>
Comment 1 Andre Bonin 2004-11-18 01:39:13 UTC
Created attachment 18941 [details]
My Build.xml file
Comment 2 David Konecny 2004-11-18 09:52:02 UTC
I've never seen this before. The 'Name="MyProject.jar"' should not be
there! How could it get there is not clear to me but if it was
reproducible then any project would be affected and we would get such
a bug report sooner. So I guess it must be result of something special
in your configuration.

Removing such an attribute makes build successful. The second error
you mentioned is caused by the content of your manifest file which is
unknown to me.

Please provide detailed steps how to reproduce, on which JDK. Could
you also try different JDK? Feel free to reopen with more info.

Milan, could you please try to reproduce it too? Thanks.
Comment 3 Milan Kubec 2004-11-18 14:43:04 UTC
I will try to reproduce that as soon as there is any clue how. Have
never seen it.
Comment 4 Milan Kubec 2004-11-19 10:45:15 UTC
Based on info send to me privately I still cannot say what might be
the problem. Leaving RESOLVED. Please, if you encounter the problem
again reopen the issue and explain steps you did and possibly describe
your environment.