views:

169

answers:

2

I have a project build that needs to include files from another svn location during the build. I want to execute an svn get and then copy these files to the appropriate folder for the build. Researching this issue it seems I could use ant tasks but I wanted to find out what might be the best approach to take for this build.

+3  A: 

You can use the maven-scm-plugin. According to the scm matrix both checkout and update are allowed.

Robert Munteanu
I was able to use the maven-scm-plugin to solve this issue. Instead of a get I ended up having to use a checkout to the folder I wanted these files to live to be safe I then update it although I am pretty sure this is redundant. Thanks!
Barry
A: 

Robert's answer is good, if the project is large though you'll be checking out a lot of content to get e single file.

If you want to get an individual file from SCM, the Maven SCM API allows you to interact directly with an SCM repository to invoke arbitrary goals. In this related answer I provide an example of a custom Mojo that commits a single file, if you implement that mojo and change the command from add to checkout you'll avoid having to checkout the entire project.

Rich Seller