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.
Seems like for Windows users, project.xml is NL format and build.xml/build-impl.xml are mostly CRNL with block comments being NL format. Strange and liable to confuse a VCS. May depend on the newline gender of the machine that made the build, so check against an official dev build made on Solaris.
*** Issue 48938 has been marked as a duplicate of this issue. ***
It seems to be more general issue of XML files - see ${userdir}/config/Services/*.settings files.
The project.xml case was fixed in: Checking in src/org/openide/xml/XMLUtilImpl.java new revision: 1.13; previous revision: 1.12
As for the build.xml and build-impl.xml generation I'm close to giving this up. It is job of serializer to produce correct EOL character. Looking at source code of com.sun.org.apache.xml.internal.serializer.ToStream which is serializer used on JDK1.5 (on JDK1.4.2 it is different class) and grepping usage of "m_lineSep" it looks that it is aware of line ending issue, but then if you look at method comment() it simply writes whatever it gets. Bug? On JDK1.4.2 when <xsl:comment> contains some other xsl tag (that's what build.xsl does) the line ending is correct! But I guess it is bug which was fixed in JDK1.5 because line endings are always consistenly wrong for comments on Windows on JDK1.5. The possible workaround is: 1.) wrap each line of comment in <xsl:comment></xsl:comment>. We wanted to moved most of the comments to user documentation anyway, so this seems the easiest to do. 2.) After getting result byte stream in GeneratedFilesHelper.generateBuildScriptFromStylesheet simply fix all the line endings according to platform. Re. "settings files" - I need to look at it yet.
Re. "settings files" - no, it is different bug directly in core/settings module. I will fix that too.
.setting files problems fixed in: src/org/netbeans/modules/settings/convertors/XMLPropertiesConvertor.java; new revision: 1.8; previous revision: 1.7 src/org/netbeans/modules/settings/convertors/XMLSettingsSupport.java; new revision: 1.25; previous revision: 1.24
Suggest workaround #2 for project.xml, together with filing a JDK bug (JAXP component I guess). But only where we are using proper JAXP APIs (i.e. XSLT output to stream); not XMLUtil, where we just use reflection to find the serializer.
Fixed, but JDK issue needs to be filed. src/org/netbeans/spi/project/support/ant/GeneratedFilesHelper.java; new revision: 1.8; previous revision: 1.7 test/unit/src/org/netbeans/spi/project/support/ant/GeneratedFilesHelperTest.java; new revision: 1.5; previous revision: 1.4 test/unit/src/org/netbeans/spi/project/support/ant/data/build.xsl; new revision: 1.4; previous revision: 1.3
Filed as JDK bug <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6185184>
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.