ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/script ant ant.bat
Date Tue, 06 Nov 2001 08:10:00 GMT
donaldp     01/11/06 00:10:00

  Modified:    proposal/myrmidon build.xml
               proposal/myrmidon/src/java/org/apache/myrmidon/launcher
                        Main.java
               proposal/myrmidon/src/make sample.ant
               proposal/myrmidon/src/manifest builtin-ant-roles.xml
               proposal/myrmidon/src/script ant ant.bat
  Added:       proposal/myrmidon/src/manifest myrmidon-api.mf
                        myrmidon-container.mf myrmidon-framework.mf
                        myrmidon-launcher.mf
  Removed:     proposal/myrmidon/src/manifest ant-manifest.mf
  Log:
  Separated myrmidon out into several jars.
  
  myrmidon-container.jar (all the container classes)
  myrmidon-api.jar (the API used to write tasks and other types)
  myrmidon-framework.jar (the framework that makes writing tasks easier)
  myrmidon-launcher.jar (executable jar used to setup classloaders and run myrmidon)
  
  The ClassLoader hierarchy is now
  
  System CL  <---  api/framework CL <--- container
                                    <--- type library 1
                                    <--- type library 2
                                    <--- type library 3
                                    <--- type library 1
                                    <--- type library 1
  
  Revision  Changes    Path
  1.22      +39 -7     jakarta-ant/proposal/myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/build.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- build.xml	2001/11/04 21:58:15	1.21
  +++ build.xml	2001/11/06 08:09:59	1.22
  @@ -105,18 +105,24 @@
   
       <mkdir dir="${build.lib}"/>
   
  -    <jar jarfile="${build.lib}/ant.jar" 
  +    <jar jarfile="${build.lib}/myrmidon-launcher.jar" 
            basedir="${build.classes}" 
  -         manifest="${manifest.dir}/ant-manifest.mf">
  +         manifest="${manifest.dir}/myrmidon-launcher.mf">
         <include name="org/apache/myrmidon/launcher/*" />
       </jar>
   
  -    <jar jarfile="${build.lib}/myrmidon.jar" 
  +    <jar jarfile="${build.lib}/myrmidon-api.jar" 
            basedir="${build.classes}" 
  -         manifest="${manifest.dir}/myrmidon-manifest.mf">
  -      <include name="org/apache/**" />
  -      <exclude name="org/apache/myrmidon/launcher/*" />
  -      <exclude name="org/apache/myrmidon/libs/*" />
  +         manifest="${manifest.dir}/myrmidon-api.mf">
  +      <include name="org/apache/myrmidon/api/*" />
  +      <include name="org/apache/myrmidon/aspects/*" />
  +      <include name="org/apache/myrmidon/converter/*" />
  +      <include name="org/apache/myrmidon/interfaces/**" />
  +      <include name="org/apache/myrmidon/listeners/*" />
  +      <include name="org/apache/myrmidon/framework/**" />
  +<!--      <include name="org/apache/myrmidon/*" />
  +      <include name="org/apache/myrmidon/components/**"/>
  +      <include name="org/apache/myrmidon/frontends/*" /> -->
   
         <zipfileset dir="${manifest.dir}" fullpath="META-INF/ant-roles.xml">
           <include name="builtin-ant-roles.xml"/>
  @@ -125,7 +131,29 @@
         <zipfileset dir="${manifest.dir}" fullpath="META-INF/ant-descriptor.xml">
           <include name="builtin-ant-descriptor.xml"/>
         </zipfileset>
  +    </jar>
  +
  +<!--
  +    <jar jarfile="${build.lib}/myrmidon-framework.jar" 
  +         basedir="${build.classes}" 
  +         manifest="${manifest.dir}/myrmidon-framework.mf">
  +      <include name="org/apache/myrmidon/framework/**" />
  +
  +      <zipfileset dir="${manifest.dir}" fullpath="META-INF/ant-roles.xml">
  +        <include name="builtin-ant-roles.xml"/>
  +      </zipfileset>
   
  +      <zipfileset dir="${manifest.dir}" fullpath="META-INF/ant-descriptor.xml">
  +        <include name="builtin-ant-descriptor.xml"/>
  +      </zipfileset>
  +    </jar>
  +-->
  +    <jar jarfile="${build.lib}/myrmidon-container.jar" 
  +         basedir="${build.classes}" 
  +         manifest="${manifest.dir}/myrmidon-container.mf">
  +      <include name="org/apache/myrmidon/components/**" />
  +      <include name="org/apache/myrmidon/frontends/*" />
  +      <include name="org/apache/myrmidon/*" />
       </jar>
   
       <jar jarfile="${build.lib}/core.atl" basedir="${build.classes}">
  @@ -167,10 +195,14 @@
       <mkdir dir="${dist.ext}"/>
   
       <copy file="tools/lib/ant.jar" tofile="${dist.lib}/ant1-compat.jar" />
  +    <copy file="${build.lib}/myrmidon-launcher.jar" tofile="${dist.bin}/myrmidon-launcher.jar"
