You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frank Mena <ma...@gmail.com> on 2005/10/31 16:26:24 UTC
${basedir} bug
There seems to be a bug when you use ${basedir} inside of
<module>{$basedir}/somemodule</module>
For example, if your basedir is d:\app\module2, it expands to
d:\app\module2d:\app\module2
Re: ${basedir} bug
Posted by Frank Mena <ma...@gmail.com>.
Thanks for the quick reply. I am trying to convert from ant to maven in a
large project and am excited at the prospect of using maven.
As an example, I have the following directory structure:
common
common1
common2
subcommon
subcommon1
subcommon2
project1
some1model1
some1model2
war
ear
project2
some2model1
some2model2
war
ear
With the above as an example, I build 2 different projects, each with it's
own ear. They both share modules from the "common" subtree. Also, I use jibx
(java-to-xml binding tool that does bytecode enhancement).
When I run the jibx task post-compile, it needs to have all the classes it
is going to bind in the classpath. For a given project, some of these
classes are are in the projects modules and some of them are in the common
submodules.
jibx need to be run before the modules are jar'ed into the repository. Is
there a way to do this? I was trying to create ${basedir} for the parent pom
(Would be nice to have ${parent.pom.basedir}
BTW, does this mean that there is not a bug in ${basedir} used in <module>?
On 10/31/05, Jason van Zyl <ja...@maven.org> wrote:
>
> On Mon, 2005-10-31 at 07:26 -0800, Frank Mena wrote:
> > There seems to be a bug when you use ${basedir} inside of
> > <module>{$basedir}/somemodule</module>
> >
> > For example, if your basedir is d:\app\module2, it expands to
> > d:\app\module2d:\app\module2
>
> Don't specify a ${basedir}. This is a bad habit left over from m1. You
> should not need to specify ${basedir} anywhere. Just specify the module
> name, m2 knows where to look because the module name is the artifact id
> and the directory names for each of your modules should match the
> artifact id of that module.
>
> --
> jvz.
>
> Jason van Zyl
> jason at maven.org <http://maven.org>
> http://maven.apache.org
>
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will come
> and sit softly on your shoulder ...
>
> -- Thoreau
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: ${basedir} bug
Posted by Jason van Zyl <ja...@maven.org>.
On Mon, 2005-10-31 at 07:26 -0800, Frank Mena wrote:
> There seems to be a bug when you use ${basedir} inside of
> <module>{$basedir}/somemodule</module>
>
> For example, if your basedir is d:\app\module2, it expands to
> d:\app\module2d:\app\module2
Don't specify a ${basedir}. This is a bad habit left over from m1. You
should not need to specify ${basedir} anywhere. Just specify the module
name, m2 knows where to look because the module name is the artifact id
and the directory names for each of your modules should match the
artifact id of that module.
--
jvz.
Jason van Zyl
jason at maven.org
http://maven.apache.org
happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...
-- Thoreau
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org