jvanzyl 2003/03/27 04:20:42
Modified: src/plugins-build/plexus plugin.jelly
Log:
o The plexus plugin is now a pure dynatag library. To make a plexus runtime
you doing something like the following. I can probably remove conf and
confDir but I'm in the middle of testing Tambora. With this I can now take
a handful of 'configurationProperties' and generate N runtimes by putting
what's below in a loop. So I'm generating N installations of Tambora and
currently testing on a single machine with multiple IP interfaces. Next
will be to generate and distribute across a network for testing.
<plexus:deploy
base="${maven.build.dir}/runtime"
conf="plexus.conf"
confDir="${basedir}/src/model/src/conf"
modelPom="${basedir}/src/model/project.xml"
plexusPomFile="${maven.repo.local}/plexus/poms/plexus-0.3.pom"
configurationProperties="${basedir}/src/model/src/conf/app.properties"/>
This will soon be augmented to support N component builds, multiple
component manifests and general support of third party component
development in a very easy way.
Revision Changes Path
1.16 +82 -55 maven/src/plugins-build/plexus/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/plexus/plugin.jelly,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- plugin.jelly 27 Mar 2003 02:33:44 -0000 1.15
+++ plugin.jelly 27 Mar 2003 12:20:42 -0000 1.16
@@ -16,46 +16,12 @@
<!-- to run Plexus easily. -->
<!-- ===================================================================== -->
- <goal name="plexus:deploy" description="Deploys Plexus into a self-contained
directory">
-
- <plexus:create-directory-structure
- base="${maven.plexus.runtimeDirectory}"
- bin="${maven.plexus.bin}"
- conf="${maven.plexus.conf}"
- comonents="${maven.plexus.components}"
- lib="${maven.plexus.lib}"
- appLib="${maven.plexus.appLib}"
- work="${maven.plexus.work}"/>
-
- <plexus:assemble-plexus-dependencies
- plexusPomFile="${maven.plexus.pom}"
- plexusCoreLibDirectory="${maven.plexus.lib}"/>
-
- <plexus:create-classworlds-configuration
- plexusPom="${maven.plexus.pom}"
- templatePath="${maven.plexus.templatePath}"
-
classWorldsConfiguration="${maven.plexus.conf}/${maven.plexus.launcherConfiguration}"
-
classWorldsConfigurationTemplate="${maven.plexus.launcherConfigurationTemplate}"/>
-
- <plexus:create-launcher-scripts
- templatePath="${maven.plexus.templatePath}"
- unixScript="${maven.plexus.bin}/plexus.sh"
- windowsScript="${maven.plexus.bin}/plexus.bat"/>
-
- <plexus:find-components
- plexusConfiguration="${confDir}/${conf}"/>
-
- <plexus:create-component-partition
- pomFile="${modelPom}"
- directory="${maven.plexus.appLib}"/>
-
- <plexus:process-configurations
- sourceDirectory="${confDir}"
- destinationDirectory="${maven.plexus.conf}"/>
+ <!--
+ |
+ | We need a way to customize the configuration process.
+ |
+ -->
- <plexus:package-java-runtime/>
-
- </goal>
<!--
|
@@ -74,16 +40,77 @@
<define:taglib uri="plexus">
+ <!--
+ |
+ | @base
+ | @conf
+ | @confDir
+ | @modelPom
+ | @plexusPomFile
+ | @configurationProperties
+ |
+ -->
+
+ <define:tag name="deploy">
+
+ <j:set
+ var="templatePath"
+
value="${pom.getPluginContext('maven-plexus-plugin').getVariable('plugin.dir')}/plugin-resources/templates"/>
+
+ <j:set
+ var="launcherConfiguration"
+ value="classworlds.conf"/>
+
+ <j:set
+ var="launcherConfigurationTemplate"
+ value="classworlds.vm"/>
+
+ <plexus:create-directory-structure
+ base="${base}"/>
+
+ <plexus:assemble-plexus-dependencies
+ plexusPomFile="${plexusPomFile}"
+ plexusCoreLibDirectory="${base}/lib"/>
+
+ <plexus:create-classworlds-configuration
+ plexusPom="${plexusPomFile}"
+ templatePath="${templatePath}"
+ classWorldsConfiguration="${base}/conf/${launcherConfiguration}"
+ classWorldsConfigurationTemplate="${launcherConfigurationTemplate}"/>
+
+ <plexus:create-launcher-scripts
+ templatePath="${templatePath}"
+ unixScript="${base}/bin/plexus.sh"
+ windowsScript="${base}/bin/plexus.bat"/>
+
+ <plexus:find-components
+ plexusConfiguration="${confDir}/${conf}"
+ directory="${base}/app-lib"/>
+
+ <plexus:create-component-partition
+ pomFile="${modelPom}"
+ directory="${base}/app-lib"/>
+
+ <plexus:process-configurations
+ configurationProperties="${configurationProperties}"
+ sourceDirectory="${confDir}"
+ destinationDirectory="${base}/conf"/>
+
+ <plexus:package-java-runtime
+ jreDirectory="${base}/jre"/>
+
+ </define:tag>
+
<define:tag name="create-directory-structure">
<delete dir="${base}"/>
- <mkdir dir="${bin}"/>
- <mkdir dir="${conf}"/>
- <mkdir dir="${components}"/>
- <mkdir dir="${lib}"/>
- <mkdir dir="${appLib}"/>
- <mkdir dir="${work}"/>
+ <mkdir dir="${base}/bin"/>
+ <mkdir dir="${base}/conf"/>
+ <mkdir dir="${base}/components"/>
+ <mkdir dir="${base}/lib"/>
+ <mkdir dir="${base}/app-lib"/>
+ <mkdir dir="${base}/work"/>
</define:tag>
@@ -94,7 +121,9 @@
-->
<define:tag name="process-configurations">
- <util:properties file="${sourceDirectory}/app.properties"
var="appProperties"/>
+ <util:properties
+ file="${configurationProperties}"
+ var="appProperties"/>
<copy
todir="${destinationDirectory}"
@@ -283,7 +312,7 @@
executable="cp">
<arg value="-r"/>
<arg value="${java.home}"/>
- <arg value="${maven.plexus.jre}"/>
+ <arg value="${jreDirectory}"/>
</exec>
</j:if>
@@ -302,21 +331,19 @@
<j:set var="manifestPresent" value="false"/>
<util:available file="${manifest}">
<j:set var="manifestPresent" value="true"/>
- <copy file="${manifest}" todir="${plugin.dir}"/>
+ <copy
+ file="${manifest}"
+
todir="${pom.getPluginContext('maven-plexus-plugin').getVariable('plugin.dir')}"/>
</util:available>
<j:if test="${manifestPresent != 'true'}">
<get
src="http://www.ibiblio.org/maven/plexus/plexus-component.manifest"
- dest="${plugin.dir}/plexus-component.manifest"/>
+
dest="${pom.getPluginContext('maven-plexus-plugin').getVariable('plugin.dir')}/plexus-component.manifest"/>
</j:if>
- <get
- src="http://www.ibiblio.org/maven/plexus/plexus-component.manifest"
- dest="${plugin.dir}/plexus-component.manifest"/>
-
<util:properties
- uri="file:${plugin.dir}/plexus-component.manifest"
+
uri="file:${pom.getPluginContext('maven-plexus-plugin').getVariable('plugin.dir')}/plexus-component.manifest"
var="components"/>
<j:set var="pomDir" value="tmpPoms"/>
@@ -365,7 +392,7 @@
<plexus:create-component-partition
pomFile="${depPomFile}"
groupId="plexus"
- directory="${maven.plexus.appLib}"/>
+ directory="${directory}"/>
</j:forEach>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]