How to specify build.xml for ant if the file isn't in the project folder

Hi,

i am trying to add my ant build.xml to my build step but i don't have the build.xml file in my project folder.
We have a seperate build folder in our svn which contains all the buildscripts but i can't checkout two folders from the same repo into one target folder.

I am aware that i can specify a path to the build.xml but i don't like this because if the path changes we need to change every build config.

Our structure is something like this:

trunk\
      \build
      \somefolder
                     \project1
                     \project2....n

Those projects are VB6 and we can't modify the structure or the build file location.

Any ideas maybe?
best regards

3 comments
Comment actions Permalink

Hey Gregor,

I also isolate my build information in a separate folder.  However, I have a separate SVN repository for each project.  I.e.

\svnRepositories

\project1

\trunk

\build

\src

\project2

\trunk

\build

\src

My projects are unrelated.  But, in your case, it seems there's some dependency among them.  <off topic>These are full projects under your \trunk right?  Not modules that make up a single product.</off topic>

Your CI product should do the automation of checkout, build, testing, and reporting.  So, let's reproduce the steps you would take manually in your development environment into TeamCity.

Questions:

  • Are you setting up individual TeamCity projects for each of your project folders found within your repo?
  • When you build project1 manually, what command do you run, and from what directory?


I tried solving your issue with multiple VCS roots.  But, I encountered an undesired "access is denied" error.

Sorry, no solid answer just yet.

--
Marshall

0
Comment actions Permalink

Gregor,

I got something like what you described to work.  Some assumptions were made, but the following were the settings I used:

VCS root: svn://svn.example.com/repoName/trunk
VCS root checkout rules:

+:build
+:lib
+:src
-:test


It's not an exact match to the directory structure you mentioned.  But the concept is the same.

--
Marshall

0
Comment actions Permalink

Marshall,

Thanks for your help, i'll try the checkout rules today!
I'll also play around with the TC buildin variables to ensure a dynamic buildscript with no hardcoded patths.

To answer your questions:
1: No, i will use TC projects to group my different SCMs because each SCM has a larger module of the whole project.
2: At the moment we run a .bat file from within the build folder on our dedicated build machine where all the paths and direcotories are setup.

best regards.
gregor

0

Please sign in to leave a comment.