ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/proposal/mutant/src/java/cli/org/apache/ant/cli Commandline.java
Date Tue, 19 Feb 2002 02:12:21 GMT
conor       02/02/18 18:12:21

  Modified:    proposal/mutant bootstrap.sh
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib
                        AntLibManager.java
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution
                        ExecutionManager.java
               proposal/mutant/src/java/bootstrap/org/apache/ant/builder
                        Builder.java
               proposal/mutant/src/java/cli/org/apache/ant/cli
                        Commandline.java
  Added:       proposal/mutant bootstrap.bat build.bat
  Log:
  Bootstrap files for Windows users
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-ant/proposal/mutant/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/bootstrap.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -u -r1.1 -r1.2
  --- bootstrap.sh	18 Feb 2002 12:36:03 -0000	1.1
  +++ bootstrap.sh	19 Feb 2002 02:12:21 -0000	1.2
  @@ -4,7 +4,7 @@
   #   reserved.
   
   # cleanup curretn boot area
  -rm -rf bin bootstrap
  +rm -rf bin bootstrap dist
   
   # compile init jar
   mkdir -p bin/init
  
  
  
  1.1                  jakarta-ant/proposal/mutant/bootstrap.bat
  
  Index: bootstrap.bat
  ===================================================================
  @echo off
  REM   Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
  REM   reserved.
  
  REM cleanup curretn boot area
  if exist bin rmdir /s/q bin 
  if exist bootstrap rmdir /s/q bootstrap 
  if exist dist rmdir /s/q dist 
  
  REM compile init jar
  mkdir bin\init
  javac -d bin\init src\java\init\org\apache\ant\init\*.java
  
  REM compile bootstrap classes
  mkdir bin\bootstrap
  javac -classpath bin\init -d bin\bootstrap src\java\bootstrap\org\apache\ant\bootstrap\*.java
  
  REM compiler builder classes
  mkdir bin\builder
  javac -classpath bin\init;bin\bootstrap -d bin\builder src\java\bootstrap\org\apache\ant\builder\*.java
  
  REM run bootstrap
  java -classpath bin\init;bin\bootstrap org.apache.ant.bootstrap.Bootstrap
  
  REM run full build using bootstrapped version
  java -classpath bootstrap\lib\start.jar;bootstrap\lib\init.jar org.apache.ant.start.Main
%*
  
  REM Use the full build as the build used by the build script
  xcopy /s dist bootstrap
  
  
  
  1.1                  jakarta-ant/proposal/mutant/build.bat
  
  Index: build.bat
  ===================================================================
  @echo off
  REM   Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
  REM   reserved.
  
  java -classpath bootstrap\lib\start.jar;bootstrap\lib\init.jar org.apache.ant.start.Main
