This is what I use at work.
If you must do it for several properties you can create a tag and use it
several times :
<define:taglib uri="myProject">
<define:tag name="checkProperty">
<j:set var="propertyName" value="${name}"/>
<j:set var="propertyValue" value="${propertyName}"/>
<j:choose>
<j:when test="${(propertyValue!= null) and (propertyValue!=
"")}">
<ant:echo>Your property ${propertyName} is setted to :
${propertyValue}</ant:echo>
</j:when>
<j:otherwise>
<ant:fail>You must define a property ${propertyName} in your
build.properties.</ant:fail>
</j:otherwise>
</j:choose>
</define:tag>
</define:taglib>
<preGoal name="build:start">
<myProject:checkProperty name="runtime.env" />
<myProject:checkProperty name="YYY" />
<myProject:checkProperty name="XXX" />
</preGoal>
I didn't test it, but it should work.
Note : Don't forgot to declare the "myProject" namespace.
Arnaud
> -----Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Envoy� : vendredi 20 mai 2005 01:16
> � : [EMAIL PROTECTED]
> Objet : RE: How to gracefully stop the M(1) current set of
> queued processes
>
> Thank you, Arnaud. That is a more elegant way then I had considered.
>
> Bud Curtis
> JDIMS Project
> L-3 Communications
> (719) 637-5633
>
>
> -----Original Message-----
> From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 18, 2005 5:22 PM
> To: 'Maven Users List'
> Subject: RE: How to gracefully stop the M(1) current set of
> queued processes
>
>
> In your maven.xml you can do something like this :
>
> <preGoal name="build:start">
> <j:set var="runtimeEnv" value="${runtime.env}"/>
> <j:choose>
> <j:when test="${(runtimeEnv != null) and (runtimeEnv !=
> "")}">
> <ant:echo>Your runtime environment is :
> ${runtimeEnv}</ant:echo>
> </j:when>
> <j:otherwise>
> <ant:fail>You must define a property runtime.env in your
> build.properties.</ant:fail>
> </j:otherwise>
> </j:choose>
> </preGoal>
>
> Arnaud
>
>
> > -----Message d'origine-----
> > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Envoy� : mercredi 18 mai 2005 23:55
> > � : [email protected]
> > Objet : How to gracefully stop the M(1) current set of queued
> > processes
> >
> > I have written a set of goals to deploy to our server our
> > configuration.
> > The process requires a set of properties to be defined that
> > are used to customize the deployment descriptors. If a
> > required property is missing, I want to stop the Maven build
> > process. I haven't found a gracefull way to do this. Can
> > someone describe a procedure to shutdown the entire process down.
> >
> > Thank you,
> > Bud Curtis
> >
> >
> ---------------------------------------------------------------------
> > 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]