将Subversion代码签入Eclipse后,如何构建它? [英] After checking out Subversion code into Eclipse, how do I get it to build?

查看:56
本文介绍了将Subversion代码签入Eclipse后,如何构建它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题让我很沮丧...

This problem has been frustrating me for some time...

许多网站(例如Sourceforge)都使用SVN或Subversion来管理其代码.用C ++编译SVN代码几乎没有问题,但是当涉及到Java时,我的IDE让我头疼.

A lot of sites like Sourceforge use SVN or Subversion to manage their code. I have little problem compiling SVN code in C++, but when it comes to Java, my IDE gives me a headache.

我已经安装了Subclipse for SVN对Eclipse的支持,并且可以使用.我可以将任何代码签出到我的工作区中.现在,Subclipse会将整个内容放入一个无法编译的特殊项目中.因此,我在Google上搜索了一些东西,然后提出了修改Eclipse XML文件的方法,以将自然"指定为Java项目.

I've installed Subclipse for SVN support for Eclipse, and it works. I can check out any code into my Workspace. Now Subclipse will put the whole thing into a special project of some sort that can't be compiled. So I search Google for something and I come up with modifying the eclipse XML file to specify the 'nature' to be a Java project.

好的,现在它是一个Java项目.假设我有一个类似的文件夹结构:

Okay, now it's a Java project. Say I have a folder structure like:

\src
\data
\graphics

我收到800个编译器错误,抱怨软件包名称是 org.company.SomePackage 而不是 src.org.company.SomePackage .

I get 800 compiler errors complaining the package name is org.company.SomePackage instead of src.org.company.SomePackage.

然后我要做的是创建称为src,数据,图形等的,而不只是文件夹.我将文件夹中的所有内容剪切并粘贴到程序包中,然后最终可以对其进行编译.

Then what I do is create packages called src, data, graphics, etc, instead of just folders. I cut and paste everything in the folders into the packages and finally I can compile it.

有什么更好的方法?

我只能将任何SVN检出为SVN项目,并且Eclipse中无法将其更改为Java项目.首先如何将SVN作为Java项目签出?

I can only check out anything SVN as a SVN project, and there's no way within Eclipse to change that to a Java project. How can I check out the SVN as a java project in the first place?

推荐答案

我收到800个编译器错误投诉包裹名称是org.company.SomePackage代替src.org.company.SomePackage.

I get 800 compiler errors complaining the package name is org.company.SomePackage instead of src.org.company.SomePackage.

右键单击项目"->属性"->"Java构建路径"->源"选项卡->添加"src"作为源文件夹,然后删除其他任何文件夹.

Right click on Project -> Properties -> Java Build Path -> Source Tab -> Add "src" as a source folder and remove any others.

这篇关于将Subversion代码签入Eclipse后,如何构建它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