Package com.isomorphic.maven.mojo.reify
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"
-
Field Summary
Fields Modifier and Type Field Description protected StringdataSourcesDirprotected booleandrawOnWelcomeFilesprotected booleanincludeTestHtmlprotected booleanincludeTestJspprotected StringmockDataSourcesDirprotected booleanmodifyWelcomeFilesprotected Stringpasswordprotected StringprojectFileDirprotected StringprojectFileNameprotected StringprojectNameprotected StringserverUrlprotected booleanskipValidationOnImportprotected StringsmartclientRuntimeDirprotected StringtestHtmlPathnameprotected StringtestJspPathnameprotected StringuiDirprotected Stringusernameprotected com.isomorphic.util.ErrorMessage.SeverityvalidationFailureThresholdprotected StringwebappDirprotected Stringworkdirprotected StringzipFileName -
Constructor Summary
Constructors Constructor Description ImportTask() -
Method Summary
Modifier and Type Method Description voidexecute()voidsetDataSourcesDir(String dataSourcesDir)Change the default value of WEB-INF/ds.voidsetDrawOnWelcomeFiles(boolean drawOnWelcomeFiles)Change the default value of false.voidsetIncludeTestHtml(boolean includeTestHtml)Change the default value of false.voidsetIncludeTestJsp(boolean includeTestJsp)Change the default value of false.voidsetMockDataSourcesDir(String mockDataSourcesDir)Change the default value ofdataSourcesDir/mock.voidsetModifyWelcomeFiles(boolean modifyWelcomeFiles)Change the default value of false.voidsetPassword(String password)voidsetProjectFileDir(String projectFileDir)Change the default value of WEB-INF/ui.voidsetProjectName(String projectName)Change the default value of ${ant.project.name}.voidsetServerUrl(String serverUrl)Change the default value of https://create.reify.com.voidsetSkipValidationOnImport(boolean skipValidationOnImport)Change the default value of false.voidsetSmartclientRuntimeDir(String smartclientRuntimeDir)Change the default value of ${basedir}/war/isomorphic.voidsetTestHtmlPathname(String testHtmlPathname)Change the default value ofprojectName.run.html.voidsetTestJspPathname(String testJspPathname)Change the default value ofprojectName.run.jsp.voidsetUiDir(String uiDir)Change the default value of WEB-INF/ui.voidsetUsername(String username)voidsetValidationFailureThreshold(com.isomorphic.util.ErrorMessage.Severity validationFailureThreshold)Change the default value of ERROR.voidsetWebappDir(String webappDir)Change the default value of ${basedir}/war.voidsetWorkdir(String workdir)Change the default value of ${basedir}/build/reify.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
Field Details
-
serverUrl
-
workdir
-
webappDir
-
smartclientRuntimeDir
-
includeTestJsp
protected boolean includeTestJsp -
testJspPathname
-
includeTestHtml
protected boolean includeTestHtml -
testHtmlPathname
-
dataSourcesDir
-
mockDataSourcesDir
-
skipValidationOnImport
protected boolean skipValidationOnImport -
validationFailureThreshold
protected com.isomorphic.util.ErrorMessage.Severity validationFailureThreshold -
uiDir
-
projectFileDir
-
modifyWelcomeFiles
protected boolean modifyWelcomeFiles -
drawOnWelcomeFiles
protected boolean drawOnWelcomeFiles -
projectName
-
projectFileName
-
zipFileName
-
username
-
password
-
-
Constructor Details
-
ImportTask
public ImportTask()
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
setServerUrl
Change the default value of https://create.reify.com.- Parameters:
serverUrl- the new value- See Also:
ImportMojo.serverUrl
-
setWorkdir
Change the default value of ${basedir}/build/reify.- Parameters:
workdir- the new value- See Also:
ImportMojo.workdir
-
setWebappDir
Change the default value of ${basedir}/war.- Parameters:
webappDir- the new value- See Also:
ImportMojo.webappDir
-
setSmartclientRuntimeDir
Change the default value of ${basedir}/war/isomorphic.- Parameters:
smartclientRuntimeDir- the new value- See Also:
ImportMojo.smartclientRuntimeDir
-
setIncludeTestJsp
public void setIncludeTestJsp(boolean includeTestJsp)Change the default value of false.- Parameters:
includeTestJsp- the new value- See Also:
ImportMojo.includeTestJsp
-
setTestJspPathname
Change the default value ofprojectName.run.jsp.- Parameters:
testJspPathname- the new value- See Also:
ImportMojo.testJspPathname
-
setIncludeTestHtml
public void setIncludeTestHtml(boolean includeTestHtml)Change the default value of false.- Parameters:
includeTestHtml- the new value- See Also:
ImportMojo.includeTestHtml
-
setTestHtmlPathname
Change the default value ofprojectName.run.html.- Parameters:
testHtmlPathname- the new value- See Also:
ImportMojo.testHtmlPathname
-
setDataSourcesDir
Change the default value of WEB-INF/ds.- Parameters:
dataSourcesDir- the new value- See Also:
ImportMojo.dataSourcesDir
-
setMockDataSourcesDir
Change the default value ofdataSourcesDir/mock.- Parameters:
mockDataSourcesDir- the new value- See Also:
ImportMojo.mockDataSourcesDir
-
setSkipValidationOnImport
public void setSkipValidationOnImport(boolean skipValidationOnImport)Change the default value of false.- Parameters:
skipValidationOnImport- the new value- See Also:
ImportMojo.skipValidationOnImport
-
setValidationFailureThreshold
public void setValidationFailureThreshold(com.isomorphic.util.ErrorMessage.Severity validationFailureThreshold)Change the default value of ERROR. Other legal values include INFO and WARN.- Parameters:
validationFailureThreshold- the new value- See Also:
ImportMojo.validationFailureThreshold
-
setUiDir
Change the default value of WEB-INF/ui.- Parameters:
uiDir- the new value- See Also:
ImportMojo.uiDir
-
setProjectFileDir
Change the default value of WEB-INF/ui.- Parameters:
projectFileDir- the new value- See Also:
ImportMojo.projectFileDir
-
setModifyWelcomeFiles
public void setModifyWelcomeFiles(boolean modifyWelcomeFiles)Change the default value of false.- Parameters:
modifyWelcomeFiles- the new value- See Also:
ImportMojo.modifyWelcomeFiles
-
setDrawOnWelcomeFiles
public void setDrawOnWelcomeFiles(boolean drawOnWelcomeFiles)Change the default value of false.- Parameters:
drawOnWelcomeFiles- the new value- See Also:
ImportMojo.drawOnWelcomeFiles
-
setProjectName
Change the default value of ${ant.project.name}.- Parameters:
projectName- the new value- See Also:
ImportMojo.projectName
-
setUsername
- Parameters:
username- the new value
-
setPassword
- Parameters:
password- the new value
-