ant-util


Apache Ant Utilities

Ant utilities for stand-alone Ant environment and maven-antrun-plugin environment.

Ant Tasks

This project provides the following Ant tasks.

  • mvnpath tag : extension of Ant's path tag
    • Use case:
      When you like to get path to .jar file of the dependency (what is not defined in the dependency section of Maven pom.xml) in Maven local repository.
    • Brief example:
      <mvnpath>
      
      <mvnpathelement dependency="a_group_id:an_artifact_id:1.2.3" />
      </mvnpath>

    For more info, refer to https://ant-util.googlecode.com/svn/site/apidocs/com/newmainsoftech/ant/types/maven/MavenPath.html'>MavenPath class JavaDoc.


  • mvnproperty tag : extension of Ant's property tag

    • Use case:
      When you like to have Maven property defined at same time of defining Ant property. So, you can refer such property's value in other execution of Maven plugin in your project pom.xml.
    • Brief example:
      • To define property
        <mvnproperty
        
        name="propName1"
        value="propValue1" />
      • To define property for dependency path
        <mvnproperty
        
        dependency="com.google.gwt:gwt-dev:2.4.0" />
        After that, you can obtain the actual path by inquiring ${com.google.gwt:gwt-dev:jar} as if the com.google.gwt:gwt-dev:2.4.0 dependency had been defined in the dependency section of your project's pom.xml.

    For more info, refer to https://ant-util.googlecode.com/svn/site/apidocs/com/newmainsoftech/ant/taskdefs/maven/MavenProperty.html'>MavenProperty class JavaDoc

  • mvnservercreden tag: extension of Ant's property tag

    • Use case:
      When you like to read server credential information from servers element of Maven global or user settings file and store user name and decrypted password to properties.
    • Brief example:
      <mvnservercreden serverid="test_ds1" />
      
      That mvnservercreden tag example performs reading user name and password for test_ds1 server element from default Maven settings file (default to ${user.home}/.m2/settings.xml and ${M2_HOME}/conf/settins.xml) and store user name and decrypted password to test_ds1.username and test_ds1.password Maven properties (as well as Ant properties).

    For more info, refer to https://ant-util.googlecode.com/svn/site/apidocs/com/newmainsoftech/ant/taskdefs/maven/MavenServerCredential.html'>MavenServerCredential class JavaDoc.


  • javaext tag : extension of Ant's java tag

    • Use case:
      When you're reluctant to write multiple arg tags, jvmarg tags and/or sysproperty tags.
    • Brief example:
      <javaext classname="some.name.of.ClassToExecute">
      
      <jvmargext>
      -Xmx768m -Xss4M
      -javaagent:${agent_path}=nbjdk=JDK6u24;profile=java;
      -Xbootclasspath:${some_path}
      </jvmargext>
      <argext>
      -Dmulti-line-arg1=argext1 -Dmulti-line-arg2=argext2
      -Dmulti-line-arg3=${arg3_value}
      </argext>
      ...
      </javaext>

    For more info, refer to https://ant-util.googlecode.com/svn/site/apidocs/com/newmainsoftech/ant/taskdefs/JavaTaskExt.html'>JavaTaskExt class JavaDoc


  • junitext tag : extension of Ant's junit tag

    • Use case:
      When you're reluctant to write multiple jvmarg tags and/or sysproperty tags.
    • Brief example:
      <junitext fork="yes" printsummary="yes" showoutput="true" haltonfailure="yes">
      
      <jvmargext>
      -Xmx256m -Xdebug
      -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debug_port}
      </jvmargext>
      <syspropext>
      gwt.args=-standardsMode -war ${war_dir} -logLevel WARN
      java.awt.headless=true
      gwt.devjar=${com.google.gwt:gwt-dev:jar}
      java.util.logging.config.file=test/com/gwetons/client/devMode.logging.properties
      </syspropext>
      ...
      </junitext>

    For more info, refer to https://ant-util.googlecode.com/svn/site/apidocs/com/newmainsoftech/ant/taskdefs/JUnitTaskExt.html'>JUnitTaskExt class JavaDoc


For more examples of those above tasks, you can take a look at https://code.google.com/p/ant-util/source/browse/trunk/ant/maven-antrun.ant.xml'>maven-antrun.ant.xml file what is actually used for integration tests via Maven for this project.

Download

  • For automated download as a dependency of your project via various build/dependency-management tools (such as Maven), refer to dependency-info page.
  • For manual download, download from ant-util artifacts link.
    To use this project's artifact by manually downloading, please also refer to dependencies page to get the list of sub-dependencies what needs to be downloaded manually too.

Project Information

The project was created on Aug 16, 2012.

Labels:
Java Ant Maven