You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@apache.org> on 2005/10/31 06:00:22 UTC

[m2] How to set 'basedir' ?

I have build files in a separate directory structure from the actual project 
files, so I  have relative paths such as:
   <sourceDirectory>../../core-library/src/java</sourceDirectory>

In m1, I could set arbitrary properties in project.properties and then use 
those in the build files.

With m2, I see that ${basedir} is referred to in the defaults for plugins, 
such as for maven-site-plugin, siteDirectory as ${basedir}/src/site.

How do I set ${basedir} in m2 so I don't have to keep repeating the same 
relative path?

Thanks,
-- 
Wendy 



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


Re: [m2] How to set 'basedir' ?

Posted by Brett Porter <br...@gmail.com>.
This in itself is not a problem, its when you have a project that
basically looks into a nother module outside of its development unit
(ie, its possible to checkout the pom and not have the files present).

- Brett

On 10/31/05, Wim Deblauwe <wi...@gmail.com> wrote:
> Can you explain that a little bit more?
>
> With Maven 1, we currently use this structure:
>
> + module-name
> + build
> project.xml
> + resources
> + src
>
> Should I put the pom.xml in the module-name directory? Why is it a problem
> if I would have it in the build directory?
>
> regards,
>
> Wim
>
> 2005/10/31, Brett Porter <br...@gmail.com>:
> >
> > basedir is always the location of the POM file, it can't be changed.
> >
> > You can do something using custom properties in the POM. Note however
> > that using relative paths including .. is discouraged as it prevents
> > the subprojects from being checked out and built in isolation.
> >
> > - Brett
> >
> > On 10/31/05, Wendy Smoak <ws...@apache.org> wrote:
> > > I have build files in a separate directory structure from the actual
> > project
> > > files, so I have relative paths such as:
> > > <sourceDirectory>../../core-library/src/java</sourceDirectory>
> > >
> > > In m1, I could set arbitrary properties in project.properties and then
> > use
> > > those in the build files.
> > >
> > > With m2, I see that ${basedir} is referred to in the defaults for
> > plugins,
> > > such as for maven-site-plugin, siteDirectory as ${basedir}/src/site.
> > >
> > > How do I set ${basedir} in m2 so I don't have to keep repeating the same
> > > relative path?
> > >
> > > Thanks,
> > > --
> > > Wendy
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>

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


Re: [m2] How to set 'basedir' ?

Posted by Wim Deblauwe <wi...@gmail.com>.
Can you explain that a little bit more?

With Maven 1, we currently use this structure:

+ module-name
+ build
project.xml
+ resources
+ src

Should I put the pom.xml in the module-name directory? Why is it a problem
if I would have it in the build directory?

regards,

Wim

2005/10/31, Brett Porter <br...@gmail.com>:
>
> basedir is always the location of the POM file, it can't be changed.
>
> You can do something using custom properties in the POM. Note however
> that using relative paths including .. is discouraged as it prevents
> the subprojects from being checked out and built in isolation.
>
> - Brett
>
> On 10/31/05, Wendy Smoak <ws...@apache.org> wrote:
> > I have build files in a separate directory structure from the actual
> project
> > files, so I have relative paths such as:
> > <sourceDirectory>../../core-library/src/java</sourceDirectory>
> >
> > In m1, I could set arbitrary properties in project.properties and then
> use
> > those in the build files.
> >
> > With m2, I see that ${basedir} is referred to in the defaults for
> plugins,
> > such as for maven-site-plugin, siteDirectory as ${basedir}/src/site.
> >
> > How do I set ${basedir} in m2 so I don't have to keep repeating the same
> > relative path?
> >
> > Thanks,
> > --
> > Wendy
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: [m2] How to set 'basedir' ?

Posted by Brett Porter <br...@gmail.com>.
basedir is always the location of the POM file, it can't be changed.

You can do something using custom properties in the POM. Note however
that using relative paths including .. is discouraged as it prevents
the subprojects from being checked out and built in isolation.

- Brett

On 10/31/05, Wendy Smoak <ws...@apache.org> wrote:
> I have build files in a separate directory structure from the actual project
> files, so I  have relative paths such as:
>    <sourceDirectory>../../core-library/src/java</sourceDirectory>
>
> In m1, I could set arbitrary properties in project.properties and then use
> those in the build files.
>
> With m2, I see that ${basedir} is referred to in the defaults for plugins,
> such as for maven-site-plugin, siteDirectory as ${basedir}/src/site.
>
> How do I set ${basedir} in m2 so I don't have to keep repeating the same
> relative path?
>
> Thanks,
> --
> Wendy
>
>
>
> ---------------------------------------------------------------------
> 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