mcconnell    2003/08/25 09:41:05

  Modified:    merlin   maven.xml
               merlin/composition/src/java/org/apache/avalon/composition/data/builder
                        XMLContainmentProfileCreator.java
               merlin/composition/src/java/org/apache/avalon/composition/model/impl
                        DefaultContainmentModel.java
               merlin/composition/src/test/conf block.xml includes.xml
               merlin/composition-spi/src/java/org/apache/avalon/composition/data
                        BlockCompositionDirective.java Targets.java
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernel.java DefaultKernelContext.java
               merlin/merlin-platform/src/bin merlin.bat merlinx.bat
               merlin/merlin-platform/src/bin/nt wrapper.conf
               merlin/merlin-platform/src/repository/james/xmls block.xml
                        config.xml
               merlin/merlin-platform/tutorials maven.xml project.xml
               merlin/merlin-platform/tutorials/composition/application/impl
                        maven.xml
               merlin/merlin-platform/tutorials/meta project.xml
  Removed:     merlin/merlin-platform/src/config config.xml wrapper.conf
  Log:
  Updates to the kernel to correct assignment of repositories.
  
  Revision  Changes    Path
  1.46      +18 -0     avalon-sandbox/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/maven.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- maven.xml 24 Aug 2003 18:14:30 -0000      1.45
  +++ maven.xml 25 Aug 2003 16:41:04 -0000      1.46
  @@ -18,6 +18,24 @@
       <attainGoal name="merlin-package"/>
     </goal>
   
  +  <goal name="merlin:demo" 
  +    description="Execute the demo targets." >
  +
  +    <!--
  +    Install the sub-project jars (meta, assembly, merlin, etc.)
  +    into the user's local repository and put a copy in the 
  +    build target install directory.
  +    -->
  +
  +    <maven:reactor
  +      basedir="${basedir}"
  +      includes="merlin-platform/tutorials/**/project.xml"
  +      excludes="**/target/**"
  +      goals="demo"
  +      banner="Demo:"
  +      ignoreFailures="false" />
  +  </goal>
  +
     <goal name="merlin-dist" 
       description="Build the Merlin distribution." >
   
  
  
  
  1.10      +24 -2     
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java
  
  Index: XMLContainmentProfileCreator.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XMLContainmentProfileCreator.java 16 Aug 2003 11:19:48 -0000      1.9
  +++ XMLContainmentProfileCreator.java 25 Aug 2003 16:41:04 -0000      1.10
  @@ -83,6 +83,8 @@
   import org.apache.avalon.composition.data.ServiceDirective;
   import org.apache.avalon.composition.data.MetaDataException;
   import org.apache.avalon.composition.data.MetaDataRuntimeException;
  +import org.apache.avalon.composition.data.Targets;
  +import org.apache.avalon.composition.data.TargetDirective;
   import org.apache.avalon.meta.info.builder.XMLTypeCreator;
   import org.apache.excalibur.configuration.ConfigurationUtil;
   
  @@ -101,6 +103,9 @@
       private static final XMLDeploymentProfileCreator DEPLOYMENT_CREATOR = 
         new XMLDeploymentProfileCreator();
   
  +    private static final XMLTargetsCreator TARGETS_CREATOR = 
  +      new XMLTargetsCreator();
  +
       /**
        * Create a [EMAIL PROTECTED] ContainmentProfile} from a configuration
        *
  @@ -459,12 +464,29 @@
           if( config.getAttribute( "id", null ) != null )
           {
               ResourceDirective resource = createResourceDirective( config );
  -            return new BlockCompositionDirective( name, resource );
  +            TargetDirective[] targets = createTargetDirectives( config );
  +            return new BlockCompositionDirective( name, resource, targets );
           }
           else
           {
               final String path = getBlockIncludePath( config );
               return new BlockIncludeDirective( name, path );
  +        }
  +    }
  +
  +    private TargetDirective[] createTargetDirectives( Configuration config )
  +      throws MetaDataException
  +    {
  +        try
  +        {
  +            Targets targets = TARGETS_CREATOR.createTargets( config );
  +            return targets.getTargets();
  +        }
  +        catch( Throwable e )
  +        {
  +            final String error = 
  +              "Unexpected error while attempting to build target directives.";
  +            throw new MetaDataException( error, e );
           }
       }
   
  
  
  
  1.29      +55 -17    
avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- DefaultContainmentModel.java      23 Aug 2003 17:16:36 -0000      1.28
  +++ DefaultContainmentModel.java      25 Aug 2003 16:41:04 -0000      1.29
  @@ -68,6 +68,7 @@
   import org.apache.avalon.composition.data.Profile;
   import org.apache.avalon.composition.data.ResourceDirective;
   import org.apache.avalon.composition.data.ServiceDirective;
  +import org.apache.avalon.composition.data.TargetDirective;
   import org.apache.avalon.composition.data.builder.ContainmentProfileBuilder;
   import org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator;
   import org.apache.avalon.composition.model.ClassLoaderContext;
  @@ -441,11 +442,12 @@
           final String version = resource.getVersion();
           final String type = resource.getType();
           
  +        ContainmentModel model = null;
           try
           {
               Repository repository = m_context.getSystemContext().getRepository();
               final URL url = repository.getArtifact( id, version, type );
  -            return createContainmentModel( name, url );
  +            model = createContainmentModel( name, url );
           }
           catch( RepositoryException e )
           {
  @@ -456,6 +458,51 @@
                 + "] because of a repository related error.";
               throw new ModelException( error, e );
           }
  +
  +        TargetDirective[] targets = directive.getTargetDirectives();
  +        for( int i=0; i<targets.length; i++ )
  +        {
  +            TargetDirective target = targets[i];
  +            Model child = model.getModel( target.getPath() );
  +            if( child != null )
  +            {
  +                if( target.getConfiguration() != null )
  +                {
  +                    if( child instanceof DeploymentModel )
  +                    {
  +                        ((DeploymentModel)child).setConfiguration( 
target.getConfiguration() );
  +                    }
  +                    else
  +                    {
  +                        final String warn = 
  +                          "Ignoring target configuration as the path [" 
  +                          + target.getPath() 
  +                          + "] does not refer to a deployment model";
  +                    }
  +                }
  +                if( target.getCategoriesDirective() != null )
  +                {
  +                    if( child instanceof DeploymentModel )
  +                    {
  +                        ((DeploymentModel)child).setCategories( 
target.getCategoriesDirective() );
  +                    }
  +                    else
  +                    {
  +                        final String warn = 
  +                          "Ignoring target categories as the path [" 
  +                          + target.getPath() 
  +                          + "] does not refer to a deployment model";
  +                    }
  +                }
  +            }
  +            else
  +            {
  +                final String warning = 
  +                  "Unrecognized target path: " + target.getPath();
  +                getLogger().warn( warning );
  +            }
  +        }
  +        return model;
       }
   
      /**
  @@ -632,8 +679,11 @@
       }
   
      /**
  -    * Return a immediate child model relative to a supplied name.
  +    * Return a child model relative to a supplied name.
  +    *
  +    * @param path a relative or absolute path
       * @return the named model or null if the name is unknown
  +    * @exception IllegalArgumentException if the name if badly formed
       */
       public Model getModel( String path )
       {
  @@ -656,9 +706,7 @@
                   Model model = getModel( key );
                   if( model == null )
                   {
  -                    final String error = 
  -                      "Unknown child: " + key + " in " + getQualifiedName();
  -                    throw new IllegalArgumentException( error );
  +                    return null;
                   }
                   else if( model instanceof ContainmentModel )
                   {
  @@ -680,17 +728,7 @@
               }
               else
               {
  -                Model model = (Model) m_models.get( path );
  -                if( model == null )
  -                {
  -                    final String error =  
  -                      "Unknown entry: '" + path + "'.";
  -                    throw new IllegalArgumentException( error );
  -                }
  -                else
  -                {
  -                    return model;
  -                }
  +                return (Model) m_models.get( path );
               }
           }
       }
  
  
  
  1.9       +1 -1      avalon-sandbox/merlin/composition/src/test/conf/block.xml
  
  Index: block.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/test/conf/block.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- block.xml 24 Jul 2003 13:14:55 -0000      1.8
  +++ block.xml 25 Aug 2003 16:41:04 -0000      1.9
  @@ -1,6 +1,6 @@
   
   
  -<container>
  +<container name="test-block">
   
      <services>
        <service type="org.apache.avalon.composition.model.testa.A">
  
  
  
  1.2       +7 -2      avalon-sandbox/merlin/composition/src/test/conf/includes.xml
  
  Index: includes.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/test/conf/includes.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- includes.xml      31 Jul 2003 22:54:16 -0000      1.1
  +++ includes.xml      25 Aug 2003 16:41:04 -0000      1.2
  @@ -1,5 +1,10 @@
   
  -
   <container>
  -   <include name="test" id="test:includes"/>
  +
  +  <include name="test" id="test:includes">
  +    <target path="primary/block/test">
  +      <categories priority="DEBUG"/>
  +    </target>
  +  </include>
  +
   </container>
  
  
  
  1.4       +28 -1     
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockCompositionDirective.java
  
  Index: BlockCompositionDirective.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockCompositionDirective.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BlockCompositionDirective.java    23 Aug 2003 02:23:30 -0000      1.3
  +++ BlockCompositionDirective.java    25 Aug 2003 16:41:04 -0000      1.4
  @@ -66,6 +66,11 @@
       private final ResourceDirective m_resource;
   
       /**
  +     * Nested targets.
  +     */
  +    private final TargetDirective[] m_targets;
  +
  +    /**
        * Creation of a new resource directive.
        * @param name the name to assign to the container 
        *   established by the composition directive
  @@ -75,12 +80,26 @@
       public BlockCompositionDirective( 
         final String name, ResourceDirective resource )
       {
  +        this( name, resource, new TargetDirective[0] );
  +    }
  +
  +    /**
  +     * Creation of a new resource directive.
  +     * @param name the name to assign to the container 
  +     *   established by the composition directive
  +     * @param resource a resource reference from which a block 
  +     *   description can be resolved
  +     */
  +    public BlockCompositionDirective( 
  +      final String name, ResourceDirective resource, TargetDirective[] targets )
  +    {
           super( name, true, Mode.EXPLICIT );
           if( resource == null )
           {
               throw new NullPointerException( "resource" );
           }
           m_resource = resource;
  +        m_targets = targets;
       }
   
       /**
  @@ -92,4 +111,12 @@
           return m_resource;
       }
   
  +    /**
  +     * Return the relative targets.
  +     * @return the targets
  +     */
  +    public TargetDirective[] getTargetDirectives()
  +    {
  +        return m_targets;
  +    }
   }
  
  
  
  1.3       +9 -1      
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/Targets.java
  
  Index: Targets.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/Targets.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Targets.java      23 Aug 2003 02:23:30 -0000      1.2
  +++ Targets.java      25 Aug 2003 16:41:04 -0000      1.3
  @@ -81,6 +81,14 @@
       //========================================================================
   
       /**
  +     * Create an empty Targets instance.
  +     */
  +    public Targets()
  +    {
  +        m_targets = new TargetDirective[0];
  +    }
  +
  +    /**
        * Create a new Targets instance.
        *
        * @param targets the set of targets
  
  
  
  1.9       +18 -8     
avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultKernel.java        23 Aug 2003 17:18:26 -0000      1.8
  +++ DefaultKernel.java        25 Aug 2003 16:41:04 -0000      1.9
  @@ -203,22 +203,32 @@
               TargetDirective target = targets[i];
               final String path = target.getPath();
               Model model = m_model.getModel( path );
  -            if( model instanceof DeploymentModel )
  +            if( model != null )
               {
  -                DeploymentModel deployment = (DeploymentModel) model;
  -                if( target.getConfiguration() != null )
  +                if( model instanceof DeploymentModel )
                   {
  -                    deployment.setConfiguration( target.getConfiguration() );
  +                    DeploymentModel deployment = (DeploymentModel) model;
  +                    if( target.getConfiguration() != null )
  +                    {
  +                        deployment.setConfiguration( target.getConfiguration() );
  +                    }
  +                    if( target.getCategoriesDirective() != null )
  +                    {
  +                        deployment.setCategories( target.getCategoriesDirective() );
  +                    }
                   }
  -                if( target.getCategoriesDirective() != null )
  +                else
                   {
  -                    deployment.setCategories( target.getCategoriesDirective() );
  +                    final String warning = 
  +                      "Cannot apply target: " + path + " to a containment model.";
  +                    getLogger().warn( warning );
                   }
               }
               else
               {
                   final String warning = 
  -                  "Cannot apply target: " + path + " to a containment model.";
  +                  "Ignoring target directive as the path does not refer to a known 
component: " 
  +                  + path;
                   getLogger().warn( warning );
               }
           }
  
  
  
  1.21      +16 -10    
avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java
  
  Index: DefaultKernelContext.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DefaultKernelContext.java 24 Aug 2003 18:14:30 -0000      1.20
  +++ DefaultKernelContext.java 25 Aug 2003 16:41:04 -0000      1.21
  @@ -113,7 +113,8 @@
   
       private static final String CATEGORY_NAME = "context";
   
  -    private static final String USER_DIR = System.getProperty( "user.dir" 
).replace( '\\', '/' );
  +    private static final String USER_DIR = 
  +      System.getProperty( "user.dir" ).replace( '\\', '/' );
   
       //==============================================================
       // immutable state
  @@ -332,10 +333,10 @@
           {
               if( m_kernel.getChild( "repository", false ) != null )
               {
  -                File merlinHome = getSystemDefaultDirectory();
  +                File repo = getSystemDefaultDirectory();
                   Configuration repositoryConfig = m_kernel.getChild( "repository" );
                   getLogger().debug( "using kernel defined repository" );
  -                m_repository = createRepository( merlinHome, repositoryConfig );
  +                m_repository = createRepository( repo, repositoryConfig );
               }
               else
               {
  @@ -617,7 +618,7 @@
           buffer.append( "  ${user.dir}: " + System.getProperty( "user.dir" ) );
           if( m_system == null )
           {
  -            buffer.append( "\n  ${merlin.home}: " + getSystemDefaultDirectory() );
  +            buffer.append( "\n  ${merlin.home}: " + getMerlinHomeDirectory() );
           }
           else
           {
  @@ -636,11 +637,7 @@
           }
           else
           {
  -            String fallback = 
  -              System.getProperty( "merlin.repository.local", 
  -                System.getProperty( "merlin.home", 
  -                 System.getProperty( "user.dir" ) ) ); 
  -            buffer.append( fallback );
  +            buffer.append( getSystemDefaultDirectory() );
           }
           buffer.append( "\n  Library Anchor: " + StringHelper.toString( 
getLibraryPath() ) );
           buffer.append( "\n  Kernel Path: " + StringHelper.toString( m_kernelURL ) );
  @@ -846,6 +843,15 @@
       }
   
       private static File getSystemDefaultDirectory()
  +    {
  +        final String local = 
  +          System.getProperty( 
  +            "merlin.repository.local", 
  +            getMerlinHomeDirectory().toString() );
  +        return new File( local );
  +    }
  +
  +    private static File getMerlinHomeDirectory()
       {
           final String local = 
               System.getProperty( "merlin.home", 
  
  
  
  1.7       +12 -4     avalon-sandbox/merlin/merlin-platform/src/bin/merlin.bat
  
  Index: merlin.bat
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/src/bin/merlin.bat,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- merlin.bat        20 Aug 2003 08:45:22 -0000      1.6
  +++ merlin.bat        25 Aug 2003 16:41:04 -0000      1.7
  @@ -1,7 +1,7 @@
   @echo off
   if "%MERLIN_HOME%" == "" goto MissingHomeDefinition
  -java -Dmerlin.home=%MERLIN_HOME% -Djava.ext.dirs=%MERLIN_HOME%\ext -jar 
%MERLIN_HOME%\bin\merlin-bootstrap-1.0.jar %1 %2 %3 %4 %5 %6
  -goto :end
  +goto MerlinRuntime
  +
   :MissingHomeDefinition
   echo.
   echo ERROR: MERLIN_HOME is not defined.
  @@ -9,7 +9,15 @@
   echo Please set the MERLIN_HOME variable in your environment to match the
   echo location of the Merlin installation
   echo.
  -goto end
  -:end
  +goto EndOfScript
  +
  +:MerlinRuntime
  +set MERLIN_CMD_LINE_ARGS=%*
  +set MERLIN_BOOTSTRAP_JAR=%MERLIN_HOME%\bin\lib\merlin-bootstrap-1.0.jar
  +set MERLIN_EXT_DIR=%MERLIN_HOME%\ext
  +java -Dmerlin.home=%MERLIN_HOME% -Djava.ext.dirs=%MERLIN_EXT_DIR% -jar 
%MERLIN_BOOTSTRAP_JAR% %MERLIN_CMD_LINE_ARGS%
  +goto EndOfScript
  +
  +:EndOfScript
   
   
  
  
  
  1.4       +11 -4     avalon-sandbox/merlin/merlin-platform/src/bin/merlinx.bat
  
  Index: merlinx.bat
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/src/bin/merlinx.bat,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- merlinx.bat       24 Aug 2003 18:14:30 -0000      1.3
  +++ merlinx.bat       25 Aug 2003 16:41:04 -0000      1.4
  @@ -1,8 +1,7 @@
   @echo off
   
   if "%MERLIN_HOME%" == "" goto MissingHomeDefinition
  -java -Dmerlin.home=%MERLIN_HOME% -Dmerlin.repository.local=%MAVEN_HOME% 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl 
-Djava.ext.dirs=%MERLIN_HOME%\ext -jar %MERLIN_HOME%\bin\lib\merlin-bootstrap-1.0.jar 
%1 %2 %3 %4 %5 %6
  -goto :end
  +goto :MerlinRuntime
   
   :MissingHomeDefinition
   echo.
  @@ -11,8 +10,16 @@
   echo Please set the MERLIN_HOME variable in your environment to match the
   echo location of the Merlin installation
   echo.
  -goto end
  +goto EndOfScript
   
  -:end
  +:MerlinRuntime
  +
  +set MERLIN_CMD_LINE_ARGS=%*
  +set MERLIN_BOOTSTRAP_JAR=%MERLIN_HOME%\bin\lib\merlin-bootstrap-1.0.jar
  +set MERLIN_EXT_DIR=%MERLIN_HOME%\ext
  +java -Dmerlin.home=%MERLIN_HOME% -Dmerlin.repository.local=%MAVEN_HOME% 
-Djava.ext.dirs=%MERLIN_EXT_DIR% -jar %MERLIN_BOOTSTRAP_JAR% %MERLIN_CMD_LINE_ARGS%
  +goto :EndOfScript
  +
  +:EndOfScript
   
   
  
  
  
  1.2       +14 -5     avalon-sandbox/merlin/merlin-platform/src/bin/nt/wrapper.conf
  
  Index: wrapper.conf
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/src/bin/nt/wrapper.conf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wrapper.conf      24 Aug 2003 18:14:30 -0000      1.1
  +++ wrapper.conf      25 Aug 2003 16:41:04 -0000      1.2
  @@ -24,17 +24,26 @@
   # Maximum Java Heap Size (in MB)
   wrapper.java.maxmemory=64
   
  +#
  +# The following environment variables should be declared before 
  +# using the service:
  +#
  +# MERLIN_DAEMON_KERNEL -- the kernel.xml file to use
  +# MERLIN_DAEMON_HOME   -- the home directory
  +# MERLIN_DAEMON_CONFIG -- the cofiguration file
  +# MERLIN_DAEMON_PATH   -- file name of a block or blocks (may include wildcards)
  +#
  +
   # Application parameters.  Add parameters as needed starting from 1
   wrapper.app.parameter.1=Merlin
   wrapper.app.parameter.2=-info
   wrapper.app.parameter.3=-kernel
  -wrapper.app.parameter.4=%MERLIN_HOME%/config/nt/kernel.xml
  +wrapper.app.parameter.4=%MERLIN_DAEMON_KERNEL%
   wrapper.app.parameter.5=-home
  -wrapper.app.parameter.6=%MERLIN_HOME%
  +wrapper.app.parameter.6=%MERLIN_DAEMON_HOME%
   wrapper.app.parameter.7=-config
  -wrapper.app.parameter.8=%MERLIN_HOME%/config/nt/config.xml
  -wrapper.app.parameter.9=%MERLIN_HOME%/config/nt/blocks/*.xml
  -
  +wrapper.app.parameter.8=%MERLIN_DAEMON_CONFIG%
  +wrapper.app.parameter.9=%MERLIN_DAEMON_PATH%
   
   # Port which the native wrapper code will attempt to connect to
   wrapper.port=1777
  
  
  
  1.4       +43 -6     
avalon-sandbox/merlin/merlin-platform/src/repository/james/xmls/block.xml
  
  Index: block.xml
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/merlin-platform/src/repository/james/xmls/block.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- block.xml 24 Aug 2003 15:10:25 -0000      1.3
  +++ block.xml 25 Aug 2003 16:41:05 -0000      1.4
  @@ -22,7 +22,7 @@
   
              <!-- general facilities -->
              <resource id="commons-collections:commons-collections" version="2.1"/>
  -           <resource id="commons-pool:commons-pool" version="1.0"/>
  +           <resource id="commons-pool:commons-pool" version="1.0.1"/>
              <resource id="commons-dbcp:commons-dbcp" version="1.0"/>
   
              <!-- apis for cornerstone service imports -->
  @@ -41,12 +41,14 @@
              <resource id="excalibur-thread:excalibur-thread" version="1.1.1"/>
              <resource id="excalibur-pool:excalibur-pool" version="1.2"/>
              <resource id="dnsjava:dnsjava" version="1.3.2"/>
  +
  +           <!-- james special imports -->
              <resource id="james:activation"/>
  -           <resource id="james:mail_1_3"/>
  +           <resource id="james:mail-1.3.1"/>
   
              <!-- james core -->
  -           <resource id="james:mailet-api" version="1.0"/>
  -           <resource id="james:mailet" version="1.0"/>
  +           <resource id="james:mailet-api" version="3.0"/>
  +           <resource id="james:mailet" version="3.0"/>
              <resource id="james:james" version="3.0a1"/>
   
           </repository>
  @@ -70,8 +72,42 @@
          version="1.0"/>
   
      <include name="store" 
  -       id="cornerstone-store:cornerstone-store-impl" 
  -       version="1.0"/>
  +       id="cornerstone-store:cornerstone-store-impl" version="1.0">
  +     <target path="manager">
  +       <configuration>
  +         <repositories>
  +           <repository
  +  
class="org.apache.james.mailrepository.filepair.File_Persistent_Object_Repository"> 
  +             <protocols>
  +               <protocol>file</protocol>
  +             </protocols>
  +             <types>
  +               <type>OBJECT</type>
  +             </types>
  +             <models>
  +               <model>SYNCHRONOUS</model>
  +               <model>ASYNCHRONOUS</model>
  +               <model>CACHE</model>
  +             </models>
  +           </repository>
  +           <repository 
  +  
class="org.apache.james.mailrepository.filepair.File_Persistent_Stream_Repository">
  +             <protocols>
  +               <protocol>file</protocol>
  +             </protocols>
  +             <types>
  +               <type>STREAM</type>
  +             </types>
  +             <models>
  +               <model>SYNCHRONOUS</model>
  +               <model>ASYNCHRONOUS</model>
  +               <model>CACHE</model>
  +             </models>
  +           </repository>
  +         </repositories>
  +       </configuration>
  +     </target>
  +   </include>
   
      <component name="connections" 
              class="org.apache.james.util.connection.SimpleConnectionManager" 
  @@ -90,6 +126,7 @@
      <component name="dns" class="org.apache.james.dnsserver.DNSServer" 
              activation="true">
          <configuration>
  +         <!-- use a target to add servers to this configuration -->
            <autodiscover>true</autodiscover>
            <authoritative>false</authoritative>
          </configuration>
  
  
  
  1.4       +2 -0      
avalon-sandbox/merlin/merlin-platform/src/repository/james/xmls/config.xml
  
  Index: config.xml
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/merlin-platform/src/repository/james/xmls/config.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- config.xml        24 Aug 2003 15:10:25 -0000      1.3
  +++ config.xml        25 Aug 2003 16:41:05 -0000      1.4
  @@ -44,6 +44,7 @@
       </configuration>
     </target>
   
  +  <!--
     <target path="/james/store/manager">
       <configuration>
         <repositories>
  @@ -78,6 +79,7 @@
         </repositories>
       </configuration>
     </target>
  +  -->
   
   </targets>
   
  
  
  
  1.3       +5 -2      avalon-sandbox/merlin/merlin-platform/tutorials/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/maven.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- maven.xml 20 Aug 2003 16:59:17 -0000      1.2
  +++ maven.xml 25 Aug 2003 16:41:05 -0000      1.3
  @@ -5,8 +5,11 @@
     </preGoal>
   
     <goal name="demo">
  -    <attainGoal name="test:test"/>
  -    <attainGoal name="merlin:simulate"/>
  +    <j:set var="demo.target" 
value="${maven.build.dir}/classes/BLOCK-INF/block.xml"/>
  +    <util:file var="target" name="${demo.target}"/>
  +    <j:if test="${target.exists()}">
  +      <attainGoal name="merlin:simulate"/>
  +    </j:if>
     </goal>
   
   </project>
  
  
  
  1.4       +1 -1      avalon-sandbox/merlin/merlin-platform/tutorials/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml       20 Aug 2003 16:59:17 -0000      1.3
  +++ project.xml       25 Aug 2003 16:41:05 -0000      1.4
  @@ -2,7 +2,7 @@
   
   <project>
   
  -  <groupId>merlin-tutorials</groupId>
  +  <groupId>merlin-tutorial</groupId>
     <id>merlin-tutorials-home</id>
     <name>Merlin Tutorials</name>
     <package>tutorial</package>
  
  
  
  1.2       +3 -5      
avalon-sandbox/merlin/merlin-platform/tutorials/composition/application/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/composition/application/impl/maven.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maven.xml 20 Aug 2003 17:35:49 -0000      1.1
  +++ maven.xml 25 Aug 2003 16:41:05 -0000      1.2
  @@ -4,20 +4,18 @@
       <attainGoal name="avalon:meta"/>
     </preGoal>
   
  -  <goal name="demo">
  +  <preGoal name="merlin:simulate">
       <attainGoal name="build"/>
  -    <attainGoal name="merlin:simulate"/>
  -  </goal>
  +  </preGoal>
   
     <goal name="build">
       <maven:reactor
         basedir="${basedir}/../.."
  -      includes="**/project.xml"
  +      includes="${basedir}/**/project.xml"
         excludes="${basedir}/composition/application/impl/project.xml"
         goals="jar:install"
         banner="Installing:"
         ignoreFailures="false" />
     </goal>
  -
   
   </project>
  
  
  
  1.5       +2 -48     avalon-sandbox/merlin/merlin-platform/tutorials/meta/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/meta/project.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- project.xml       11 Aug 2003 22:58:51 -0000      1.4
  +++ project.xml       25 Aug 2003 16:41:05 -0000      1.5
  @@ -2,7 +2,8 @@
   
   <project>
   
  -  <groupId>test</groupId>
  +  <extend>${basedir}/../project.xml</extend>
  +
     <id>plugin-test</id>
     <name>Merlin Plugin Test</name>
     <package>org.apache.avalon.playground</package>
  @@ -11,25 +12,12 @@
     <inceptionYear>2003</inceptionYear>
     <shortDescription>Test for the Merlin Plugin.</shortDescription>
   
  -  <developers>
  -    <developer>
  -      <name>Stephen McConnell</name>
  -      <id>mcconnell</id>
  -      <email>[EMAIL PROTECTED]</email>
  -      <organization>OSM</organization>
  -      <roles>
  -        <role>Architecture and development.</role>
  -      </roles>
  -    </developer>
  -  </developers>
  -
     <dependencies>
       <dependency>
         <groupId>avalon-framework</groupId>
         <artifactId>avalon-framework-api</artifactId>
         <version>4.1.5-dev</version>
       </dependency>
  -
       <dependency>
         <groupId>avalon-framework</groupId>
         <artifactId>avalon-framework-impl</artifactId>
  @@ -37,38 +25,4 @@
       </dependency>
     </dependencies>
     
  -  <build>
  -
  -    <sourceDirectory>${basedir}/src/java</sourceDirectory>
  -    <unitTestSourceDirectory></unitTestSourceDirectory>
  -    <unitTest></unitTest>
  -    <testResources></testResources>
  -    <integrationUnitTestPatterns></integrationUnitTestPatterns>
  -
  -    <resources>
  -      <resource>
  -        <directory>${basedir}/src/java</directory> 
  -        <includes>
  -          <include>**/*.properties</include>
  -        </includes>
  -      </resource>
  -      <resource>
  -        <directory>${maven.build.src}</directory> 
  -        <includes>
  -          <include>**/*.x*</include>
  -        </includes>
  -      </resource>
  -      <resource>
  -        <directory>${basedir}/conf</directory>
  -        <targetPath>BLOCK-INF</targetPath>
  -        <includes>
  -          <include>block.xml</include>
  -        </includes>
  -      </resource>
  -    </resources>
  -
  -    <jars></jars>
  -
  -  </build>
  -
   </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to