You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Pick <da...@focus-solutions.co.uk> on 2005/09/20 17:07:17 UTC
[m2-b1] POM Inheritance and Variables
Hi,
I have the following section in a parent POM:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<debug>${systemScope.getProperty('build.debug')}</debug>
<source>${systemScope.getProperty('build.jdk')}</source>
<target>${systemScope.getProperty('build.jdk')}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
When I run a Maven build on the child POM the system scope variables appear to have no effect.
If I replace them with fixed values then everything works.
The system variables are set when invoking Maven using -D option.
What have I done wrong?
Does the fact that this inherited have any bearing on the property evaluation?
Many Thanks
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2-b1] POM Inheritance and Variables
Posted by Trygve Laugstøl <tr...@codehaus.org>.
On Tue, 2005-09-20 at 16:07 +0100, David Pick wrote:
> Hi,
>
> I have the following section in a parent POM:
>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <debug>${systemScope.getProperty('build.debug')}</debug>
> <source>${systemScope.getProperty('build.jdk')}</source>
> <target>${systemScope.getProperty('build.jdk')}</target>
> </configuration>
> </plugin>
> </plugins>
> </pluginManagement>
Using ${build.jdk} with -Dbuild.jdk=1.5 on the command line should work.
--
Trygve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2-b1] POM Inheritance and Variables
Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
System vars are accessed implicitly in m2...try:
<configuration>
~ <debug>${build.debug}</debug>
~ <source>${build.jdk}</source>
~ <target>${build.jdk}</target>
</configuration>
Cheers,
john
David Pick wrote:
| Hi,
|
| I have the following section in a parent POM:
|
| <pluginManagement>
| <plugins>
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-compiler-plugin</artifactId>
| <configuration>
| <debug>${systemScope.getProperty('build.debug')}</debug>
| <source>${systemScope.getProperty('build.jdk')}</source>
| <target>${systemScope.getProperty('build.jdk')}</target>
| </configuration>
| </plugin>
| </plugins>
| </pluginManagement>
|
|
| When I run a Maven build on the child POM the system scope variables
appear to have no effect.
| If I replace them with fixed values then everything works.
|
| The system variables are set when invoking Maven using -D option.
|
| What have I done wrong?
|
| Does the fact that this inherited have any bearing on the property
evaluation?
|
| Many Thanks
| Dave
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
| For additional commands, e-mail: users-help@maven.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDMCksK3h2CZwO/4URAnjtAKCR9xO/PWerEM72jUXyapJpax04KQCfQfzR
dpkEVBR7Dwp/SaWGrB55M4w=
=L4D+
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org