You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Deluigi Marcus <ma...@elca.ch> on 2006/11/24 11:21:08 UTC

Parent Directory

Hello.

Is there a Maven property that points to the projects root directory?
It may be not elegant to let the sub-modules know about the directory of
their parent module, but I have several centralized configuration files
(e.g. for log4j and tomcat) stored in the root-modules directory and I
want that all subprojects access them.

I tried ${basedir} but apparently it just points to the current working
directory, so it changes for every submodule.

Thanks for any hints!

Greetings,
Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Parent Directory

Posted by Arik Kfir <ar...@gmail.com>.
Hi,

Why not release these shared configuration files as another module, and let
other modules depend on it?

On 11/24/06, Tom Huybrechts <to...@gmail.com> wrote:
>
> This is a frequent question, and the answer is no: there's no (Maven)
> way to refer to a parent or root directory from within a module.
>
> On 11/24/06, Deluigi Marcus <ma...@elca.ch> wrote:
> > Hello.
> >
> > Is there a Maven property that points to the projects root directory?
> > It may be not elegant to let the sub-modules know about the directory of
> > their parent module, but I have several centralized configuration files
> > (e.g. for log4j and tomcat) stored in the root-modules directory and I
> > want that all subprojects access them.
> >
> > I tried ${basedir} but apparently it just points to the current working
> > directory, so it changes for every submodule.
> >
> > Thanks for any hints!
> >
> > Greetings,
> > Marcus
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Parent Directory

Posted by Tom Huybrechts <to...@gmail.com>.
This is a frequent question, and the answer is no: there's no (Maven)
way to refer to a parent or root directory from within a module.

On 11/24/06, Deluigi Marcus <ma...@elca.ch> wrote:
> Hello.
>
> Is there a Maven property that points to the projects root directory?
> It may be not elegant to let the sub-modules know about the directory of
> their parent module, but I have several centralized configuration files
> (e.g. for log4j and tomcat) stored in the root-modules directory and I
> want that all subprojects access them.
>
> I tried ${basedir} but apparently it just points to the current working
> directory, so it changes for every submodule.
>
> Thanks for any hints!
>
> Greetings,
> Marcus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org