简体   繁体   English

从Eclipse Java项目创建SVN存储库

[英]Creating an SVN repository from an eclipse java project

I'm creating a project under eclipse that is to be shared by several developers. 我正在eclipse下创建一个项目,该项目将由多个开发人员共享。 The instructions I found for creating an svn repository said to: 我找到的创建svn存储库的说明说:

  1. svnadmin create /var/svn/draw svnadmin创建/ var / svn / draw
  2. create a directory with my project on the server, make directories under it including trunk 在服务器上使用我的项目创建一个目录,在其下创建目录(包括主干)
  3. put all code under trunk. 将所有代码放在主干下。

I copy in all the code, which is in src/ as usual for eclipse. 我复制了所有代码,像往常一样在src /中。

The problem is, when I check it out into eclipse, it's got directory trunk as well: 问题是,当我将其检出到Eclipse中时,它也具有目录中继:

trunk/src/... 主干/ src目录/ ...

This means I have to change the project definitions. 这意味着我必须更改项目定义。 First question: Can I create a project, and administer it in subversion directly from eclipse? 第一个问题:我可以创建一个项目,并直接在Eclipse中通过Subversion管理它吗?

Second: If not, how can I create the project in subversion so that its directory structure and eclipse project's are the same? 第二:如果不是,我该如何在Subversion中创建项目,以使其目录结构和Eclipse项目的目录相同? Do I just have to initially create a trunk directory? 我是否只需要最初创建一个中继目录? Is there anything else I have to do? 我还有什么需要做的吗?

What is the overall folder structure here? 这里的整体文件夹结构是什么? Are you just putting the code files in ./trunk/src/ and keeping other files related to the project outside of ./trunk/? 您是否只是将代码文件放在./trunk/src/中,并将与项目相关的其他文件保存在./trunk/之外? This may be a silly question, I'm just trying to get a feel for your SVN experience here. 这可能是一个愚蠢的问题,我只是想在这里感受一下您的SVN体验。 The eclipse project shouldn't be aware of the ./trunk/ folder if everything in the project is relative to its own root path and ./trunk/ is that root path. 如果项目中的所有内容都相对于其自己的根路径,而./trunk/是该根路径,则eclipse项目不应该知道./trunk/文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM