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/java/org/apache/antlib/selftest ExtensionsTest.java
Date Thu, 07 Feb 2002 11:51:32 GMT
donaldp     02/02/07 03:51:32

  Modified:    proposal/myrmidon/src/manifest selftest-extension1.mf
               proposal/myrmidon/src/java/org/apache/antlib/selftest
                        ExtensionsTest.java
  Log:
  Test that tools.jar is included when you declare a dependency on it
  
  Revision  Changes    Path
  1.2       +3 -1      jakarta-ant/proposal/myrmidon/src/manifest/selftest-extension1.mf
  
  Index: selftest-extension1.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/manifest/selftest-extension1.mf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- selftest-extension1.mf	26 Nov 2001 11:11:44 -0000	1.1
  +++ selftest-extension1.mf	7 Feb 2002 11:51:32 -0000	1.2
  @@ -6,4 +6,6 @@
   Implementation-Vendor-Id: org.apache.avalon
   Implementation-Vendor: Apache Avalon Project
   Implementation-Version: 1.0.2
  -
  +Extension-List: tools
  +tools-Extension-Name: com.sun.tools
  +tools-Specification-Version: 1.0
  
  
  
  1.4       +19 -0     jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/ExtensionsTest.java
  
  Index: ExtensionsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/ExtensionsTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExtensionsTest.java	23 Dec 2001 06:24:52 -0000	1.3
  +++ ExtensionsTest.java	7 Feb 2002 11:51:32 -0000	1.4
  @@ -23,5 +23,24 @@
           throws TaskException
       {
           ExtensionsLoadedClass.doSomething();
  +
  +        Class clazz = null;
  +        try
  +        {
  +            clazz = Class.forName( "sun.tools.javac.Main" );
  +        }
  +        catch( ClassNotFoundException e )
  +        {
  +            try
  +            {
  +                clazz = Class.forName( "com.sun.tools.javac.Main" );
  +            }
  +            catch( ClassNotFoundException e1 )
  +            {
  +                throw new TaskException( "Unable to locate compilers from tools.jar" );
  +            }
  +        }
  +
  +        System.out.println( "Compiler loaded from tools.jar = " + clazz );
       }
   }
  
  
  

--
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