无法使用 Netbeans 7.0.1 从 SVN 存储库创建 PHP 项目

发布于 2024-12-11 05:15:22 字数 686 浏览 0 评论 0原文

我正在尝试使用 Netbeans 7.0.1 从 SVN 存储库创建 PHP 项目,但不能。 上下文:有三个用户,两个使用 Mac,我使用 Windows 7 64 位。我需要添加

-J-Dline.separator=LF 

到 netbeans.conf 才能与 Mac 开发人员合作。

一切正常,直到 SVN 文件夹重组开始。现在我可以签出该项目,但随后,我选择从现有源创建一个新的 PHP 项目,它显示

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

正在签入文件 nbproject/project.xml,这就是内容。

<?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

这似乎是错误的。 我真的不知道我还能尝试什么。 任何帮助将非常感激。 谢谢!吉列尔莫.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧人 2024-12-18 05:15:23

作为短期修复,编辑 nbproject/project.xml 并将这些 LF 替换为换行符,然后重新尝试“从现有源创建新的 PHP 项目”。

从长远来看,您可能需要使用 http://netbeans.org/community/issues.html,线路终止位于 http://wiki.netbeans.org/FaqEditorEOLs,这表明这是不必要的。

基于 设置 Java VM line.separator,您应该使用 -Dline .separator=$'\n',但编辑 subversion 客户端配置并添加以下内容可能会获得更好的结果:

[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

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
在巴黎塔顶看东京樱花 2024-12-18 05:15:23

我在一个团队项目中使用 Netbeans 和 SVN 插件几个月了。我们经常遇到提交不成功、树冲突和代码更新随机丢失等问题。

也许这是我混乱的工作方式,我不会为此责怪 Netbeans。但后来我转而使用 Tortoise 来处理 subversion 存储库,并使用 Netbeans 来处理编码工作。尤其是检查和编辑冲突,使用 Tortoise 更舒服。分开之后,一切都顺利了很多。我的 0.02 美元。

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$.

放我走吧 2024-12-18 05:15:23

我终于可以再次工作了。
解决方案是卸载Netbeans(包括Users/[User].netbeans下的config文件夹
之前的问题是卸载过程不起作用(什么也没发生),所以我读到我可以手动删除 Netbeans 安装文件夹并再次安装它,但该过程没有删除 Users 文件夹下的 .netbeans 文件夹,我又回来了在起点。将所有与Netbeans相关的文件夹删除并重新安装后,终于按预期工作了。
问候。吉列尔莫.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文