From: dion g. <dio...@us...> - 2004-07-30 05:13:40
|
diongillard 04/07/29 22:13:31 Modified: was5 plugin.jelly was5/xdocs changes.xml Log: Check maven.was5.home exists before using Revision Changes Path 1.4 +19 -10 maven-plugins/was5/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/plugin.jelly,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- plugin.jelly 30 Jul 2004 03:50:57 -0000 1.3 +++ plugin.jelly 30 Jul 2004 05:13:31 -0000 1.4 @@ -1,10 +1,11 @@ -<project default="serverStatus" xmlns:j="jelly:core" - xmlns:ant="jelly:ant"> - - <!-- TODO: Add a check to make sure maven.was5.home is a valid directory --> +<project default="serverStatus" + xmlns:j="jelly:core" + xmlns:ant="jelly:ant" + xmlns:assert="assert"> <!-- generate deployment and rmic code for an ejb jar --> <goal name="was5:ejbDeploy" description="Generate deployment and RMIC code for an ejb jar"> + <assert:assertFileExists file="${maven.was5.home}"/> <!-- clean up working dir --> <delete dir="${maven.was5.ejbDeploy.workingdir}" failonerror="false"/> <mkdir dir="${maven.was5.ejbDeploy.workingdir}"/> @@ -46,7 +47,8 @@ </postGoal> <goal name="was5:startServer" description="Start a WebSphere Appserver"> - <ant:fail unless="maven.was5.startServer.server">maven.was.startServer.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <ant:fail unless="maven.was5.startServer.server">maven.was5.startServer.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasStartServer" classname="com.ibm.websphere.ant.tasks.StartServer" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasStartServer server="${maven.was5.startServer.server}"> @@ -67,7 +69,8 @@ </goal> <goal name="was5:stopServer" description="Stop a WebSphere Appserver"> - <ant:fail unless="maven.was5.stopServer.server">maven.was.stopServer.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <ant:fail unless="maven.was5.stopServer.server">maven.was5.stopServer.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasStopServer" classname="com.ibm.websphere.ant.tasks.StopServer" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasStopServer server="${maven.was5.stopServer.server}"> @@ -90,7 +93,8 @@ </goal> <goal name="was5:serverStatus" description="Show the status of a WebSphere Appserver"> - <ant:fail unless="maven.was5.serverStatus.server">maven.was.serverStatus.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <ant:fail unless="maven.was5.serverStatus.server">maven.was5.serverStatus.server must be specified (specifying maven.was5.server is sufficient)</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasServerStatus" classname="com.ibm.websphere.ant.tasks.ServerStatus" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasServerStatus server="${maven.was5.serverStatus.server}"> @@ -107,6 +111,7 @@ </goal> <goal name="was5:listApps" description="List applications installed on a WebSphere Appserver"> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasListApps" classname="com.ibm.websphere.ant.tasks.ListApplications" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasListApps> <ant:setProperty name="profile" value="${maven.was5.listApps.profile}"/> @@ -123,6 +128,7 @@ <goal name="was5:installApp" description="Install an application on a WebSphere Appserver"> <ant:fail unless="maven.was5.installApp.ear">maven.was5.installApp.ear must be specified</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasInstallApp ear="${maven.was5.installApp.ear}"> @@ -138,7 +144,8 @@ </goal> <goal name="was5:uninstallApp" description="Uninstall an application on a WebSphere Appserver"> - <ant:fail unless="maven.was5.uninstallApp.application">maven.was.uninstallApp.application must be specified</ant:fail> + <ant:fail unless="maven.was5.uninstallApp.application">maven.was5.uninstallApp.application must be specified</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasUninstallApp" classname="com.ibm.websphere.ant.tasks.UninstallApplication" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasUninstallApp application="${maven.was5.uninstallApp.application}"> @@ -154,7 +161,8 @@ </goal> <goal name="was5:startApp" description="Start an installed application on a WebSphere Appserver"> - <ant:fail unless="maven.was5.startApp.application">maven.was.startApp.application must be specified</ant:fail> + <ant:fail unless="maven.was5.startApp.application">maven.was5.startApp.application must be specified</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasStartApp" classname="com.ibm.websphere.ant.tasks.StartApplication" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasStartApp application="${maven.was5.startApp.application}"> @@ -173,7 +181,8 @@ </goal> <goal name="was5:stopApp" description="Stop an installed application on a WebSphere Appserver"> - <ant:fail unless="maven.was5.stopApp.application">maven.was.stopApp.application must be specified</ant:fail> + <ant:fail unless="maven.was5.stopApp.application">maven.was5.stopApp.application must be specified</ant:fail> + <assert:assertFileExists file="${maven.was5.home}"/> <taskdef name="wasStopApp" classname="com.ibm.websphere.ant.tasks.StopApplication" classpath="${maven.was5.home}/lib/wsanttasks.jar"/> <ant:wasStopApp application="${maven.was5.stopApp.application}"> 1.3 +3 -1 maven-plugins/was5/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/changes.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- changes.xml 28 Jul 2004 15:20:17 -0000 1.2 +++ changes.xml 30 Jul 2004 05:13:31 -0000 1.3 @@ -6,11 +6,13 @@ <author email="dio...@us...">dIon Gillard</author> </properties> <body> + <release version="1.1-SNAPSHOT" date="in CVS"> + <action dev="diongillard" type="fix">Check ${maven.was5.home} exists before using</action> + </release> <release version="1.0" date="2004-07-28"> <action dev="diongillard" type="add">Add reinstallApp goal</action> <action dev="rlewisshell" type="add">Create goals that use the Websphere supplied ant tasks</action> </release> - </body> </document> |