Russel Winder | 17 Jul 11:46

[groovy-user] AntBuilder and the Maven Ant Task

I am wondering if this is a new feature requirement for AntBuilder or I
am just missing something obvious.

I have a target in a Gant script:

target ( doPrint : 'Print the dependencies from the POM.' ) {
  echo ( message : 'User is ${user.name}' )
  println ( ant.project.properties.'user.name' )
  "antlib:org.apache.maven.artifact.ant:pom" ( id : 'project' , file :
'pom.xml' )
  echo ( message : '${project.version}' )
  println ( ant.project.properties.'project.version' )
}

the output is:

|> gant -f printDependencies.gant
     [echo] User is russel
russel
     [echo] 1.5.0-SNAPSHOT
null
|>

So accessing properties held in Ant via the AntBuilder generally is
working fine.  Clearly accessing the properties generated by executing
the POM reader is not working.

Anyone any ideas?

Thanks.
(Continue reading)


Gmane