In the maven.xml in my child projects, whose project.xml extends a
${basedir}/../project.xml, I have the following lines:

  <property environment="env"/>
  <util:properties file="../project.properties" trim="true" />
  <util:properties file="../build.properties"   trim="true" />

This is immediately after the <project> tag, and immediately before any
goals.

I note that you cannot use the ant loadproperties because you are stuck with
first-set on your variables.  Going along with the idea that
build.properties is for local system settings, and project.properties is for
any system settings.
The jelly:util works on last-set.  I have experimented with these details
and found them to work this way.

How about giving that a try, in your general ${basedir}/../project.xml you
can set the maven.repo.remote to the standard ibiblio, and in the
build.properties set it to your starforge repository.

You can also set a property that describes to child mavens where the
properties file is that all children use for such things.  I have a
jboss.build.properties that overrides my general settings for jboss, and I
specify where that file is in the parent build.properties.

  <property environment="env"/>
If you set an environment variable, say MY_REPO_REMOTE, this value will be
available as ${env.MY_REPO_REMOTE}

----- Original Message ----- 
From: "Sean Timm" <[EMAIL PROTECTED]>
To: "Maven Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 4:58 PM
Subject: RE: Overall preGoal in parent maven.xml?


> I haven't checked for a while, but I believe build:start
> still exists and is attained first.

This didn't seem to work...

> However, if you put the code inside the parent maven.xml,
> outside of any goal definitions, it should be executed before
> any goals are attained.

That seemed to hold true for a while, but I started getting strange
behavior occasionally where variables weren't getting set.  For example,
I've got the following at the root maven.xml file:

<j:set var="maven.repo.remote" value="http://starforge/repository"; />

This should set the artifact plugin to retrieve from my intranet-hosted
repository, but it doesn't seem to work.  I ended up moving it to
$USER_HOME/build.properties...which really stinks when I want to update
something like that.

-- Sean T.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to