maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alastair Rodgers" <alastair.rodg...@phocis.com>
Subject RE: <extend> and project.properties
Date Tue, 02 Dec 2003 10:18:16 GMT
Hi Peter, 

I know this isn't exactly what you're looking for, but I found it useful. I have a base maven.xml
along with my base project.xml from which everything inherits. In my top level directory I
have a global.properties file, then in the base maven.xml I do the following so that every
project has access to the global properties: 

  <!-- ================= -->
  <!-- Global Properties -->
  <!-- ================= -->
  
  <!-- Determine what the top-level project root is -->
  <j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
  
  <!-- Load the global properties -->
  <u:properties file="${project.root}/global.properties"/>


Good luck with AstroGrid!

Al. 
(a UK ex-astronomer!)



> -----Original Message-----
> From: gps@roe.ac.uk [mailto:gps@roe.ac.uk] 
> Sent: 02 December 2003 00:43
> To: Maven Users List
> Subject: <extend> and project.properties
> 
> 
> Hi there,
> 
> I have been using Maven for a while now and have even 
> persuaded and setup AstroGrid to use Maven as it's main build 
> system.  Hooray!!
> 
> I have a question regarding POM inheritance though.  I had 
> assumed that if I extended a POM that I would also get it's 
> properties.  I thought this because you inherit dependencies 
> and so if, as I do, you have a custom repository, you need to 
> inherit that too.
> 
> It would seem that I was mistaken however.  Is there a good 
> reason for this?  I think it would be sensible to 
> automagically get the properties too.
> 
> Many thanks for your help,
> 
> Peter
> 
> P.S. I'm using Maven-1.0-rc1 with Sun JDK 1.4.1 under RH9
> -- 
> Peter Shillan  AstroGrid Java Developer
> gps@roe.ac.uk  (UK)-(0)131-668-8282
> 
> Institute for Astronomy, Blackford Hill, Edinburgh, EH9 3HJ.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message