%*
  
  
  
  1.5       +28 -11    jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java
  
  Index: AntLibManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- AntLibManager.java	18 Feb 2002 12:36:03 -0000	1.4
  +++ AntLibManager.java	19 Feb 2002 02:12:21 -0000	1.5
  @@ -122,9 +122,12 @@
                   if (antLibrarySpec != null) {
                       String libraryId = antLibrarySpec.getLibraryId();
                       if (librarySpecs.containsKey(libraryId)) {
  +                        AntLibrarySpec currentSpec 
  +                            = (AntLibrarySpec)librarySpecs.get(libraryId);
                           throw new ExecutionException("Found more than one "
  -                             + "copy of library with id = " + libraryId +
  -                            " (" + libURLs[i] + ")");
  +                             + "copy of library with id = " + libraryId 
  +                             + " (" + libURLs[i] + ") + existing library at ("
  +                             + currentSpec.getLibraryURL() + ")");
                       }
                       antLibrarySpec.setLibraryURL(libURLs[i]);
                       librarySpecs.put(libraryId, antLibrarySpec);
  @@ -183,28 +186,42 @@
       /**
        * Load either a set of libraries or a single library.
        *
  -     * @param libLocationString URL or file where libraries can be found
  +     * @param libLocationURL URL where libraries can be found
        * @param librarySpecs A collection of library specs which will be
        *      populated with the libraries found
        * @exception ExecutionException if the libraries cannot be loaded
        * @exception MalformedURLException if the library's location cannot be
        *      formed
        */
  -    public void loadLibs(Map librarySpecs, String libLocationString)
  +    public void loadLibs(Map librarySpecs, URL libLocationURL)
            throws ExecutionException, MalformedURLException {
  -
  -        File libLocation = new File(libLocationString);
  -        if (!libLocation.exists()) {
  -            try {
  -                URL libLocationURL = new URL(libLocationString);
                   if (!libLocationURL.getProtocol().equals("file")
                        && !remoteAllowed) {
                       throw new ExecutionException("The config library "
  -                         + "location \"" + libLocationString
  +                 + "location \"" + libLocationURL
                            + "\" cannot be used because config does "
                            + "not allow remote libraries");
                   }
                   addAntLibraries(librarySpecs, libLocationURL);
  +    }
  +    
  +    /**
  +     * Load either a set of libraries or a single library.
  +     *
  +     * @param libLocationString URL or file where libraries can be found
  +     * @param librarySpecs A collection of library specs which will be
  +     *      populated with the libraries found
  +     * @exception ExecutionException if the libraries cannot be loaded
  +     * @exception MalformedURLException if the library's location cannot be
  +     *      formed
  +     */
  +    public void loadLibs(Map librarySpecs, String libLocationString)
  +         throws ExecutionException, MalformedURLException {
  +
  +        File libLocation = new File(libLocationString);
  +        if (!libLocation.exists()) {
  +            try {
  +                loadLibs(librarySpecs, new URL(libLocationString));
               } catch (MalformedURLException e) {
                   // XXX
               }
  
  
  
  1.9       +3 -1      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java
  
  Index: ExecutionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -u -r1.8 -r1.9
  --- ExecutionManager.java	12 Feb 2002 23:52:23 -0000	1.8
  +++ ExecutionManager.java	19 Feb 2002 02:12:21 -0000	1.9
  @@ -129,7 +129,7 @@
               AntLibManager libManager
                    = new AntLibManager(config.isRemoteLibAllowed());
   
  -            libManager.addAntLibraries(librarySpecs, standardLibsURL);
  +            libManager.loadLibs(librarySpecs, standardLibsURL);
               libManager.configLibraries(initConfig, librarySpecs, antLibraries,
                   config.getLibraryPathsMap());
   
  @@ -161,6 +161,8 @@
            throws AntException {
           Throwable buildFailureCause = null;
           try {
  +            init();
  +            
               // start by validating the project we have been given.
               project.validate();
   
  
  
  
  1.2       +1 -0      jakarta-ant/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Builder.java
  
  Index: Builder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/Builder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -u -r1.1 -r1.2
  --- Builder.java	18 Feb 2002 12:36:05 -0000	1.1
  +++ Builder.java	19 Feb 2002 02:12:21 -0000	1.2
  @@ -142,6 +142,7 @@
           files.add(new File(TASKDEFS_ROOT, "Available.java"));
           files.add(new File(TASKDEFS_ROOT, "Mkdir.java"));
           files.add(new File(TASKDEFS_ROOT, "Copy.java"));
  +        files.add(new File(TASKDEFS_ROOT, "Echo.java"));
           files.add(new File(TASKDEFS_ROOT, "MatchingTask.java"));
           files.add(new File(DEPEND_ROOT, "Depend.java"));
           files.add(new File(DEPEND_ROOT, "ClassFile.java"));
  
  
  
  1.10      +0 -1      jakarta-ant/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -u -r1.9 -r1.10
  --- Commandline.java	18 Feb 2002 12:36:05 -0000	1.9
  +++ Commandline.java	19 Feb 2002 02:12:21 -0000	1.10
  @@ -311,7 +311,6 @@
           }
   
           try {
  -            executionManager.init();
               executionManager.runBuild(project, targets, definedProperties);
               System.exit(0);
           } catch (Throwable t) {
  
  
  

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