/>
  +    <copy file="${build.lib}/myrmidon-container.jar" tofile="${dist.bin}/lib/myrmidon-container.jar"
/>
   
       <copy todir="${dist.lib}">
         <fileset dir="${build.lib}">
           <exclude name="selftest.atl"/>
  +        <exclude name="myrmidon-container.jar"/>
  +        <exclude name="myrmidon-launcher.jar"/>
         </fileset>
       </copy>
   
  
  
  
  1.7       +63 -3     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Main.java	2001/06/04 12:48:05	1.6
  +++ Main.java	2001/11/06 08:09:59	1.7
  @@ -13,6 +13,7 @@
   import java.net.URL;
   import java.net.URLClassLoader;
   import java.util.ArrayList;
  +import java.util.Arrays;
   import java.util.StringTokenizer;
   
   /**
  @@ -40,9 +41,13 @@
   
               //setup classloader appropriately for myrmidon jar
               final File libDir = new File( installDirectory, "lib" );
  -            final URL[] urls = buildURLList( libDir );
  +            final URL[] libUrls = buildURLList( libDir );
  +            final URLClassLoader libClassLoader = new URLClassLoader( libUrls );
   
  -            final URLClassLoader classLoader = new URLClassLoader( urls );
  +            final File containerLibDir = new File( installDirectory, "bin" + File.separator
+ "lib" );
  +            final URL[] containerLibUrls = buildURLList( containerLibDir );
  +            final URLClassLoader classLoader = 
  +                new URLClassLoader( containerLibUrls, libClassLoader );
   
               //load class and retrieve appropriate main method.
               final Class clazz = classLoader.loadClass( "org.apache.myrmidon.frontends.CLIMain"
);
  @@ -116,7 +121,7 @@
           {
               final String element = tokenizer.nextToken();
   
  -            if( element.endsWith( "ant.jar" ) )
  +            if( element.endsWith( "myrmidon-launcher.jar" ) )
               {
                   File file = (new File( element )).getAbsoluteFile();
                   file = file.getParentFile();
  @@ -133,3 +138,58 @@
           throw new Exception( "Unable to locate ant.jar in classpath" );
       }
   }
  +
  +class MyClassLoader extends URLClassLoader
  +{
  +    MyClassLoader( final URL[] urls, final ClassLoader classLoader )
  +    {
  +        super( urls, classLoader );
  +    }
  +
  +    public Class loadClass( final String name )
  +        throws ClassNotFoundException
  +    {
  +        System.out.println( "Loading: " + name );
  +        try
  +        {
  +            return super.loadClass( name );
  +        }
  +        catch( final ClassNotFoundException cnfe )
  +        {
  +            System.out.println( "Failed to Load: " + name );
  +            throw cnfe;
  +        }
  +    }
  +
  +    protected Class findClass( final String name )
  +        throws ClassNotFoundException
  +    {
  +        System.out.println( "findClass: " + name );
  +        try
  +        {
  +            return super.findClass( name );
  +        }
  +        catch( final ClassNotFoundException cnfe )
  +        {
  +            System.out.println( "Failed to Load: " + name );
  +            throw cnfe;
  +        }
  +    }
  +
  +    public Class loadClass( final String name, final boolean resolve )
  +        throws ClassNotFoundException
  +    {
  +        System.out.println( "Loading: " + name );
  +        try
  +        {
  +            return super.loadClass( name, resolve );
  +        }
  +        catch( final ClassNotFoundException cnfe )
  +        {
  +            System.out.println( "Failed to Load: " + name );
  +            throw cnfe;
  +        }
  +    }
  +}
  +
  +
  
  
  
  1.14      +2 -0      jakarta-ant/proposal/myrmidon/src/make/sample.ant
  
  Index: sample.ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/make/sample.ant,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- sample.ant	2001/07/08 07:29:23	1.13
  +++ sample.ant	2001/11/06 08:09:59	1.14
  @@ -101,11 +101,13 @@
   
     <target name="ant1-tasklib-test">
   
  +  <!--
       <ant1-tasklib prefix="a1-" lib="../../dist/lib/ant1-compat.jar"/>
   
       <a1-echo message="Boo!" />
       <a1-mkdir dir="../../dist/test"/>
       <a1-copy file="../../tools/lib/ant.jar" tofile="../../dist/test/ant1-compat.jar"
/>
  +  -->
   
     </target>
   
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/manifest/builtin-ant-roles.xml
  
  Index: builtin-ant-roles.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/manifest/builtin-ant-roles.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- builtin-ant-roles.xml	2001/06/17 10:35:43	1.3
  +++ builtin-ant-roles.xml	2001/11/06 08:10:00	1.4
  @@ -3,5 +3,5 @@
     <role shorthand="data-type"        name="org.apache.myrmidon.framework.DataType"/>
     <role shorthand="listener"         name="org.apache.myrmidon.listeners.ProjectListener"/>
     <role shorthand="aspect"           name="org.apache.myrmidon.aspects.AspectHandler"/>
  -  <role shorthand="project-builder"  name="org.apache.myrmidon.components.builder.ProjectBuilder"/>
  +  <role shorthand="project-builder"  name="org.apache.myrmidon.interfaces.builder.ProjectBuilder"/>
   </roles>
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-api.mf
  
  Index: myrmidon-api.mf
  ===================================================================
  Manifest-Version: 1.0
  Created-By: Apache Ant Project
  Extension-Name: myrmidon.api
  Specification-Title: Myrmidon API
  Specification-Version: 0.01
  Specification-Vendor: Jakarta Apache
  Implementation-Vendor-Id: org.apache.jakarta
  Implementation-Vendor: Jakarta Apache Project
  Implementation-Version: 0.01
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-container.mf
  
  Index: myrmidon-container.mf
  ===================================================================
  Manifest-Version: 1.0
  Created-By: Apache Ant Project
  Main-Class: org.apache.myrmidon.frontends.CLIMain
  Extension-Name: myrmidon.container
  Specification-Title: Myrmidon Framework
  Specification-Version: 0.01
  Specification-Vendor: Jakarta Apache
  Implementation-Vendor-Id: org.apache.jakarta
  Implementation-Vendor: Jakarta Apache Project
  Implementation-Version: 0.01
  Extension-List: myrmidon_api, myrmidon_framework
  myrmidon_api-Extension-Name: myrmidon.api
  myrmidon_api-Specification-Version: 0.01
  myrmidon_api-Implementation-Version: 0.01
  myrmidon_api-Implementation-Vendor-Id: org.apache.jakarta
  myrmidon_framework-Extension-Name: myrmidon.framework
  myrmidon_framework-Specification-Version: 0.01
  myrmidon_framework-Implementation-Version: 0.01
  myrmidon_framework-Implementation-Vendor-Id: org.apache.jakarta
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-framework.mf
  
  Index: myrmidon-framework.mf
  ===================================================================
  Manifest-Version: 1.0
  Created-By: Apache Ant Project
  Extension-Name: myrmidon.framework
  Specification-Title: Myrmidon Framework
  Specification-Version: 0.01
  Specification-Vendor: Jakarta Apache
  Implementation-Vendor-Id: org.apache.jakarta
  Implementation-Vendor: Jakarta Apache Project
  Implementation-Version: 0.01
  Extension-List: myrmidon.api
  myrmidon.api-Extension-Name: myrmidon.api
  myrmidon.api-Specification-Version: 0.01
  myrmidon.api-Implementation-Version: 0.01
  myrmidon.api-Implementation-Vendor-Id: org.apache.jakarta
  _myrmidon.api-Implementation-URL: http://jakarta.apache.org/ant/myrmidon-api.jar
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/manifest/myrmidon-launcher.mf
  
  Index: myrmidon-launcher.mf
  ===================================================================
  Manifest-Version: 1.0
  Main-Class: org.apache.myrmidon.launcher.Main
  Created-By: Apache Ant Project
  
  
  1.5       +1 -1      jakarta-ant/proposal/myrmidon/src/script/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/script/ant,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ant	2001/01/08 04:36:48	1.4
  +++ ant	2001/11/06 08:10:00	1.5
  @@ -42,4 +42,4 @@
     fi
   fi
   
  -$JAVACMD $ANT_OPTS -jar $ANT_HOME/lib/ant.jar $@
  +$JAVACMD $ANT_OPTS -jar $ANT_HOME/bin/myrmidon-launcher.jar $@
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/myrmidon/src/script/ant.bat
  
  Index: ant.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/script/ant.bat,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ant.bat	2001/01/08 04:36:48	1.3
  +++ ant.bat	2001/11/06 08:10:00	1.4
  @@ -57,7 +57,7 @@
   :doneArgs
   rem Mmmmmm tasty - finished slurping args
   
  -%JAVACMD% %ANT_OPTS% -jar %ANT_HOME%\lib\ant.jar %ANT_CMD_LINE_ARGS%
  +%JAVACMD% %ANT_OPTS% -jar %ANT_HOME%\bin\myrmidon-launcher.jar %ANT_CMD_LINE_ARGS%
   
   :end
   if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message