You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by to...@edbtelecom.com on 2005/08/30 01:59:52 UTC
[M2] - The value of ${basedir} has changed?
Hei,
I have recognised that the evaluation of ${basedir} has changed from my
Maven2 build on 23.august to the one I downloaded and built on 29.august.
Building with Maven2 of 23.august would give the value of the actual
directory where the POM is situated also when this POM is deep down in a
hierarchy of POMs. But now I see that ${basedir} evaluates to the directory
of the highest POM that is run in the hierarchy.
A plugin configuration in the POM in directory
"C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto" is
like this:
<configuration>
<output>${basedir}/src/main/java</output>
</configuration>
Result log from using 23.august build of Maven2:
"output:
C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto\src\ma
in\java"
Result log from using 29.august build of Maven2:
"output: C:\work\nims\main\j2ee\src\main\java"
And of course, my application build breaks. My question then:
Is this an unintended side effect of a change (bug) or will basedir from now
refer to the highest level in the POM hierarchy that is run? If so, how do I
refer to the actual directories of the other POMs?
Best regards
Tore Larsen
Senior Software Engineer
Incatel
EDB Telecom AS
Re: [M2] - The value of ${basedir} has changed?
Posted by Brett Porter <br...@gmail.com>.
that could be related... I'll soon find out :)
- Brett
On 8/30/05, John Casey <jd...@commonjava.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I think there should already be a JIRA issue for it...it was assigned to
> me at one point. :) It's the one about project.getParent().getBasedir()
> being the same as project.getBasedir() I think...
>
> - -john
>
> Brett Porter wrote:
> | I've filed MNG-805 to look into this.
> |
> | - Brett
> |
> | On 8/30/05, Trygve Laugstøl <tr...@codehaus.org> wrote:
> |
> |>On Tue, Aug 30, 2005 at 01:59:52AM +0200,
> tore.larsen@edbtelecom.comwrote:
> |>
> |>>Hei,
> |>>
> |>>I have recognised that the evaluation of ${basedir} has changed from my
> |>>Maven2 build on 23.august to the one I downloaded and built on
> 29.august
> |>
> |>.
> |>
> |>>Building with Maven2 of 23.august would give the value of the actual
> |>>directory where the POM is situated also when this POM is deep down in
> a
> |>>hierarchy of POMs. But now I see that ${basedir} evaluates to the
> |>>directory of the highest POM that is run in the hierarchy.
> |>
> |>I think this is a known bug.
> |>
> |>
> |>>A plugin configuration in the POM in directory
>
> |>>"C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto"
> |>>is like this:
> |>>
> |>><configuration>
> |>><output>${basedir}/src/main/java</output>
> |>></configuration>
> |>
> |>The ${basedir} prefix should not be required here if the output
> parameter
> |>is of type File as it should be. Maven should build the proper path for
> |>you in the constructed File object.
> |>
> |>[snip]
> |>
> |>--
> |>Trygve
> |>
> |>
> |>-----BEGIN PGP SIGNATURE-----
> |>Version: GnuPG v1.4.1 (GNU/Linux)
> |>
> |>iD8DBQFDE6zY4EbM92cyCUURArb8AKCxNUmSqqWHWKaAN9HLNUtrd7G6BgCguvSF
> |>yIxBDOqHYElAsj/w32PcKQ8=
> |>=eUYu
> |>-----END PGP SIGNATURE-----
> |>
> |>
> |>
> |
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFDFAxmK3h2CZwO/4URAtwgAKCwCJZK6vwu3nKdCc1tsnTXvJToBQCZAdiI
> Ui5baxajOHwEoJ+TrTfEE58=
> =BvgP
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: [M2] - The value of ${basedir} has changed?
Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think there should already be a JIRA issue for it...it was assigned to
me at one point. :) It's the one about project.getParent().getBasedir()
being the same as project.getBasedir() I think...
- -john
Brett Porter wrote:
| I've filed MNG-805 to look into this.
|
| - Brett
|
| On 8/30/05, Trygve Laugstøl <tr...@codehaus.org> wrote:
|
|>On Tue, Aug 30, 2005 at 01:59:52AM +0200, tore.larsen@edbtelecom.comwrote:
|>
|>>Hei,
|>>
|>>I have recognised that the evaluation of ${basedir} has changed from my
|>>Maven2 build on 23.august to the one I downloaded and built on 29.august
|>
|>.
|>
|>>Building with Maven2 of 23.august would give the value of the actual
|>>directory where the POM is situated also when this POM is deep down in a
|>>hierarchy of POMs. But now I see that ${basedir} evaluates to the
|>>directory of the highest POM that is run in the hierarchy.
|>
|>I think this is a known bug.
|>
|>
|>>A plugin configuration in the POM in directory
|>>"C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto"
|>>is like this:
|>>
|>><configuration>
|>><output>${basedir}/src/main/java</output>
|>></configuration>
|>
|>The ${basedir} prefix should not be required here if the output parameter
|>is of type File as it should be. Maven should build the proper path for
|>you in the constructed File object.
|>
|>[snip]
|>
|>--
|>Trygve
|>
|>
|>-----BEGIN PGP SIGNATURE-----
|>Version: GnuPG v1.4.1 (GNU/Linux)
|>
|>iD8DBQFDE6zY4EbM92cyCUURArb8AKCxNUmSqqWHWKaAN9HLNUtrd7G6BgCguvSF
|>yIxBDOqHYElAsj/w32PcKQ8=
|>=eUYu
|>-----END PGP SIGNATURE-----
|>
|>
|>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDFAxmK3h2CZwO/4URAtwgAKCwCJZK6vwu3nKdCc1tsnTXvJToBQCZAdiI
Ui5baxajOHwEoJ+TrTfEE58=
=BvgP
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] - The value of ${basedir} has changed?
Posted by Brett Porter <br...@gmail.com>.
I've filed MNG-805 to look into this.
- Brett
On 8/30/05, Trygve Laugstøl <tr...@codehaus.org> wrote:
>
> On Tue, Aug 30, 2005 at 01:59:52AM +0200, tore.larsen@edbtelecom.comwrote:
> > Hei,
> >
> > I have recognised that the evaluation of ${basedir} has changed from my
> > Maven2 build on 23.august to the one I downloaded and built on 29.august
> .
> >
> > Building with Maven2 of 23.august would give the value of the actual
> > directory where the POM is situated also when this POM is deep down in a
> > hierarchy of POMs. But now I see that ${basedir} evaluates to the
> > directory of the highest POM that is run in the hierarchy.
>
> I think this is a known bug.
>
> >
> > A plugin configuration in the POM in directory
> > "C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto"
> > is like this:
> >
> > <configuration>
> > <output>${basedir}/src/main/java</output>
> > </configuration>
>
> The ${basedir} prefix should not be required here if the output parameter
> is of type File as it should be. Maven should build the proper path for
> you in the constructed File object.
>
> [snip]
>
> --
> Trygve
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFDE6zY4EbM92cyCUURArb8AKCxNUmSqqWHWKaAN9HLNUtrd7G6BgCguvSF
> yIxBDOqHYElAsj/w32PcKQ8=
> =eUYu
> -----END PGP SIGNATURE-----
>
>
>
Re: [M2] - The value of ${basedir} has changed?
Posted by Trygve Laugstøl <tr...@codehaus.org>.
On Tue, Aug 30, 2005 at 01:59:52AM +0200, tore.larsen@edbtelecom.com wrote:
> Hei,
>
> I have recognised that the evaluation of ${basedir} has changed from my
> Maven2 build on 23.august to the one I downloaded and built on 29.august.
>
> Building with Maven2 of 23.august would give the value of the actual
> directory where the POM is situated also when this POM is deep down in a
> hierarchy of POMs. But now I see that ${basedir} evaluates to the
> directory of the highest POM that is run in the hierarchy.
I think this is a known bug.
>
> A plugin configuration in the POM in directory
> "C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto"
> is like this:
>
> <configuration>
> <output>${basedir}/src/main/java</output>
> </configuration>
The ${basedir} prefix should not be required here if the output parameter
is of type File as it should be. Maven should build the proper path for
you in the constructed File object.
[snip]
--
Trygve
Re: [M2] - The value of ${basedir} has changed?
Posted by Sachin Patel <sp...@gmail.com>.
Yes, I'm am seeing a similar issue but on the Alpha 3 version and its
causing build failures when invoking a build from the parent POM. My
Child POM's have plugin configuration info relative to that project, but
when invoked from the parent POM, those goals fail as it looks for
resources relative to the parent POM level rather then child POM.
tore.larsen@edbtelecom.com wrote:
>
> Hei,
>
> I have recognised that the evaluation of ${basedir} has changed from
> my Maven2 build on 23.august to the one I downloaded and built on
> 29.august.
>
> Building with Maven2 of 23.august would give the value of the actual
> directory where the POM is situated also when this POM is deep down in
> a hierarchy of POMs. But now I see that ${basedir} evaluates to the
> directory of the highest POM that is run in the hierarchy.
>
> A plugin configuration in the POM in directory
> "C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto"
> is like this:
>
>
> <configuration>
> <output>${basedir}/src/main/java</output>
> </configuration>
>
> Result log from using 23.august build of Maven2:
>
> "output:
> C:\work\nims\main\j2ee\incatel-nims\nims-webservice\nims-webclient-dto\src\main\java"
>
>
>
> Result log from using 29.august build of Maven2:
>
> "output: C:\work\nims\main\j2ee\src\main\java"
>
> And of course, my application build breaks. My question then:
>
> Is this an unintended side effect of a change (bug) or will basedir
> from now refer to the highest level in the POM hierarchy that is run?
> If so, how do I refer to the actual directories of the other POMs?
>
>
> Best regards
> Tore Larsen
> Senior Software Engineer
> Incatel
> EDB Telecom AS
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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