Basedir depends entirely on where you are executing Maven from...

Instead of pulling files directly out of other modules (using relative
paths), I would suggest packaging those shared modules by themselves
and adding a dependency on them in both modules, or perhaps use the
assembly plugin to unpack the files you need out of the other module.

Wayne

On 10/25/06, EJ Ciramella <[EMAIL PROTECTED]> wrote:
So what I'm attempting to do is pull in a resource from another modules
target directory.  So if basedir was /toplevel and not
/toplevel/project/module1, that would help.  Instead we'll continue to
use relative paths.

Bummer...

-----Original Message-----
From: pjungwir [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 25, 2006 3:51 PM
To: [email protected]
Subject: RE: basedir


Oh, okay. By default, all paths are relative to basedir already, so I'm
not
sure why you'd need it. But in my setup, this still works:

  <resource>
    <directory>${basedir}/foo</directory>
  </resource>

Again, I'm not sure what it means with multiple modules, but it should
at
least get resolved. What does you pom look like, and what results are
you
seeing?

Paul



EJ Ciramella-2 wrote:
>
> Ahh - I'm not talking about having it IN a resource, I'm talking about
> having it in the resource mapping in the POM file.
>
> -----Original Message-----
> From: pjungwir [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 25, 2006 3:31 PM
> To: [email protected]
> Subject: RE: basedir
>
>
> Hmm. It works for me in a plain, single-module setup. You may need to
> say
> <filtering>true</filtering>; I don't know if it's the default. I'm not
> sure
> what ${basedir} means with many modules. Are you getting weird
results,
> or
> is it just not getting replaced at all?
>
> Paul
>
>
> EJ Ciramella-2 wrote:
>>
>> I haven't been able to get that kind of thing to work when running
>> process-resources.
>>
>> Additionally, if I have three levels, (parent pom.xml -> parent
> pom.xml
>> -> module pom.xml) and the resource processing happens at the module
>> level, would the basedir be of the parent pom or of the module pom?
>>
>> -----Original Message-----
>> From: pjungwir [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, October 25, 2006 2:35 PM
>> To: [email protected]
>> Subject: Re: basedir
>>
>>
>> ${basedir} :-)
>>
>> Technically, this gives the directory where the pom is located, not
> the
>> directory from which you run mvn.
>>
>> Paul
>>
>>
>> EJ Ciramella-2 wrote:
>>>
>>> Is there some property readily available that represents the
> directory
>>> from which maven was run from?
>>>
>>> Something like ${basedir} in ant?
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/basedir-tf2509183.html#a6997723
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/basedir-tf2509183.html#a6998607
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context:
http://www.nabble.com/basedir-tf2509183.html#a6998978
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to