maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian E. Fox" <bri...@reply.infinity.nu>
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 [mailto:the.johny.doe@gmail.com] 
Sent: Tuesday, August 12, 2008 10:44 AM
To: users@maven.apache.org
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
no
properties in the root-pom. They are set during maven's work. The
example
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
a
new release we have to be sure that the URL was set. We use some
different
profiles when we just compile and when we deploy and some of those
profiles
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
a
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
the
property  :-(
I know I can check my rule in every single pom that sometimes can set
the
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.
Maybe
I've missed some reference...

Thanks for any help
Best
Pawel
-- 
View this message in context:
http://www.nabble.com/Checking-properties-in-a-multi-pom-environment-tp1
8945713p18945713.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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


Mime
View raw message