mcconnell 2003/11/12 17:56:42
Modified: merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit
DefaultEmbeddedKernel.java
merlin maven.xml
merlin/platform/src/etc site.jsl
merlin/platform/tutorials/composition README.txt
merlin/platform/tutorials/hello project.xml
merlin/platform/xdocs/starting/advanced composite.xml
merlin/platform/xdocs/starting installation.xml
merlin/repository/impl/src/java/org/apache/avalon/repository/impl
DefaultFactory.java
merlin/web/http/impl/src/java/org/apache/avalon/merlin/http
JettyWebServer.java
Removed: merlin/repository/spi/src/test/org/apache/avalon/repository
RepositoryLoaderTest.java
Log:
Housekeeping.
Revision Changes Path
1.5 +14 -1
avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/DefaultEmbeddedKernel.java
Index: DefaultEmbeddedKernel.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/kernel/unit/src/java/org/apache/avalon/merlin/unit/DefaultEmbeddedKernel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DefaultEmbeddedKernel.java 28 Oct 2003 20:21:02 -0000 1.4
+++ DefaultEmbeddedKernel.java 13 Nov 2003 01:56:42 -0000 1.5
@@ -153,17 +153,27 @@
{
m_map = map;
+ ClassLoader current = Thread.currentThread().getContextClassLoader();
+
try
{
m_repository = createBootstrapRepository();
Properties properties = loadBootstrapProperties();
- ClassLoader current = Thread.currentThread().getContextClassLoader();
m_classloader = createClassLoader( current, m_repository, properties );
}
catch( Throwable e )
{
final String error =
"Internal error while attempting to build the loader.";
+ System.out.println( error );
+ if( current instanceof URLClassLoader )
+ {
+ printClassLoader( (URLClassLoader) current );
+ }
+ else
+ {
+ System.out.println( "Current classloader is not a URLClassLoader."
);
+ }
throw new UnitRuntimeException( error, e );
}
}
@@ -199,6 +209,9 @@
{
m_error = e;
m_started = true;
+ printClassLoader(
+ (URLClassLoader) Thread.currentThread().getContextClassLoader() );
+ e.printStackTrace();
}
while( m_command != EXIT )
1.8 +34 -9 avalon/merlin/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/maven.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- maven.xml 4 Nov 2003 04:05:06 -0000 1.7
+++ maven.xml 13 Nov 2003 01:56:42 -0000 1.8
@@ -389,20 +389,45 @@
<!--
Write a build signature for each package.
-->
-
<preGoal name="java:compile">
- <ant:echo message="Build: ${snapshotSignature}"/>
-
- <ant:echo file="${maven.build.dir}/classes/${pom.artifactId}.build">
+ <ant:property name="filename"
value="${maven.build.dir}/classes/${pom.artifactId}.artifact"/>
+ <j:set var="offset" value="${pom.artifactId.length()}"/>
+ <j:set var="scrap"
value="${snapshotSignature.substring(offset,snapshotSignature.length())}"/>
+ <j:set var="signature" value="${scrap.substring(1,scrap.length())}"/>
+ <ant:echo message="Building ${pom.artifactId} ${signature}"/>
+ <ant:echo file="${filename}">
#
-# Artifact build descriptor.
+# Artifact descriptor.
#
-build.group = ${pom.groupId}
-build.name = ${pom.artifactId}
-build.version = ${pom.currentVersion}
-build.signature = ${snapshotSignature}
+avalon.artifact.group = ${pom.groupId}
+avalon.artifact.name = ${pom.artifactId}
+avalon.artifact.version = ${pom.currentVersion}
+avalon.artifact.signature = ${signature}
+#
+# Implementation dependencies.
+#
+</ant:echo>
+ <j:set var="index" value="0"/>
+ <j:forEach var="dep" items="${pom.dependencies}">
+ <j:set var="key" value="${dep.groupId}:${dep.artifactId};${dep.version}"/>
+ <ant:echo file="${filename}" append="true">
+avalon.dependency.${index} = ${key}</ant:echo>
+ <j:set var="j" value="0"/>
+ <j:forEach var="p" items="${dep.properties}">
+ <j:set var="v" value="${p.substring(9,p.length())}"/>
+ <j:set var="pos" value="${v.indexOf(':')}"/>
+ <j:set var="len" value="${v.length()}"/>
+ <j:set var="key" value="${v.substring(0,pos)}"/>
+ <j:set var="value" value="${v.substring(pos,len)}"/>
+ <ant:echo file="${filename}" append="true">
+avalon.dependency.${index}.${key} = ${value.substring( 1, value.length()
)}</ant:echo>
+ <j:set var="j" value="${j+1}"/>
+ </j:forEach>
+ <j:set var="index" value="${index+1}"/>
+ </j:forEach>
+ <ant:echo file="${filename}" append="true">
</ant:echo>
</preGoal>
1.5 +2 -0 avalon/merlin/platform/src/etc/site.jsl
Index: site.jsl
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/src/etc/site.jsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- site.jsl 3 Nov 2003 23:57:29 -0000 1.4
+++ site.jsl 13 Nov 2003 01:56:42 -0000 1.5
@@ -186,11 +186,13 @@
<j:if test="${includeProjectDocumentation.equals('yes')}">
<div>
<strong>Project Documentation</strong>
+ <!--
<div>
<small>
<a href="${relativePath}/index.html">About ${pom.name}</a>
</small>
</div>
+ -->
<div>
<small>
<a href="${relativePath}/project-info.html">Project Info</a>
1.2 +2 -2 avalon/merlin/platform/tutorials/composition/README.txt
Index: README.txt
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/tutorials/composition/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.txt 24 Sep 2003 09:33:41 -0000 1.1
+++ README.txt 13 Nov 2003 01:56:42 -0000 1.2
@@ -22,7 +22,7 @@
$ cd application/impl
$ maven build
- $ merlin target\*.jar -system %MAVEN_HOME% -execute
+ $ merlin -execute target\*.jar -repository %MAVEN_HOME%
[INFO ] (application.publisher.publisher): created
[INFO ] (application.location.info): location: Paris
@@ -38,7 +38,7 @@
Use the following command to include container debug level log entries for the
demanding developer.
- $ merlin target\*.jar -system %MAVEN_HOME% -execute -config conf\debug.xml
+ $ merlin -execute -repository %MAVEN_HOME% target\*.jar -config conf\debug.xml
Summary
-------
1.6 +1 -1 avalon/merlin/platform/tutorials/hello/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/tutorials/hello/project.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- project.xml 4 Nov 2003 04:05:06 -0000 1.5
+++ project.xml 13 Nov 2003 01:56:42 -0000 1.6
@@ -27,7 +27,7 @@
<dependency>
<groupId>merlin</groupId>
<artifactId>merlin-unit</artifactId>
- <version>3.2-dev</version>
+ <version>3.2.3-dev</version>
</dependency>
</dependencies>
1.3 +1 -1 avalon/merlin/platform/xdocs/starting/advanced/composite.xml
Index: composite.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/xdocs/starting/advanced/composite.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- composite.xml 25 Oct 2003 15:18:23 -0000 1.2
+++ composite.xml 13 Nov 2003 01:56:42 -0000 1.3
@@ -167,7 +167,7 @@
<source><![CDATA[
$ cd application/impl
$ maven build
-$ merlin target\*.jar -system %MAVEN_HOME% -execute
+$ merlin target\*.jar -repository %MAVEN_HOME% -execute
]]></source>
<p>
The log output demonstrates the deployment by Merlin of the blocks
1.3 +1 -1 avalon/merlin/platform/xdocs/starting/installation.xml
Index: installation.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/xdocs/starting/installation.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- installation.xml 7 Nov 2003 19:14:32 -0000 1.2
+++ installation.xml 13 Nov 2003 01:56:42 -0000 1.3
@@ -149,7 +149,7 @@
<source><![CDATA[
$ merlin.sh -help
usage: merlin [block] [-debug] [-config <file>] [-lang
-<code>] [-system <directory>] [-kernel <file>] [-home
+<code>] [-repository <directory>] [-kernel <file>] [-home
<directory>] [-version] [-help]
...
]]></source>
1.4 +12 -11
avalon/merlin/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFactory.java
Index: DefaultFactory.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultFactory.java 3 Nov 2003 22:03:53 -0000 1.3
+++ DefaultFactory.java 13 Nov 2003 01:56:42 -0000 1.4
@@ -68,6 +68,7 @@
import org.apache.avalon.repository.Repository ;
import org.apache.avalon.repository.ProxyContext ;
+import org.apache.avalon.repository.RepositoryContext ;
import org.apache.avalon.repository.RepositoryConfig ;
import org.apache.avalon.repository.RepositoryFactory ;
import org.apache.avalon.repository.RepositoryException ;
@@ -120,7 +121,7 @@
*
* @see org.apache.avalon.repository.RepositoryFactory#getDefaultConfig()
*/
- public RepositoryConfig getDefaultConfig()
+ public RepositoryContext getDefaultContext()
throws RepositoryException
{
Properties l_bootstrap = new Properties() ;
@@ -214,25 +215,25 @@
* @see org.apache.avalon.repository.RepositoryFactory
* create(org.apache.avalon.repository.RepositoryConfig)
*/
- public Repository create( RepositoryConfig a_config )
+ public Repository create( RepositoryContext context )
{
Repository l_repository = null ;
- File l_base = new File( a_config.getCacheDir() ) ;
+ File l_base = new File( context.getCacheDir() ) ;
- if ( null == a_config.getProxyContext() &&
- null == a_config.getRemoteRepositories() )
+ if ( null == context.getProxyContext() &&
+ null == context.getRemoteRepositories() )
{
l_repository = new DefaultFileRepository( l_base ) ;
}
- else if ( null == a_config.getProxyContext() )
+ else if ( null == context.getProxyContext() )
{
l_repository = new DefaultFileRepository( l_base,
- a_config.getRemoteRepositories() ) ;
+ context.getRemoteRepositories() ) ;
}
l_repository = new DefaultFileRepository( l_base,
- a_config.getProxyContext(),
- a_config.getRemoteRepositories() ) ;
+ context.getProxyContext(),
+ context.getRemoteRepositories() ) ;
return l_repository ;
}
1.2 +2 -1
avalon/merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java
Index: JettyWebServer.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/web/http/impl/src/java/org/apache/avalon/merlin/http/JettyWebServer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JettyWebServer.java 10 Nov 2003 22:39:17 -0000 1.1
+++ JettyWebServer.java 13 Nov 2003 01:56:42 -0000 1.2
@@ -111,7 +111,8 @@
/************************************************/
//protected File m_appHome = null;
protected HashMap m_listeners = new HashMap();
- protected String m_basedir = System.getProperty("merlin.home",
System.getProperty("user.dir"));
+ protected String m_basedir =
+ System.getProperty("merlin.home", System.getProperty("user.dir"));
/************************************************/
protected static final String CFG_LISTENER = "Listener";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]