Return-Path: Delivered-To: apmail-maven-continuum-users-archive@www.apache.org Received: (qmail 79880 invoked from network); 2 Jan 2007 17:43:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 17:43:50 -0000 Received: (qmail 21275 invoked by uid 500); 2 Jan 2007 17:43:55 -0000 Delivered-To: apmail-maven-continuum-users-archive@maven.apache.org Received: (qmail 21256 invoked by uid 500); 2 Jan 2007 17:43:55 -0000 Mailing-List: contact continuum-users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-users@maven.apache.org Delivered-To: mailing list continuum-users@maven.apache.org Received: (qmail 21245 invoked by uid 99); 2 Jan 2007 17:43:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 09:43:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [212.94.174.67] (HELO smtp.cegetel.net) (212.94.174.67) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 09:43:44 -0800 Received: from [127.0.0.1] (unknown [195.115.75.211]) by smtp.cegetel.net (Postfix) with ESMTP id E93E31A4041 for ; Tue, 2 Jan 2007 18:43:16 +0100 (CET) Message-ID: <459A99B4.3030107@paycool.net> Date: Tue, 02 Jan 2007 18:43:16 +0100 From: "B. De Mezzo" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: continuum-users@maven.apache.org Subject: Re: root project path property References: <459A1F90.2050000@paycool.net> <459A7941.6090904@paycool.net> <459A7BAE.8030302@venisse.net> <459A8017.6010302@paycool.net> <459A8390.8000801@venisse.net> <459A8AFA.8050705@paycool.net> <459A8EE5.8010103@venisse.net> <459A91CC.3020704@paycool.net> <459A9670.9020905@venisse.net> In-Reply-To: <459A9670.9020905@venisse.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0666-1, 31/12/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org 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 '' 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 >>>>>>>> ...), 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. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> >> > > >