You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rturnbull <ry...@utilitran.com> on 2006/02/22 17:49:47 UTC

Declaration of an array in project.properties file - More information on what I'm doing

Here is a code snippet from the maven.xml file that I have created where 
I'm trying to use the array....



<project xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" 
xmlns:j="jelly:core">
<goal name="testingscript">
                <j:forEach var="currentDeployHost" items="${testing.array}">
                        <j:set var="deploy.host" 
value="${currentDeployHost}" />
                        <echo>${deploy.host}</echo>
                </j:forEach>
        </goal>



So with the code above... I'm hoping that testing.array is declared/set 
with values in the project.properties file. 
Example:
testing.array[]={ 1 2 3 4 5 6 7 8}
or
testing.array[]={"//123.123.123.123:8050","//124.124.124.124:8050", etc. }

Then with that it loops through the array setting the "deploy.host".  
Then I'm just going to call a existing goal previously declared that 
will deploy to that particular host. 

What I'm trying to do is get a list of java servers that need to be 
updated, but are NOT linked with each other through RMI or java 
clustering... Its a simple way to keep testing environments, 
preproduction environments and possibly production environments all up 
to date at the same time.

Thanks

-- 
Ryan Turnbull