mcconnell 2003/08/25 09:38:42
Modified: merlin/merlin-plugin plugin.jelly plugin.properties
merlin/merlin-plugin/src/java/org/apache/avalon/merlin/tools
MerlinBean.java
Log:
Improvement management of kernel context and better internal naming.
Revision Changes Path
1.25 +16 -13 avalon-sandbox/merlin/merlin-plugin/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/merlin-plugin/plugin.jelly,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- plugin.jelly 23 Aug 2003 17:08:51 -0000 1.24
+++ plugin.jelly 25 Aug 2003 16:38:42 -0000 1.25
@@ -15,7 +15,7 @@
method="doExecute"/>
</define:taglib>
- <goal name="merlin:deploy"
+ <goal name="merlin:deploy" prereqs="jar:jar"
description="Deployment from ${maven.build.dir}/${maven.final.name}.jar">
<j:set var="merlin.target" value="${merlin.target}"/>
<j:set var="merlin.target" value="${maven.build.dir}/${maven.final.name}.jar"/>
@@ -25,7 +25,7 @@
</j:if>
</goal>
- <goal name="merlin:simulate"
+ <goal name="merlin:simulate" prereqs="test:test"
description="Simulated deployment from ${maven.build.dir}/classes">
<j:set var="merlin.target" value="${maven.build.dir}/classes"/>
<util:file var="target" name="${merlin.target}"/>
@@ -36,10 +36,10 @@
<goal name="merlin:execute" prereqs="merlin:prepare-context">
<merlin:kernel
- system="${merlin.system}"
+ repository="${merlin.repository.local}"
+ home="${basedir}"
+ anchor="${merlin.anchor}"
kernel="${merlin.kernel}"
- repository="${merlin.repository.local}/repository"
- home="${basedir}"
target="${merlin.target}"
config="${merlin.config}"
debug="${merlin.debug}"
@@ -49,23 +49,26 @@
<goal name="merlin:prepare-context">
+ <ant:property environment="env"/>
+
<!--
- Assign a value to the merlin.system.dir variable. If the
+ Assign a value to the merlin.anchor.dir variable. If the
value has already been defined this will fail and the prior
defintion will hold.
-->
- <ant:property environment="env"/>
- <j:set var="merlin.system" value="${basedir}"/>
- <j:set var="merlin.system.dir" value="${merlin.system}"/>
- <util:file var="sys" name="${merlin.system.dir}"/>
- <j:if test="${sys.exists()}">
- <j:set var="merlin.system" value="${merlin.system.dir}"/>
+
+ <j:set var="merlin.anchor.dir" value="${merlin.anchor}"/>
+ <j:set var="merlin.anchor.dir" value="${basedir}"/>
+ <util:file var="anchorFile" name="${merlin.anchor.dir}"/>
+ <j:if test="${anchorFile.exists()}">
+ <j:set var="merlin.anchor" value="${merlin.anchor.dir}"/>
</j:if>
<!--
Set the repository path.
-->
- <j:set var="merlin.repository.local" value="${maven.home.local}"/>
+ <j:set var="merlin.repository.local" value="${env.MAVEN_HOME_LOCAL}"/>
+ <j:set var="merlin.repository.local" value="${env.MAVEN_HOME}"/>
<j:set var="merlin.repository.local" value="${maven.home}"/>
<!--
1.6 +1 -1 avalon-sandbox/merlin/merlin-plugin/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/merlin-plugin/plugin.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- plugin.properties 23 Aug 2003 09:35:46 -0000 1.5
+++ plugin.properties 25 Aug 2003 16:38:42 -0000 1.6
@@ -9,7 +9,7 @@
# for the defintion of relative directory references used in option
# extension directory establishment. The default value is ${basedir}.
#
-#merlin.anchor.dir
+#merlin.anchor
#
# Relative or absolute directory of the local repository directory.
1.15 +7 -6
avalon-sandbox/merlin/merlin-plugin/src/java/org/apache/avalon/merlin/tools/MerlinBean.java
Index: MerlinBean.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-plugin/src/java/org/apache/avalon/merlin/tools/MerlinBean.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- MerlinBean.java 23 Aug 2003 09:35:46 -0000 1.14
+++ MerlinBean.java 25 Aug 2003 16:38:42 -0000 1.15
@@ -105,7 +105,7 @@
* The directory against which extension directories are resolved
* if extension direcctories are declared in the classloader.
*/
- private File m_system;
+ private File m_anchor;
/**
* The local working directory. Typically corresponds to the
@@ -194,9 +194,9 @@
/**
* Set the option jar file extensions directory anchor.
*/
- public void setSystem( File system )
+ public void setAnchor( File anchor )
{
- m_system = system;
+ m_anchor = anchor;
}
/**
@@ -286,7 +286,7 @@
*/
public File getAnchorDirectory()
{
- return m_system;
+ return m_anchor;
}
/**
@@ -314,11 +314,12 @@
{
try
{
- Repository repository = new DefaultFileRepository( m_repository );
+ File repo = new File( m_repository, "repository" );
+ Repository repository = new DefaultFileRepository( repo );
DefaultKernelContext context =
new DefaultKernelContext(
repository,
- null,
+ m_repository,
getAnchorDirectory(),
getHomeDirectory(),
getKernelURL(),
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]