Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 2441 invoked from network); 5 Sep 2003 10:00:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Sep 2003 10:00:37 -0000 Received: (qmail 13438 invoked by uid 500); 5 Sep 2003 10:00:10 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 13360 invoked by uid 500); 5 Sep 2003 10:00:09 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 13344 invoked by uid 500); 5 Sep 2003 10:00:08 -0000 Received: (qmail 13337 invoked from network); 5 Sep 2003 10:00:08 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 5 Sep 2003 10:00:08 -0000 Received: (qmail 2390 invoked by uid 1438); 5 Sep 2003 10:00:33 -0000 Date: 5 Sep 2003 10:00:33 -0000 Message-ID: <20030905100033.2389.qmail@minotaur.apache.org> From: mcconnell@apache.org To: avalon-sandbox-cvs@apache.org Subject: cvs commit: avalon-sandbox/merlin/merlin-plugin/src/java/org/apache/avalon/merlin/tools MerlinBean.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mcconnell 2003/09/05 03:00:33 Modified: merlin STRUCTURE.TXT maven.xml platform.xml merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl DefaultContainmentModel.java merlin/merlin-extensions/merlin-jmx/conf block.xml merlin/merlin-platform/tutorials/composition/application/impl project.xml merlin/merlin-platform/tutorials/composition/location/api project.xml merlin/merlin-platform/tutorials/composition/location/impl project.xml merlin/merlin-platform/tutorials/composition/publisher/api project.xml merlin/merlin-platform/tutorials/composition/publisher/impl project.xml merlin/merlin-plugin/src/java/org/apache/avalon/merlin/tools MerlinBean.java Log: Housekeeping. Revision Changes Path 1.6 +14 -14 avalon-sandbox/merlin/STRUCTURE.TXT Index: STRUCTURE.TXT =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/STRUCTURE.TXT,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- STRUCTURE.TXT 19 Aug 2003 03:54:49 -0000 1.5 +++ STRUCTURE.TXT 5 Sep 2003 10:00:32 -0000 1.6 @@ -15,8 +15,10 @@ +-- activation activation implementation +-- activation-api activation API interfaces and classes +-- activation-spi activation SPI interfaces and classes - +-- composition composition implementation - +-- composition-spi composition SPI interfaces and classes + +-- composition composition framework + +- api composition API + +- spi composition SPI + +- impl composition framework implementation +-- extension jar manegement implementation +-- extension-spi jar manegement SPI interfaces and classes +-- kernel @@ -32,26 +34,24 @@ +-- merlin-platform site and installation resources +- src resources used to build a merlin installation +- tutorials several merlin tutorials - +- examples example applications - +- target - +- docs generate site documentation + +- examples example applications (work-in-progress) +-- repository +- spi resource repository interfaces +- impl resource repository implementation +-- target generated build +- merlin the generated installation (see build procedure detailed below) + +- docs generate site documentation BUILD PROCEDURE: ---------------- -The Merlin project requires the Maven project management tool. - -The merlin-dist goal builds a Merlin installation directory under the +The Merlin project requires the Maven project management tool. +The merlin:install goal builds a Merlin installation directory under the default /target/merlin. - $ maven merlin-dist + $ maven merlin:install Following the creation of an installation you need to declare the environment variable MERLIN_HOME with a value corresponding to the directory in which you @@ -66,20 +66,20 @@ Support for the installation and execution of Merlin as an NT process is now included in the package (refer bin directory) - special thanks to Leif for helping to set this up. When updating an existing installation, the -maven goal merlin-libs invokes the classic merlin-dist and updates your local +maven goal merlin:update invokes the classic merlin:install and updates your local merlin repository. This is often convinient if you are frequently updating -the merlin core. +the merlin core. For additional information please check the documentation and also use the -Avalon Users list (subscription details in the doc). The merlin-site goal +Avalon Users list (subscription details in the doc). The merlin:site goal aggregates the sources from across the main Merlin sub-projects to build a consolidated project presentation. The goal should be invoked from the root merlin directory. - $ maven merlin-site + $ maven merlin:site Finally, please keep in mind that while Merlin is nearing completion and readiness for a first release, it should be considered as beta software as APIs are changing, and documentation is evolving. -SJM 17 August 2003 +SJM 1 September 2003 1.51 +24 -32 avalon-sandbox/merlin/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/maven.xml,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- maven.xml 31 Aug 2003 14:37:48 -0000 1.50 +++ maven.xml 5 Sep 2003 10:00:32 -0000 1.51 @@ -1,4 +1,4 @@ - + @@ -18,7 +18,7 @@ - + @@ -31,8 +31,7 @@ - + - + - - - - - - + - + + + + + + + + + + + - + - + @@ -100,9 +94,7 @@ toDir="${merlin.build.inst.dir}/ext"/> - + @@ -288,7 +280,7 @@ - + 1.3 +13 -0 avalon-sandbox/merlin/platform.xml Index: platform.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/platform.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- platform.xml 1 Sep 2003 02:18:13 -0000 1.2 +++ platform.xml 5 Sep 2003 10:00:32 -0000 1.3 @@ -10,6 +10,19 @@ + + + + mx4j + mx4j-jmx + 1.1.1 + + + mx4j + mx4j-tools + 1.1.1 + + 1.2 +8 -5 avalon-sandbox/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java Index: DefaultContainmentModel.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DefaultContainmentModel.java 31 Aug 2003 14:30:23 -0000 1.1 +++ DefaultContainmentModel.java 5 Sep 2003 10:00:32 -0000 1.2 @@ -269,15 +269,13 @@ public Model addModel( URL url ) throws ModelException { ContainmentModel model = createContainmentModel( null, url ); - m_models.put( model.getName(), model ); - return model; + return addModel( model.getName(), model ); } public Model addModel( Profile profile ) throws ModelException { Model model = null; final String name = profile.getName(); - if( profile instanceof ContainmentProfile ) { ContainmentProfile containment = (ContainmentProfile) profile; @@ -312,7 +310,11 @@ profile.getClass().getName() ); throw new ModelException( error ); } + return addModel( name, model ); + } + private Model addModel( String name, Model model ) throws ModelException + { m_models.put( name, model ); return model; } @@ -327,9 +329,10 @@ private DeploymentModel createDeploymentModel( final DeploymentProfile profile ) throws ModelException { + final String name = profile.getName(); final String partition = getPartition(); - final Logger logger = getLogger().getChildLogger( profile.getName() ); + final Logger logger = getLogger().getChildLogger( name ); if( getLogger().isDebugEnabled() ) { 1.3 +3 -3 avalon-sandbox/merlin/merlin-extensions/merlin-jmx/conf/block.xml Index: block.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-extensions/merlin-jmx/conf/block.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- block.xml 16 Aug 2003 11:19:48 -0000 1.2 +++ block.xml 5 Sep 2003 10:00:32 -0000 1.3 @@ -8,11 +8,11 @@ - - + + - + 1.4 +1 -1 avalon-sandbox/merlin/merlin-platform/tutorials/composition/application/impl/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/application/impl/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 25 Aug 2003 23:39:58 -0000 1.3 +++ project.xml 5 Sep 2003 10:00:32 -0000 1.4 @@ -5,7 +5,7 @@ ${basedir}/../../../project.xml application-impl - Composition Application + Composition Application Tutorial 1.0 1.4 +1 -1 avalon-sandbox/merlin/merlin-platform/tutorials/composition/location/api/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/location/api/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 25 Aug 2003 23:39:58 -0000 1.3 +++ project.xml 5 Sep 2003 10:00:32 -0000 1.4 @@ -5,7 +5,7 @@ ${basedir}/../../../project.xml locator-api - Composition Locator API + Composition Locator API Tutorial 1.0 1.4 +1 -1 avalon-sandbox/merlin/merlin-platform/tutorials/composition/location/impl/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/location/impl/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 25 Aug 2003 23:39:58 -0000 1.3 +++ project.xml 5 Sep 2003 10:00:32 -0000 1.4 @@ -5,7 +5,7 @@ ${basedir}/../../../project.xml locator-impl - Composition Locator Impl + Composition Locator Impl Tutorial 1.0 1.4 +1 -1 avalon-sandbox/merlin/merlin-platform/tutorials/composition/publisher/api/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/publisher/api/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 25 Aug 2003 23:39:58 -0000 1.3 +++ project.xml 5 Sep 2003 10:00:32 -0000 1.4 @@ -5,7 +5,7 @@ ${basedir}/../../../project.xml publisher-api - Composition Publisher API + Composition Publisher API Tutorial 1.0 1.4 +1 -1 avalon-sandbox/merlin/merlin-platform/tutorials/composition/publisher/impl/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/publisher/impl/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- project.xml 25 Aug 2003 23:39:58 -0000 1.3 +++ project.xml 5 Sep 2003 10:00:33 -0000 1.4 @@ -5,7 +5,7 @@ ${basedir}/../../../project.xml publisher-impl - Composition Publisher Impl + Composition Publisher Impl Tutorial 1.0 1.16 +38 -3 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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- MerlinBean.java 25 Aug 2003 16:38:42 -0000 1.15 +++ MerlinBean.java 5 Sep 2003 10:00:33 -0000 1.16 @@ -229,6 +229,15 @@ } /** + * Get the repository directory fiile. + * @return the repository directory + */ + private File getRepositoryDirectory() + { + return m_repository; + } + + /** * Get the configuration source as a URL * @return the config url */ @@ -312,14 +321,15 @@ */ public void doExecute() throws Exception { + DefaultKernelContext context = null; try { File repo = new File( m_repository, "repository" ); Repository repository = new DefaultFileRepository( repo ); - DefaultKernelContext context = + context = new DefaultKernelContext( repository, - m_repository, + getRepositoryDirectory(), getAnchorDirectory(), getHomeDirectory(), getKernelURL(), @@ -329,14 +339,39 @@ getInfoFlag(), getDebugFlag() ); + } + catch( Throwable e ) + { + final String error = + "Could not establish the kernel context."; + String message = ExceptionHelper.packException( error, e ); + System.err.println( message ); + throw new KernelException( message, e ); + } - Kernel kernel = new DefaultKernel( context ); + Kernel kernel = null; + try + { + kernel = new DefaultKernel( context ); setShutdownHook( kernel ); } catch( Throwable e ) { final String error = "Could not establish the kernel."; + String message = ExceptionHelper.packException( error, e ); + System.err.println( message ); + throw new KernelException( message, e ); + } + + try + { + kernel.startup(); + } + catch( Throwable e ) + { + final String error = + "Kernel startup failure."; String message = ExceptionHelper.packException( error, e ); System.err.println( message ); throw new KernelException( message, e ); --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org