I have a plug-in that is relying on an environment variable that will be
defined to point to a specific directory in an absolute path during the
build time depends on where the build is happening. I could modify that
plug-in to use annotation instead whose default value can be set to
${project.build.directory}/mytools, but I'm just wondering if there is a
way to propagate a property that is set in pom.xml or setting.xml to the
external system properties level ...

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 07, 2007 8:04 PM
To: Maven Users List
Subject: Re: Setting Environment variable in pom.xml

On 9/7/07, Huang, Yan <[EMAIL PROTECTED]> wrote:

> I'm wondering if there is a simple way to set up a build-time
> environment variable in pom.xml without writing a custom plug-in?
>
> Let's say I want to set an environment variable called
MY_TOOL_DIRECTORY
> to the ${project.build.directory}/mytools before a compile is started.
> Is there a way to achieve this in pom.xml? Does maven 2 have
> "initialize" phase?

Does it really need to be an environment variable?  You can define
arbitrary properties in pom.xml or in settings.xml.

Continuum just got the ability to set environment variables as part of
a build profile.  Depending on why you need this, that might help...

What problem are you trying to solve?

-- 
Wendy

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