Rev 1976 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<project name="summarise-manifest-macrodef"xmlns:ivy="antlib:fr.jayasoft.ivy.ant"><description>The summarise-manifest macro updates the descpkg file with the build information.If there are any .jar files in the pkg directory then the updated</description><macrodef name="summarise-manifest"><attribute name="package"default="${packagename}"description="The name of the package in release manager and dpkg_archive."/><attribute name="version"default="${packageversion}"description="The version of the package in release manager and dpkg_archive."/><attribute name="builder" default="${user.name}"/><attribute name="usemanifestpackageversion" default="${version}"/><element name="jars" optional="yes" implicit="yes" /><sequential><available property="ivy.xml.exists" filepath="${basedir}" file="ivy.xml"/><if><isset property="ivy.xml.exists"/><then><ivy:resolve useOrigin="true"/><ivy:artifactproperty name="using.[module].version" value="[revision](.[branch])"/></then></if><tstamp><format property="NOW" pattern="E MMM dd HH:mm:ss z yyyy"/></tstamp><mkdir dir="${basedir}/build/pkg"/><manifest file="${basedir}/build/pkg/descpkg" mode="update"><section name="Build Properties"><attribute name="Package Name" value="@{package}"/><attribute name="Package Version" value="@{version}"/><attribute name="Built By" value="@{builder}"/><attribute name="Built On" value="${NOW}"/></section></manifest><!-- New stuff to simplify using version generation in manifest --><propertyselector property="package.version.list"delimiter=","match="using\.([^\.]*)\.version"select="\1"casesensitive="true" /><for list="${package.version.list}" param="this.package.name"><sequential><propertycopy name="this.package.version" from="using.@{this.package.name}.version" override="true"/><manifest file="${basedir}/build/pkg/descpkg" mode="update"><section name="Build Dependencies"><attribute name="@{this.package.name}" value="${this.package.version}"/></section></manifest></sequential></for><!-- End of new stuff --><for param="jar.name"><path><jars/></path><sequential><jar destfile="@{jar.name}"update="true"manifest="${basedir}/build/pkg/descpkg"/></sequential></for></sequential></macrodef></project>