Class ImportTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.isomorphic.maven.mojo.reify.ImportTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ValidateTask

public class ImportTask
extends org.apache.tools.ant.Task
An Ant task allowing the Reify ImportMojo to be run from Ant builds. Note that default values have been changed to accomodate a typical Ant project structure, otherwise functionality is unchanged.

To use this Task, just add a taskdef to the desired build target, and make sure you have the required classpath entries set up correctly. If you've built your project using one of the Maven archetypes for either SmartGWT or SmartClient (and subsequently issued the ant 'unmaven' target), this should all be done for you. Otherwise, you'll want to add something like the following to your build:

 <property name="reify.lib" value="${basedir}/build/ivy/reify/lib" />
 
 <path id="reify.classpath">
     <fileset dir="${reify.lib}" erroronmissingdir="false">
       <include name="**/*.jar" />
     </fileset>
 </path>
 
 <target name="reify-tasklibs">
     <mkdir dir="${reify.lib}" />
     <ivy:resolve conf="reify" />
     <ivy:retrieve conf="reify" pattern="${reify.lib}/[artifact]-[revision](-[classifier]).[ext]"/>
 </target>
 
 <target name="reify-import" depends="reify-tasklibs">
 
     <taskdef name="reify-import" classname="com.isomorphic.maven.mojo.reify.ImportTask" classpathref="reify.classpath"/>
     <reify-import projectName="MyProject" username="${username}" password="${password}" 
                   datasourcesDir="WEB-INF/ds/classic-models" 
                   smartclientRuntimeDir="${basedir}/war/isomorphic" />
 </target>
 
Use of ivy is of course optional, you just need somehow to get the isomorphic_m2pluginextras module and its dependencies on your classpath - here they are copied to the directory defined in the reify.lib property)

Note that users working behind a proxy may need to provide server information to Ant by way of the ANT_OPTS environment variable:

 export ANT_OPTS="-Dhttp.proxyHost=myproxyhost -Dhttp.proxyPort=8080 -Dhttp.proxyUser=myproxyusername -Dhttp.proxyPassword=myproxypassword"