如何将Eclipse中的SVN项目作为Java项目检出?

时间:2021-07-17 11:04:03

I was trying to check out a project from SVN using Eclipse. I tried using "Checkout As" to make it into a "Java project from existing Ant script", but the project wizard requires the file to have already been downloaded. Is there a way to checkout the project into Eclipse as a Java project, without having to download it elsewhere first?

我试图使用Eclipse从SVN查看项目。我尝试使用“Checkout As”将其变为“来自现有Ant脚本的Java项目”,但项目向导要求已经下载了该文件。有没有办法将项目签入Eclipse作为Java项目,而不必先将其下载到其他地方?

(I am using Eclipse Ganymade 3.4.1 with Subversive.)

(我正在使用带有Subversive的Eclipse Ganymade 3.4.1。)

5 个解决方案

#1


20  

If it wasn't checked in as a Java Project, you can add the java nature as shown here.

如果未将其作为Java项目签入,则可以添加java性质,如下所示。

#2


37  

Here are the steps:

以下是步骤:

  • Install the subclipse plugin (provides svn connectivity in eclipse) and connect to the repository. Instructions here: http://subclipse.tigris.org/install.html
  • 安装subclipse插件(在eclipse中提供svn连接)并连接到存储库。说明:http://subclipse.tigris.org/install.html

  • Go to File->New->Other->Under the SVN category, select Checkout Projects from SVN.
  • 转到文件 - >新建 - >其他 - >在SVN类别下,从SVN中选择结帐项目。

  • Select your project's root folder and select checkout as a project in the workspace.
  • 选择项目的根文件夹,然后选择checkout作为工作区中的项目。

It seems you are checking the .project file into the source repository. I would suggest not checking in the .project file so users can have their own version of the file. Also, if you use the subclipse plugin it allows you to check out and configure a source folder as a java project. This process creates the correct .project for you(with the java nature),

您似乎正在将.project文件检入源存储库。我建议不要检查.project文件,以便用户可以拥有自己的文件版本。此外,如果您使用subclipse插件,它允许您签出并配置源文件夹作为Java项目。这个过程为你创建了正确的.project(具有java性质),

#4


1  

I had to add the .classpath too, form a java project. I made a dummy java project and looked in the workspace for this dummy java project to see what is required. I transferred the two files. profile and .claspath to my checked out, and disconnected source from my subversion server. From then on it turned to a java project from just a plain old project.

我也必须添加.classpath,形成一个java项目。我创建了一个虚拟java项目,并在工作区中查找这个虚拟Java项目,以查看所需内容。我转移了两个文件。我检出的配置文件和.claspath,以及我的subversion服务器断开连接的源。从那时起,它从一个普通的旧项目变成了一个java项目。

#5


0  

If the were checked as plugin-projects, than you just need to check them out. But do not select the "trunk"(for example) to speed it up. You must select all the projects you want to check out and proceed. Eclipse will than recognize them as such.

如果将它们作为插件项目进行检查,则只需要检查它们。但是不要选择“trunk”(例如)来加速它。您必须选择要签出的所有项目并继续。 Eclipse将会识别它们。

#1


20  

If it wasn't checked in as a Java Project, you can add the java nature as shown here.

如果未将其作为Java项目签入,则可以添加java性质,如下所示。

#2


37  

Here are the steps:

以下是步骤:

  • Install the subclipse plugin (provides svn connectivity in eclipse) and connect to the repository. Instructions here: http://subclipse.tigris.org/install.html
  • 安装subclipse插件(在eclipse中提供svn连接)并连接到存储库。说明:http://subclipse.tigris.org/install.html

  • Go to File->New->Other->Under the SVN category, select Checkout Projects from SVN.
  • 转到文件 - >新建 - >其他 - >在SVN类别下,从SVN中选择结帐项目。

  • Select your project's root folder and select checkout as a project in the workspace.
  • 选择项目的根文件夹,然后选择checkout作为工作区中的项目。

It seems you are checking the .project file into the source repository. I would suggest not checking in the .project file so users can have their own version of the file. Also, if you use the subclipse plugin it allows you to check out and configure a source folder as a java project. This process creates the correct .project for you(with the java nature),

您似乎正在将.project文件检入源存储库。我建议不要检查.project文件,以便用户可以拥有自己的文件版本。此外,如果您使用subclipse插件,它允许您签出并配置源文件夹作为Java项目。这个过程为你创建了正确的.project(具有java性质),

#3


#4


1  

I had to add the .classpath too, form a java project. I made a dummy java project and looked in the workspace for this dummy java project to see what is required. I transferred the two files. profile and .claspath to my checked out, and disconnected source from my subversion server. From then on it turned to a java project from just a plain old project.

我也必须添加.classpath,形成一个java项目。我创建了一个虚拟java项目,并在工作区中查找这个虚拟Java项目,以查看所需内容。我转移了两个文件。我检出的配置文件和.claspath,以及我的subversion服务器断开连接的源。从那时起,它从一个普通的旧项目变成了一个java项目。

#5


0  

If the were checked as plugin-projects, than you just need to check them out. But do not select the "trunk"(for example) to speed it up. You must select all the projects you want to check out and proceed. Eclipse will than recognize them as such.

如果将它们作为插件项目进行检查,则只需要检查它们。但是不要选择“trunk”(例如)来加速它。您必须选择要签出的所有项目并继续。 Eclipse将会识别它们。