avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/kernel/plugin/src/java/org/apache/avalon/merlin/tools MerlinBean.java
Date Mon, 08 Dec 2003 09:16:48 GMT
mcconnell    2003/12/08 01:16:48

  Modified:    kernel   maven.xml
               kernel/impl project.xml
               kernel/impl/src/java/org/apache/avalon/merlin/impl
                        DefaultCriteria.java DefaultFactory.java
  Added:       kernel/plugin .cvsignore maven.xml plugin.jelly
                        plugin.properties project.xml
               kernel/plugin/src/java/org/apache/avalon/merlin/tools
                        MerlinBean.java
  Log:
  Add updated plugin.
  
  Revision  Changes    Path
  1.9       +12 -2     avalon-sandbox/kernel/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/kernel/maven.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- maven.xml	6 Dec 2003 06:37:43 -0000	1.8
  +++ maven.xml	8 Dec 2003 09:16:48 -0000	1.9
  @@ -8,7 +8,7 @@
     <goal name="avalon:build" description="Build all projects.">
       <maven:reactor basedir="${basedir}"
         includes="**/project.xml"
  -      excludes="**/target/**,unit/**,cli/**,project.xml"
  +      excludes="**/target/**,unit/**,cli/**,project.xml,plugin/**"
         goals=""
         banner="Building:"
         ignoreFailures="false" />
  @@ -17,13 +17,23 @@
         goals=""
         banner="Building:"
         ignoreFailures="false" />
  +    <attainGoal name="merlin:plugin"/>
  +  </goal>
  +
  +  <goal name="merlin:plugin">
  +    <maven:reactor
  +      basedir="${basedir}"
  +      includes="plugin/project.xml"
  +      goals="plugin:install"
  +      banner="Installing plugin:"
  +      ignoreFailures="false"/>
     </goal>
   
     <goal name="avalon:clean" prereqs="clean">
       <maven:reactor
         basedir="${basedir}"
         includes="**/project.xml"
  -      excludes="project.xml"
  +      excludes="project.xml,**/target/**"
         goals="clean:clean"
         banner="Cleaning:"
         ignoreFailures="true"/>
  
  
  
  1.16      +14 -29    avalon-sandbox/kernel/impl/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/kernel/impl/project.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- project.xml	6 Dec 2003 23:58:59 -0000	1.15
  +++ project.xml	8 Dec 2003 09:16:48 -0000	1.16
  @@ -19,19 +19,6 @@
   
     <dependencies>
   
  -    <!-- mx4j dependecies -->
  -
  -    <dependency>
  -      <groupId>mx4j</groupId>
  -      <artifactId>mx4j-jmx</artifactId>
  -      <version>1.1.1</version>
  -    </dependency>
  -    <dependency>
  -      <groupId>mx4j</groupId>
  -      <artifactId>mx4j-tools</artifactId>
  -      <version>1.1.1</version>
  -    </dependency>
  -    
       <!-- merlin dependecies -->
   
       <dependency>
  @@ -186,12 +173,6 @@
       <!-- excalibur dependecies -->
   
       <dependency>
  -      <groupId>excalibur</groupId>
  -      <artifactId>excalibur-util-concurrent</artifactId>
  -      <version>1.3.1</version>
  -    </dependency>
  -
  -    <dependency>
         <groupId>excalibur-lifecycle</groupId>
         <artifactId>excalibur-lifecycle-api</artifactId>
         <version>1.0</version>
  @@ -211,22 +192,26 @@
         <id>excalibur-event</id>
         <version>1.0.3</version>
       </dependency>
  -
  -    <!--
       <dependency>
  -      <id>excalibur-pool</id>
  -      <version>1.2</version>
  +      <groupId>excalibur</groupId>
  +      <artifactId>excalibur-util-concurrent</artifactId>
  +      <version>1.3.1</version>
       </dependency>
  -    -->
   
  -    <!-- commons dependencies -->
  +    <!-- mx4j dependecies -->
   
  -    <!--
       <dependency>
  -      <id>commons-cli</id>
  -      <version>1.0</version>
  +      <groupId>mx4j</groupId>
  +      <artifactId>mx4j-jmx</artifactId>
  +      <version>1.1.1</version>
       </dependency>
  -    -->
  +    <dependency>
  +      <groupId>mx4j</groupId>
  +      <artifactId>mx4j-tools</artifactId>
  +      <version>1.1.1</version>
  +    </dependency>
  +
  +    <!-- commons dependencies -->
   
       <dependency>
         <id>commons-collections</id>
  
  
  
  1.9       +28 -9     avalon-sandbox/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java
  
  Index: DefaultCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultCriteria.java	6 Dec 2003 23:58:59 -0000	1.8
  +++ DefaultCriteria.java	8 Dec 2003 09:16:48 -0000	1.9
  @@ -573,18 +573,37 @@
           }
           catch( Exception e )
           {
  -            try
  +            File target = new File( value );
  +            if( target.exists() )
               {
  -                return new File( base, value ).toURL();
  +                return toURL( target );
               }
  -            catch( Throwable ee )
  +            else
               {
  -                final String error = 
  -                  "Unable to transform the block path [" 
  -                  + value
  -                  + "] to a URL.";
  -                throw new KernelRuntimeException( error, ee );
  +                target = new File( base, value );
  +                if( target.exists() ) return toURL( target );
               }
  +        }
  +
  +        final String error = 
  +          "Unable to resolve the block path [" + value + "].";
  +        throw new KernelRuntimeException( error );
  +    }
  +
  +    private URL toURL( File file )
  +    {
  +        if( null == file ) throw new NullPointerException( "file" );
  +        try
  +        {
  +            return file.toURL();
  +        }
  +        catch( Throwable e )
  +        {
  +            final String error = 
  +              "Unable to transform the file [" 
  +                  + file.toString()
  +                  + "] to a URL.";
  +            throw new KernelRuntimeException( error, e );
           }
       }
   
  
  
  
  1.12      +8 -4      avalon-sandbox/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DefaultFactory.java	7 Dec 2003 03:17:18 -0000	1.11
  +++ DefaultFactory.java	8 Dec 2003 09:16:48 -0000	1.12
  @@ -99,6 +99,8 @@
   
       private InitialContext m_context;
   
  +    private ClassLoader m_classloader;
  +
       private Block m_application;
   
       private Block m_system;
  @@ -111,9 +113,10 @@
       * Creation of a new default factory.
       * @param factory the repository inital factory
       */
  -    public DefaultFactory( InitialContext context )
  +    public DefaultFactory( InitialContext context, ClassLoader classloader )
       {
           m_context = context;
  +        m_classloader = classloader;
       }
   
       //--------------------------------------------------------------------------
  @@ -292,12 +295,13 @@
   
           final Logger systemLogger = getLogger();
   
  -        ClassLoader impl = 
  -          Thread.currentThread().getContextClassLoader();
  +        //ClassLoader impl = 
  +        //  Thread.currentThread().getContextClassLoader();
  +
           ContainmentModel system = 
             new DefaultContainmentModel(
               createContainmentContext( 
  -              systemContext, systemLogger, impl,
  +              systemContext, systemLogger, m_classloader,
                 getContainmentProfile( 
                   kernelConfig.getChild( "system" ) ) ) );
   
  
  
  
  1.3       +0 -0      avalon-sandbox/kernel/plugin/.cvsignore
  
  
  
  
  1.3       +1 -11     avalon-sandbox/kernel/plugin/maven.xml
  
  
  
  
  1.3       +12 -7     avalon-sandbox/kernel/plugin/plugin.jelly
  
  
  
  
  1.3       +57 -25    avalon-sandbox/kernel/plugin/plugin.properties
  
  
  
  
  1.5       +5 -203    avalon-sandbox/kernel/plugin/project.xml
  
  
  
  
  1.4       +119 -312  avalon-sandbox/kernel/plugin/src/java/org/apache/avalon/merlin/tools/MerlinBean.java
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message