NAnt and Vault

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
dsellers
Posts: 13
Joined: Wed Jul 14, 2004 3:14 pm

NAnt and Vault

Post by dsellers » Sun Jan 23, 2005 11:53 pm

I am trying to get NAnt to check out all of the files from my repository using a version of the NAnt tools here that have been modified to work with 3.0. Can someone give me a copy of their existing nant build script so I can understand what this looks like? Or at least tell me what the syntax of a request to get all of the files in a folder would look like.

Thanks

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Mon Jan 24, 2005 8:41 am

The get command that I have in my test Nant setup is:

Code: Select all

<vaultgetfile 
				url="http://server/VaultService" 
				username="admin" 
				password="admin" 
				repository="Test repository" 
				filename="$/test" 
				destination="C:\temp\jeremy\nantbuild"
			/>
That being said, I had to modify some code in the Nant tasks to use it for 3.0. I plan to update the Nant tasks when I get everything set up for 3.0.

joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Sun Apr 17, 2005 2:47 pm

Jeremy,
When do you think the updated Nant tasks will be available?

Thanks,
Josh

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Sun Apr 17, 2005 4:19 pm


joshyeager
Posts: 60
Joined: Wed Aug 18, 2004 11:15 am

Post by joshyeager » Sun Apr 17, 2005 4:33 pm

Awesome, thanks!

CraigNicholson
Posts: 47
Joined: Tue Mar 23, 2004 3:54 pm
Location: South Africa
Contact:

Post by CraigNicholson » Fri Apr 22, 2005 1:01 am

I would like to see a NAnt Task for Vault 2.x on that page too, is this possible still? Are they compatible?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Fri Apr 22, 2005 9:58 am

I logged in to vaultpub.sourcegear.com and downloaded the last version before I made compatibillity changes for 3.0. The zip file is attached below.
Attachments
vaultnant2.zip
Vault Nant Tasks for Vault 2.0
(111.05 KiB) Downloaded 1029 times

CraigNicholson
Posts: 47
Joined: Tue Mar 23, 2004 3:54 pm
Location: South Africa
Contact:

Post by CraigNicholson » Fri Apr 22, 2005 10:38 am

Thanks, but I still think my suggestion is a good one, keep that nifty build page updated with the latest NAnt tasks for the various versions of Vault.

ArtVault
Posts: 5
Joined: Thu Apr 28, 2005 3:01 pm

Post by ArtVault » Wed Jun 08, 2005 12:42 pm

I am using Vault version 2.0.6 and Nant 0.85.rc2. I am trying to compile the Vault Nant Tasks for Vault 2.0 (vaultnant2.zip) code and get the dll's, but there are errors when I compile this project. The code is from
http://support.sourcegear.com/viewtopic ... light=nant

Can you provide the Vault Nant binary for Vault version 2.0.6 and Nant 0.85.rc2 for us to download?

Thanks.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jun 08, 2005 1:08 pm

What build errors are you encountering? It's not really feasible for me to update the 2.0 nant tasks for every release of Nant. If you tell me what build errors you're seeing I can help you make the compatibility changes. You can also use vault to login to vaultpub.sourcegear.com with the guest account. The Build Tool repository has the history of all of the source, so you should be able to diff the files that don't build to see what I did to fix them.

ArtVault
Posts: 5
Joined: Thu Apr 28, 2005 3:01 pm

NAnt and Vault

Post by ArtVault » Wed Jun 08, 2005 3:24 pm

After upzipping the vaultnant2.zip, there are 3 projects in the
vaultnant2.zip. They are nant.csproj, NAntVaultTasks for NAnt v0.8.2 and Vault 1.2.3/NAntVaultTasks.sln, and NAntVaultTasks for NAnt v0.8.3 and Vault 1.2.3/NAntVaultTasks.sln. There are errors when I compile each of these 3 projects. Could you tell me Which project is for the Vault 2.0.6 and Nant? so I can tell you the build errors.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jun 08, 2005 9:38 pm

It would be the nant.csproj in the root directory.

ArtVault
Posts: 5
Joined: Thu Apr 28, 2005 3:01 pm

NAnt and Vault

Post by ArtVault » Fri Jun 10, 2005 11:24 am

Thanks. I am trying to use NAnt <exec> to run vault.exe command line instead. However, I have problem passing strings with space in command line. for example, I want to add the file (file localpath) C:\Vault\My Files\help.chm in to Vault. There is a space in the "My Files" folder name.

<property name="vault_localpath" value="C:\Vault\My Files\help.chm" />
<target name="Vault_ADD" >
<exec
program="vault.exe"
basedir="C:\Program Files\SourceGear\Vault Client\"
commandline="ADD -server ${vault_server} -user ${vault_user} -password ${vault_password} -repository ${vault_repository} ${vault_repositorypath} ${vault_localpath}">
</exec>
</target>

Vault will read "C:\Vault\My" as the file localpath. It looks like Vault.exe splits the command line arg's by space. Are there any way to pass a string with space in Vault.exe?[/quote]

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Fri Jun 10, 2005 2:36 pm

Have you tried \"${vault_localpath}\"?

Another way that would definitely work is to use separate <arg> entries, specifiying the value attribute. See http://nant.sourceforge.net/release/lat ... /exec.html

Post Reply