continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. De Mezzo" <benoit.deme...@paycool.net>
Subject Re: root project path property
Date Tue, 02 Jan 2007 17:43:16 GMT
The problem with 'basedir' and 'project.build.directory' is their value 
change according to the sub-project. It always is the current working 
dir. But in my case I need the main root dir, even in the sub-project. 
If maven or ant can manage some recursive programming, I could do a 
piece of code using the 'project.parent.basedir' property but it doesn't !!
Also, I can override a property value within an ant code (but the new 
value is not transfered back to maven) but not in a maven part ... strange.

I fell sick of that ... see you tomorrow !

BDM.

Emmanuel Venisse a écrit :
> I don't see an other solution with an env var. For me, '.' is a valid 
> directory, it's isn't an absolute path, but it's correct because your 
> in the working directory.
>
> What is the result if you use ${basedir} in your pom?
> You can try ${project.build.directory}/..
> ${project.build.directory} is the target directory
>
> Emmanuel
>
>
> B. De Mezzo a écrit :
>> I set it in a build definition on the 'argument' line: '--batch-mode 
>> -Droot.dir=.'
>> In my pom.xml I put some ant code at the 'validate' phase where if do 
>> a '<echo message="root dir = ${root.dir}" />' and so I get, in the 
>> root project and its sub-project, this output: 'root dir = .'. In 
>> conclusion it seems it does not interprete nor expand the '.' like 
>> any shell should. This is confirmed when I put '-Droot.dir=`pwd`', 
>> the output was 'root dir = `pwd`' ... funny, no ?
>>
>> Still looking for a solution ! :(
>>
>> Emmanuel Venisse a écrit :
>>> It doesn't work?? Where do you set it? in the build definition, right?
>>>
>>> B. De Mezzo a écrit :
>>>> Thx but that does not work ... continuum does not expand the '.' in 
>>>> some valid path.
>>>> I also try -Droot.dir=`pwd` but it does not work too :(
>>>> And I try a strange var named '${curr-scm-root}' who does not work ...
>>>>
>>>> Some other ideas ? :)
>>>>
>>>> Emmanuel Venisse a écrit :
>>>>> You can try -Droot.dir=.
>>>>> continuum start maven in the working directory so '.' is correct
>>>>>
>>>>> Emmanuel
>>>>>
>>>>> B. De Mezzo a écrit :
>>>>>> During the test phase, I need some property files located in 
>>>>>> 'svn-checkouted-dir/conf' (for example). This 
>>>>>> 'svn-checkouted-dir' is managed by continuum and is on the form :

>>>>>> 'continuum-install-path/apps/continuum/workingdir/1/' or 
>>>>>> something like that. So I need a solution to say to maven and to

>>>>>> my test that the root project dir is 
>>>>>> 'continuum-install-path/apps/continuum/workingdir/1/'. For 
>>>>>> example with a '-Droot.dir=${the.fucking.var.I.look.for}' when I

>>>>>> define in continuum a 'build definition' to run maven.
>>>>>>
>>>>>> Obviously, I rather prefere to use a property or an env var than

>>>>>> to fix directly in my pom.xml the current path used by continuum
...
>>>>>>
>>>>>> Thx !
>>>>>> BDM.
>>>>>>
>>>>>> Emmanuel Venisse a écrit :
>>>>>>> What do you try to do exactly?
>>>>>>> Do you want the working directory or the path of the target 
>>>>>>> directory?
>>>>>>>
>>>>>>> Emmanuel
>>>>>>>
>>>>>>> B. De Mezzo a écrit :
>>>>>>>> B. De Mezzo a écrit :
>>>>>>>>> hello,
>>>>>>>>> I am looking for a property to pass througth maven to
get the 
>>>>>>>>> absolute path location of the current build working directory.

>>>>>>>>> Does it exist ? If not, have you got an idea to get this
piece 
>>>>>>>>> of information ?
>>>>>>>>>
>>>>>>>>> Thx,
>>>>>>>>> BDM.
>>>>>>>> update:
>>>>>>>> - ${basedir} is not a good solution because it changes for
each 
>>>>>>>> project in multi-module project.
>>>>>>>> - And when I use a piece of ant code within maven (in some

>>>>>>>> <configuration><task>...</task></configuration>),
the 
>>>>>>>> modification, I have done onto an ant-style property, is
not 
>>>>>>>> visible back in maven.
>>>>>>>> - Using profiles to set a property according to an existing

>>>>>>>> file or an existing property (to do distinction between root

>>>>>>>> project and module project levels) does not work too ...
>>>>>>>>
>>>>>>>> I am becoming disappointed ...
>>>>>>>> HHEEELLLPPP :)
>>>>>>>>
>>>>>>>> Thx,
>>>>>>>> BDM.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>


Mime
View raw message