3
votes

I'm trying to create a PHP project from SVN Repository with Netbeans 7.0.1 but I can't. Context: There are three users, two uses Macs and I'm using Windows 7 64 bits. I needed to add

-J-Dline.separator=LF 

to netbeans.conf to be able to work with the Mac's developers.

Everything was working until a SVN folder restructure went on. Now I can checkout the project but then, I select to create a new PHP project from Existiing sources and it says

org.xml.sax.SAXParseException: Content is not allowed in prolog. 

Checking in the file nbproject/project.xml, this is the content.

<?xml version="1.0" encoding="UTF-8"?>LF<project xmlns="http://www.netbeans.org/ns/project/1">LF    <type>org.netbeans.modules.php.project</type>LF    <configuration/>LF</project>LF

Which seems to be wrong. I really don't know what else I can try. Any help will be really appretiated. Thanks! Guillermo.

3

3 Answers

1
votes

As a short-term fix, edit the nbproject/project.xml and replace those LFs with newlines, and re-try the 'create a new PHP project from Existing sources'

Longer term, you may need to file a bug with http://netbeans.org/community/issues.html, line termination is covered at http://wiki.netbeans.org/FaqEditorEOLs, which suggests this is unnecessary.

Based on Setting Java VM line.separator, you should be using -Dline.separator=$'\n', but you might have better results editing the subversion client config, and adding the following:

[miscellany]
enable-auto-props=yes

[auto-props]
# Repeat for all text files in your project
*.html = svn:eol-style=native
*.xml = svn:eol-style=native
*.php = svn:eol-style=native
*.js = svn:eol-style=native
1
votes

I used Netbeans with SVN plugin in a team project for a few month. We often encountered problems with non-successful commits, tree conflicts and random losses of code updates.

Maybe it was my messy working style, I don't blame Netbeans for that. But then I switched to Tortoise for taking care of the subversion repo and Netbeans for coding work. Especially checkouts and editing conflicts are a lot more comfortable with Tortoise. After the seperation, things run a lot smoother. My 0,02$.

0
votes

Finally I'm able to work again. The solution was to uninstall Netbeans (including the config folder under Users/[User].netbeans The problem before was that the uninstall process didn't work (nothing happened) so I read that I can manually remove the Netbeans installation folder and install it again, but that procedure didn't remove .netbeans folder under Users folder and I was back in the starting point. After the deletion of every folder related to Netbeans and installing it again, it finally worked as expected. Regards. Guillermo.