开发者

How to set up a subvresion repository from my netbeans project

I was recently given some code that was worked on by someone other than myself, and after lots of work involving hunting down external dependencies, and editing the build.xml file to get ANT to build things in a sane way, I'd like to now get the code into a subversion repository.

The team I'm working on is rather small, but the members on the team change often. So I want people to be able to start working on this code as quickly as possible. A simple checkout from the repository, and opening the project in Netbeans to have everything building and executing properly would be ideal.

How do I achieve this when there are external dependencies that are not going to be on other 开发者_如何学Goteam members machines?

  • Should I place the libraries my project uses in the VCS?
  • How do I instruct subversion to not track generated files such as class files and jar files?
  • Should binary resources that are unlikely to change such as images and sounds be placed in the VCS? If not what would be the best way to distribute them?

Thank you.


1) yes. Anything needed to build and deploy the application and isn't generated by the build process goes into version control (yah, I know the maven fanz don't like that). 2) make sure everything that's generated goes into distinct directories that you exclude from version control. 3) see 1). Same thing. Same with project documentation, release notes, etc. etc.

The biggest problem of course are directory names which will be set in your IDEs configuration files and differ between development machines. Not just the location of the project directories, but the IDE itself, JDKs and other tools, appservers, can all be different between machines. It's a constant problem.


I usually use maven cause you can have a repository for jars and dependencies this makes life easier, but since you have already refactor your code to use ANT maybe this is not what you want, to use subversion with netbeans then you might want to add another folder for jars like libs or something and then another for the binaries like audio etc. Also check for the svn plugin for netbeans it will add the ignore to the dir and just update java files.

To add files to ignore you can use

svn propset svn:ignore -F . 

or you can look for the config file in your subversion home and add something like this

global-ignores=*.classs 

Hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