You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2010/03/05 15:16:18 UTC
svn commit: r919428 - /ofbiz/trunk/build.xml
Author: jacopoc
Date: Fri Mar 5 14:16:17 2010
New Revision: 919428
URL: http://svn.apache.org/viewvc?rev=919428&view=rev
Log:
Improved create-component ant target to check for mandatory arguments; thanks to Chris Snow for the patch (OFBIZ-3538)
Modified:
ofbiz/trunk/build.xml
Modified: ofbiz/trunk/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=919428&r1=919427&r2=919428&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Fri Mar 5 14:16:17 2010
@@ -546,10 +546,10 @@
<target name="create-component"
description="Creates the layout of an OFBiz component in the hot-deploy folder.">
- <input addproperty="component-name" message="Component name: (e.g. mycomponent)"/>
- <input addproperty="component-resource-name" message="Component resource name: (e.g. MyComponent)"/>
- <input addproperty="webapp-name" message="Webapp name: (e.g. mycomponent)"/>
- <input addproperty="base-permission" message="Base permission: (e.g. MYCOMPONENT)"/>
+ <input addproperty="component-name" message="Component name: (e.g. mycomponent) [Mandatory]"/>
+ <input addproperty="component-resource-name" message="Component resource name: (e.g. MyComponent) [Mandatory]"/>
+ <input addproperty="webapp-name" message="Webapp name: (e.g. mycomponent) [Mandatory]"/>
+ <input addproperty="base-permission" message="Base permission: (e.g. MYCOMPONENT) [Mandatory]"/>
<echo>The following hot-deploy component will be created:
Name: ${component-name}
Resource Name: ${component-resource-name}
@@ -563,7 +563,27 @@
<equals arg1="${confirm-component-creation}" arg2="N" casesensitive="false"/>
</condition>
</fail>
- <filterset id="replacePlaceholders">
+ <fail message="Component name is mandatory">
+ <condition>
+ <equals arg1="${component-name}" arg2="" casesensitive="false" trim="yes"/>
+ </condition>
+ </fail>
+ <fail message="Resource name is mandatory">
+ <condition>
+ <equals arg1="${component-resource-name}" arg2="" casesensitive="false" trim="yes"/>
+ </condition>
+ </fail>
+ <fail message="Webapp name is mandatory">
+ <condition>
+ <equals arg1="${webapp-name}" arg2="" casesensitive="false" trim="yes"/>
+ </condition>
+ </fail>
+ <fail message="Base permission is mandatory">
+ <condition>
+ <equals arg1="${base-permission}" arg2="" casesensitive="false" trim="yes"/>
+ </condition>
+ </fail>
+ <filterset id="replacePlaceholders">
<filter token="component-name" value="${component-name}"/>
<filter token="component-resource-name" value="${component-resource-name}"/>
<filter token="base-permission" value="${base-permission}"/>