maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian E. Fox" <>
Subject RE: Checking properties in a multi-pom environment
Date Tue, 12 Aug 2008 14:57:10 GMT
The enforcer rule should work, you'll need to be more explicit about
what's not working. If you put the enforcer in the root, it will execute
for all children. If some of those children don't have it set, then it
should fail. I just double checked the rule, and it's using the core
code to result the property, so it should behave exactly like the core
and see inherited properties.

-----Original Message-----
From: WhatTheHell [] 
Sent: Tuesday, August 12, 2008 10:44 AM
Subject: Checking properties in a multi-pom environment

Hi Maven users  :)

I faced a problem to check if some properties were set during maven's
compilation/deployment etc or not. 

We have one 'root' pom and it runs some other poms as modules. There are
properties in the root-pom. They are set during maven's work. The
property can be the project's URL. Sometimes we just make a local
compilation and then we don't need it to be set. However, when we deploy
new release we have to be sure that the URL was set. We use some
profiles when we just compile and when we deploy and some of those
do have a property while some other don't.

I've tried to use an enforcer plugin. I've created a
requireProperty-rule in
a root-pom, but as far as I can see it doesn't work in a pom-tree
environment (please correct me if I'm wrong), because I've run mvn with
profiles that do set the URL for sure and my rule failed. I've also
tried to
make a java-custom-rule, but it also failed saying, that I haven't set
property  :-(
I know I can check my rule in every single pom that sometimes can set
URL, but I wanted to do it in the root. Is it possible?

We use:
Maven version: 2.0.8
Java version: 1.5.0_15

I've tried to find a solution for a couple of days, but I couldn't.
I've missed some reference...

Thanks for any help
View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message