<project name="deployextension" default="deploy.j2ee.web" basedir="."> | |
<property name="was.home" value="${wasHome}"/> | |
<path id="toolpath"> | |
<fileset dir="${was.home}/lib"> | |
<include name="*.jar" /> | |
</fileset> | |
<pathelement path="${was.home}/lib/properties" /> | |
<pathelement path="${was.home}/optionalLibraries/jython.jar" /> | |
</path> | |
<taskdef classpathref="toolpath" name="wsadmin" classname="com.ibm.websphere.ant.tasks.WsAdmin" /> | |
<taskdef classpathref="toolpath" name="wsejbdeploy" classname="com.ibm.websphere.ant.tasks.WsEjbDeploy" /> | |
<taskdef classpathref="toolpath" name="wsinstallapp" classname="com.ibm.websphere.ant.tasks.InstallApplication" /> | |
<target name="deploy.j2ee.web"> | |
<jar destfile="${module.name}.war"> | |
<zipfileset dir="${module.dir}"> | |
<include name="**/*.*"/> | |
<exclude name="**/*.war"/> | |
</zipfileset> | |
</jar> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp install ${module.name}.war {-appname ${module.name} -contextroot ${module.name} -usedefaultbindings}" | |
failonerror="true"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminControl invoke [$AdminControl queryNames type=ApplicationManager,*] startApplication ${module.name}" | |
failonerror="true"> | |
</wsadmin> | |
</target> | |
<target name="deploy.j2ee.ejb"> | |
<jar destfile="${module.name}.jar"> | |
<zipfileset dir="${module.dir}"> | |
<include name="**/*.*"/> | |
<exclude name="**/*.java"/> | |
</zipfileset> | |
</jar> | |
<wsejbdeploy | |
inputJar="${module.name}.jar" | |
wasHome="${was.home}" | |
washome="${was.home}" | |
classpathref="toolpath" | |
outputJar="${module.name}-was.jar" | |
codegen="true " | |
keepGenerated="true" | |
quiet="false" | |
noValidate="true" | |
noWarnings="false" | |
noInform="false" | |
compatible35="false" | |
failonerror="true" | |
trace="true" | |
jvmMaxMemory="256M" /> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp install ${module.name}.jar {-appname ${module.name} -usedefaultbindings}" | |
failonerror="true"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminControl invoke [$AdminControl queryNames type=ApplicationManager,*] startApplication ${module.name}" | |
failonerror="true"> | |
</wsadmin> | |
</target> | |
<target name="deploy.j2ee.ear"> | |
<jar destfile="${module.name}.ear"> | |
<zipfileset dir="${module.dir}"> | |
<include name="**/*.*"/> | |
<exclude name="**/*.java"/> | |
</zipfileset> | |
</jar> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp install ${module.name}.ear {-appname ${module.name} -deployejb -usedefaultbindings}" | |
failonerror="true"> | |
</wsadmin> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminControl invoke [$AdminControl queryNames type=ApplicationManager,*] startApplication ${module.name}" | |
failonerror="true"> | |
</wsadmin> | |
</target> | |
<target name="undeploy.j2ee.web"> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
</target> | |
<target name="undeploy.j2ee.ejb"> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
</target> | |
<target name="undeploy.j2ee.ear"> | |
<wsadmin | |
washome="${was.home}" | |
properties="${wasProfile}/properties/wsadmin.properties" | |
command="$AdminApp uninstall ${module.name}" | |
failonerror="false"> | |
</wsadmin> | |
</target> | |
</project> |