If the file is not located in the local project (ie, it's located in the parent), then you can't pass the location, because there's no guarantee that location will exist at all.

What is the ant-task attempting to find? Another ant file? An xml file? A properties file? If so, then you can pass in the properties through the Pom, rather than through a file, maybe.

If it's a jar, or some other thing built in the parent, or in some other project, then the best way to handle it is to abstract out that jar or resource into its own project, so that it is the artifact produced. You can then pull in that artifact using maven ant tasks and depend on it.

The other way to go, which is not great, but quick & dirty, would be to remove all child projects from continuum, and just act on the parent, and remove the --non-recursive param so it will build the whole thing. Unfortunately this means that all will be built whenever any of it will be built. It also doesn't address the fact that you're depending on things that shouldn't be depended on - you're just working around continuum's strict requirement that this be so.

But what, specifically, is the kind of file you're locating with the variable, and how are you using it? That might help suggest an alternative approach.

christian.

On Aug 7, 2007, at 12:41 PM, brad hadfield wrote:

Christian, thanks for your help.

This is a situation where an artifact is not workable... this might be too much to ask but can you give me an idea how I might use metadata to solve my problem?

Ultimately I must pass a file location to an Ant task...

Brad


-----Original Message-----
From: Christian Gruber [mailto:[EMAIL PROTECTED]
Sent: August 7, 2007 12:17 PM
To: [email protected]
Subject: Re: getting relative paths maven + continuum

Yes - I thought it might be this. You can't do that and expect continuum to understand it. In fact, continuum checked out your child projects into their own folders that have no relation to the parent. There's literally no way to know what to set that property to.

If you have things in the parent that are necessary to the children, then you need to make sure they are available to the children either through metadata, or by being included in an artifact (jar) that the children have access to.

You haven't "configured things incorrectly" - your project design is problematic, because it makes the assumption that your folder structure is constant. With maven, you should not make that assumption. With continuum, you cannot make that assumption.

Christian.


On Aug 7, 2007, at 11:45 AM, brad hadfield wrote:

Thanks Emmanuel,

I have a property with a path that looks like ${basedir}/../../../
core-parent/trunk/

If I use the variable ${basedir} by running maven from the command
line the location looks like: C:\CIProjects\ProjectsMain\

But when I run the build in Continuum the Maven variable $ {basedir} is
indicated as C:\Continuum\apps\continuum\webapp\WEB-INF\working-
directory\21

Obviously I've configured something incorrectly...

-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: August 7, 2007 11:27 AM
To: [email protected]
Subject: Re: getting relative paths maven + continuum

Continuum doesn't build projects directly. It start maven in the right directory then maven do the build and Continuum look at the output and
the result.

Can you add more details about your problem?

Emmanuel

brad hadfield a écrit :
Hi,

I am a new maven and continuum user.  I'm having problems setting a
relative path because when continuum runs maven it interprets
variables such as ${base.dir} differently than when I run maven from
the project directory.  I assume this is because continuum starts
maven in a web app working directory.  Is there a way to get
continuum to start maven in the project directory?

Thanks for any help you can offer.

Brad






christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2
416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES





christian gruber + [EMAIL PROTECTED] + mob 410.900.0796 + mob2 416.998.6023
process coach and architect + ISRÁFÍL CONSULTING SERVICES


Reply via email to