jvanzyl 2003/03/12 09:57:01
Modified: src/plugins-build/plexus plugin.jelly
Log:
o Now you specify a configuration directory where any configuration files
might live. This directory will be filtered against an app.properties
in the specified directory.
This allows the assembly of a runtime by configuration. For me I'm making
test containers that operate together across a network and I'm attempting
to automate everything. In addition I'm trying to make it easy for our
support staff to create customized runtimes by themselves because I
don't want to take to them :-)
So you now set the ${confDir} and the ${conf} like so:
<j:set var="confDir" value="${basedir}/src/model/src/conf"/>
<j:set var="conf" value="plexus.conf"/>
<attainGoal name="plexus:deploy"/>
This will be a dyna tag soon with proper parameters, will tackle this
after a demo tomorrow afternoon.
Revision Changes Path
1.13 +18 -4 jakarta-turbine-maven/src/plugins-build/plexus/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/plexus/plugin.jelly,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- plugin.jelly 12 Mar 2003 03:53:42 -0000 1.12
+++ plugin.jelly 12 Mar 2003 17:57:01 -0000 1.13
@@ -98,10 +98,24 @@
<attainGoal name="plexus:find-components"/>
+ <!-- Read in the ui properties. -->
+ <util:properties file="${confDir}/app.properties" var="appProperties"/>
+
<copy
- file="${conf}"
- tofile="${maven.plexus.conf}/plexus.conf"
- overwrite="true"/>
+ todir="${maven.plexus.conf}"
+ overwrite="true"
+ filtering="on">
+ <fileset dir="${confDir}"/>
+ <filterset>
+ <j:forEach var="appProperty" items="${appProperties.keys()}">
+ <util:replace var="token" oldChar="." newChar="_" value="${appProperty}"/>
+ <j:set var="token" value="${token.toUpperCase()}"/>
+ <j:set var="propertyName" value="${appProperty}" />
+ <j:set var="propertyValue"
value="${appProperties.getProperty(propertyName)}"/>
+ <filter token="${token}" value="${propertyValue}"/>
+ </j:forEach>
+ </filterset>
+ </copy>
<delete>
<fileset dir="${maven.plexus.appLib}">
@@ -134,7 +148,7 @@
<!-- ===================================================================== -->
<goal name="plexus:find-components">
- <plexus:find-implementations var="implementations" configuration="${conf}"/>
+ <plexus:find-implementations var="implementations"
configuration="${confDir}/${conf}"/>
<get
src="http://www.ibiblio.org/maven/plexus/plexus-component.manifest"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]