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 244408 - nb-configuration.xml mixed line endings
Summary: nb-configuration.xml mixed line endings
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 18:05 UTC by mdeggersbeans
Modified: 2016-07-07 08:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
message.log section when the error occurs (4.99 KB, text/plain)
2014-05-09 18:05 UTC, mdeggersbeans
Details
Screen capture of new project wizard (66.64 KB, image/png)
2015-06-23 20:00 UTC, mdeggersbeans
Details
Screen capture of new project wizard (50.34 KB, image/png)
2015-06-23 20:01 UTC, mdeggersbeans
Details
Screen capture of new project wizard (42.42 KB, image/png)
2015-06-23 20:01 UTC, mdeggersbeans
Details
Screen capture of new project wizard (163.07 KB, image/png)
2015-06-23 20:02 UTC, mdeggersbeans
Details
flip -t output for nb-configuration.xml (50.06 KB, image/png)
2015-06-23 20:03 UTC, mdeggersbeans
Details
Editing nb-configuration.xml in vim before fix (78.90 KB, image/png)
2015-06-23 20:04 UTC, mdeggersbeans
Details
Fixing nb-configuration.xml in vim (77.43 KB, image/png)
2015-06-23 20:04 UTC, mdeggersbeans
Details
nb-configuration.xml fixed in vim (76.67 KB, image/png)
2015-06-23 20:05 UTC, mdeggersbeans
Details
nb-configuration.xml now shows as UNIX line endings (64.14 KB, image/png)
2015-06-23 20:06 UTC, mdeggersbeans
Details
Converting nb-configuration.xml to DOS line endings (74.99 KB, image/png)
2015-06-23 20:07 UTC, mdeggersbeans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mdeggersbeans 2014-05-09 18:05:32 UTC
Created attachment 147210 [details]
message.log section when the error occurs

nb-configuration.xml is created with mixed line endings when a Maven project is created (could happen in other cases). This was confirmed by running:

flip -t nb-configuration.xml

in a Cygwin shell. Flip is a command that determines, UNIX, DOS, MAC, UNKNOWN, or MIXED line endings, and can also change the file to the desired line ending.

If you have auto-props=yes and *.xml = svn:eol-style=native in your subversion config file, this will cause problems when importing the project into a subversion repository.

Workarounds include using Cygwin's unix2dos command (if you're on Windows), or not checking in the file.

Log snippet is attached.
Comment 1 Tomas Stupka 2014-07-09 14:39:20 UTC
could not reproduce. 
please provide exact steps how to create nb-configuration.xml with mixed endings

thanks
Comment 2 mdeggersbeans 2015-06-23 19:58:53 UTC
Here's a detailed description on how this works.

Please note, that this is now with the latest 8.0.2 updates as well as the latest JDK 8:

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

I've also included screen captures.

The first four screen captures (CAP0000.png - CAP0003.png) go through the standard New Project Wizard, creating a J2EE 5 web application to run on Tomcat 7.0.62.

The fifth screen (CAP0004.png) capture shows the output of flip -t (cygwin bash shell) for nb-configuration.xml. As can be seen, the file is classified as MIXED.

Opening up the file in vim (see the sixth screen capture, CAP0005.png) shows the ^M (carriage return) at the end of the lines.

The seventh and eighth screen captures (CAP0006.png, CAP0007.png) show those line ending being fixed in vim.

The result of that repair is shown in the ninth screen capture (CAP0008.png). Flip now shows that the file is UNIX.

The tenth screen capture (CAP0009.png) shows the result from a unix2dos command (cygwin), and a followup flip command. The file is now DOS.

Some other things that may influence the line endings:

1. I use an external Maven (3.2.5)
2. I have my workplace set to UTF-8 in netbeans.conf with:

-J-Dfile.encoding=UTF-8

This is because I occasionally work with files containing diacritics and target Linux servers.
Comment 3 mdeggersbeans 2015-06-23 20:00:39 UTC
Created attachment 154354 [details]
Screen capture of new project wizard
Comment 4 mdeggersbeans 2015-06-23 20:01:02 UTC
Created attachment 154355 [details]
Screen capture of new project wizard
Comment 5 mdeggersbeans 2015-06-23 20:01:28 UTC
Created attachment 154356 [details]
Screen capture of new project wizard
Comment 6 mdeggersbeans 2015-06-23 20:02:19 UTC
Created attachment 154357 [details]
Screen capture of new project wizard
Comment 7 mdeggersbeans 2015-06-23 20:03:11 UTC
Created attachment 154358 [details]
flip -t output for nb-configuration.xml
Comment 8 mdeggersbeans 2015-06-23 20:04:07 UTC
Created attachment 154359 [details]
Editing nb-configuration.xml in vim before fix
Comment 9 mdeggersbeans 2015-06-23 20:04:58 UTC
Created attachment 154360 [details]
Fixing nb-configuration.xml in vim
Comment 10 mdeggersbeans 2015-06-23 20:05:38 UTC
Created attachment 154361 [details]
nb-configuration.xml fixed in vim
Comment 11 mdeggersbeans 2015-06-23 20:06:37 UTC
Created attachment 154362 [details]
nb-configuration.xml now shows as UNIX line endings
Comment 12 mdeggersbeans 2015-06-23 20:07:10 UTC
Created attachment 154363 [details]
Converting nb-configuration.xml to DOS line endings
Comment 13 Martin Balin 2016-07-07 08:38:37 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss