James, there were some issues in earlier versions of maven using dotted variables.
Could you try the following: <j:set var="specVersion" value="${java.specification.version}"/> <j:set var="compileTarget" value="${maven.compile.target}"/> and then use specVersion and compileTarget in your echo's. On 4/6/06, Shute, James <[EMAIL PROTECTED]> wrote: > > Does anybody know how I can compare 2 properties in a custom goal in my > maven.xml file? > > e.g. > > For a build where the properties are > java.specification.version : 1.5 > maven.compile.target : 1.4 > > Then these steps > > <echo>${java.specification.version ne maven.compile.target}</echo> > <echo>${java.specification.version eq maven.compile.target}</echo> > <echo>${java.specification.version != maven.compile.target}</echo> > <echo>${java.specification.version == maven.compile.target}</echo> > > output this > > [echo] false > [echo] true > [echo] false > [echo] true > > which is the exact opposite of what I'd expect, as they're not the same. > In fact forcing the 2nd property to be 1.5 via the command line still > gives the same output, as do any other values I try. > > Surely this must be possible? Every example I can find compares a > property to a string literal, but I can't believe I'm the 1st person to > ever want to compare 2 properties?! > > thanks > > James > > > ------------------------------------------------------------------------------ > This message is intended only for the personal and confidential use of the > designated recipient(s) named above. If you are not the intended recipient > of this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to be > secure or error-free. Therefore, we do not represent that this information > is complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.multitask.com.au/people/dion/ Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid of the dark, but because the dark is afraid of Chuck Norris