Jacopo, Thanks for these additional targets.
I liked the last one i.e "create-admin-user-login"

--
Ashish

On Sat, Jan 31, 2009 at 8:04 PM,  <[email protected]> wrote:
> Author: jacopoc
> Date: Sat Jan 31 14:34:40 2009
> New Revision: 739563
>
> URL: http://svn.apache.org/viewvc?rev=739563&view=rev
> Log:
> Three new ant targets defined:
> * run-install-readers to pass the comma separated list of data readers (IMO 
> this task should be named "run-install" and the existing one should be 
> renamed "run-install-demo")
> * run-install-file to pass a file name to load data from
> * create-admin-user-login that prompts for a user login, then creates it with 
> admin privileges and a temporary password equal to 'ofbiz'
>
> The last task is useful to build and setup a framework only distribution; the 
> steps to get, build and run the OFBiz framework with seed data only are:
> 1) checkout OFBiz
> 2) remove the applications and specialpurpose folders
> 3) ant run-install-extseed
> 4) ant create-admin-user-login (and enter a user login id when prompted)
> 5) start ofbiz and login with the user login id created in step 4 (use the 
> password 'ofbiz')
> 6) change the password when prompted
>
> Modified:
>    ofbiz/trunk/build.xml
>
> Modified: ofbiz/trunk/build.xml
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=739563&r1=739562&r2=739563&view=diff
> ==============================================================================
> --- ofbiz/trunk/build.xml (original)
> +++ ofbiz/trunk/build.xml Sat Jan 31 14:34:40 2009
> @@ -296,6 +296,40 @@
>             <arg value="readers=seed,seed-initial,ext,ext-test"/>
>         </java>
>     </target>
> +    <target name="run-install-readers" depends="build"
> +        description="This loads data using the command line argument 
> 'readers' that takes a comma separated list of readers (seed, seed-initial, 
> demo, ext, ext-test, ext-demo)">
> +        <java jar="ofbiz.jar" fork="true" >
> +            <jvmarg value="${memory.initial.param}"/>
> +            <jvmarg value="${memory.max.param}"/>
> +            <arg value="install"/>
> +            <arg value="readers=${data-readers}"/>
> +        </java>
> +    </target>
> +    <target name="run-install-file" depends="build"
> +        description="This loads data using the command line argument 'file' 
> to load data from a given file">
> +        <java jar="ofbiz.jar" fork="true">
> +            <jvmarg value="${memory.initial.param}"/>
> +            <jvmarg value="${memory.max.param}"/>
> +            <arg value="install"/>
> +            <arg value="delegator=default"/>
> +            <arg value="file=${data-file}"/>
> +        </java>
> +    </target>
> +    <target name="create-admin-user-login"
> +        description="Prompts for a user name, then creates a user login with 
> admin privileges and a temporary password equal to 'ofbiz'; after a succesful 
> login the user will be prompted for a new password.">
> +        <input addproperty="userLoginId" message="Enter user name (log in 
> with the temporary password 'ofbiz'):"/>
> +        <echoxml file="runtime/tmp/tmpUserLogin.xml">
> +            <entity-engine-xml>
> +                <UserLogin userLoginId="${userLoginId}" 
> currentPassword="{SHA}47ca69ebb4bdc9ae0adec130880165d2cc05db1a" 
> requirePasswordChange="Y"/>
> +                <UserLoginSecurityGroup groupId="FULLADMIN" 
> userLoginId="${userLoginId}" fromDate="2001-01-01 12:00:00.0"/>
> +            </entity-engine-xml>
> +        </echoxml>
> +        <antcall target="run-install-file">
> +            <param name="data-file" value="runtime/tmp/tmpUserLogin.xml"/>
> +        </antcall>
> +        <delete file="runtime/tmp/tmpUserLogin.xml"/>
> +    </target>
> +
>     <target name="run-debug" depends="build">
>         <java jar="ofbiz.jar"  fork="true">
>             <jvmarg value="${memory.initial.param}"/>
>
>
>

Reply via email to