ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types XMLCatalog.java
Date Mon, 13 Jan 2003 15:52:13 GMT
bodewig     2003/01/13 07:52:12

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Javadoc.java
               src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
               src/main/org/apache/tools/ant/taskdefs/optional Javah.java
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        IPlanetEjbcTask.java
               src/main/org/apache/tools/ant/taskdefs/optional/jsp
                        WLJspc.java
               src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers
                        JasperC.java
               src/main/org/apache/tools/ant/taskdefs/rmic
                        DefaultRmicAdapter.java
               src/main/org/apache/tools/ant/types XMLCatalog.java
  Log:
  Make build.sysclasspath handling more consistent.
  
  PR: 15014
  
  Revision  Changes    Path
  1.338     +2 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.337
  retrieving revision 1.338
  diff -u -r1.337 -r1.338
  --- WHATSNEW	13 Jan 2003 12:05:51 -0000	1.337
  +++ WHATSNEW	13 Jan 2003 15:52:11 -0000	1.338
  @@ -88,6 +88,8 @@
   * The <get> task can now be compiled (and Ant thus bootstrapped) using
     Kaffee.
   
  +* build.sysclasspath will now be honored by more tasks.
  +
   Other changes:
   --------------
   * The filesetmanifest attribute of <jar> has been reenabled.
  
  
  
  1.105     +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- Javadoc.java	8 Nov 2002 16:07:55 -0000	1.104
  +++ Javadoc.java	13 Jan 2003 15:52:11 -0000	1.105
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -1559,7 +1559,7 @@
           }
   
           if (classpath == null) {
  -            classpath = Path.systemClasspath;
  +            classpath = (new Path(getProject())).concatSystemClasspath("last");
           } else {
               classpath = classpath.concatSystemClasspath("ignore");
           }
  
  
  
  1.32      +9 -13     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- DefaultCompilerAdapter.java	25 Jul 2002 15:21:09 -0000	1.31
  +++ DefaultCompilerAdapter.java	13 Jan 2003 15:52:11 -0000	1.32
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -167,20 +167,16 @@
           }
   
           // Combine the build classpath with the system classpath, in an
  -        // order determined by the value of build.classpath
  +        // order determined by the value of build.sysclasspath
   
  -        if (compileClasspath == null) {
  -            if (includeAntRuntime) {
  -                classpath.addExisting(Path.systemClasspath);
  -            }
  +        Path cp = compileClasspath;
  +        if (cp == null) {
  +            cp = new Path(project);
  +        }
  +        if (includeAntRuntime) {
  +            classpath.addExisting(cp.concatSystemClasspath("last"));
           } else {
  -            if (includeAntRuntime) {
  -                classpath.addExisting(compileClasspath
  -                                      .concatSystemClasspath("last"));
  -            } else {
  -                classpath.addExisting(compileClasspath
  -                                      .concatSystemClasspath("ignore"));
  -            }
  +            classpath.addExisting(cp.concatSystemClasspath("ignore"));
           }
   
           if (includeJavaRuntime) {
  
  
  
  1.20      +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Javah.java	25 Jul 2002 15:21:11 -0000	1.19
  +++ Javah.java	13 Jan 2003 15:52:12 -0000	1.20
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -296,7 +296,9 @@
           }
   
           if (classpath == null) {
  -            classpath = Path.systemClasspath;
  +            classpath = (new Path(getProject())).concatSystemClasspath("last");
  +        } else {
  +            classpath = classpath.concatSystemClasspath("ignore");
           }
   
           String compiler = getProject().getProperty("build.compiler");
  
  
  
  1.11      +6 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
  
  Index: IPlanetEjbcTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- IPlanetEjbcTask.java	25 Jul 2002 15:21:13 -0000	1.10
  +++ IPlanetEjbcTask.java	13 Jan 2003 15:52:12 -0000	1.11
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -342,10 +342,13 @@
        * @return Path The classpath to be used for EJBc.
        */
       private Path getClasspath() {
  +        Path cp = null;
           if (classpath == null) {
  -            classpath = Path.systemClasspath;
  +            cp = (new Path(getProject())).concatSystemClasspath("last");
  +        } else {
  +            cp = classpath.concatSystemClasspath("ignore");
           }
   
  -        return classpath;
  +        return cp;
       }
   }
  
  
  
  1.16      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
  
  Index: WLJspc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- WLJspc.java	31 Oct 2002 15:12:52 -0000	1.15
  +++ WLJspc.java	13 Jan 2003 15:52:12 -0000	1.16
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000,2002 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000,2002-2003 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -150,7 +150,7 @@
               compileClasspath = new Path(getProject());
           }
           
  -        compileClasspath.append(Path.systemClasspath);
  +        compileClasspath = compileClasspath.concatSystemClasspath();
           String[] files = ds.getIncludedFiles();
           
           //Weblogic.jspc calls System.exit() ... have to fork
  
  
  
  1.13      +3 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
  
  Index: JasperC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JasperC.java	18 Nov 2002 19:05:43 -0000	1.12
  +++ JasperC.java	13 Jan 2003 15:52:12 -0000	1.13
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -106,7 +106,8 @@
               if (getJspc().getClasspath() != null) {
                   getProject().log("using user supplied classpath: "+getJspc().getClasspath(),
                       Project.MSG_DEBUG);
  -                java.setClasspath(getJspc().getClasspath());
  +                java.setClasspath(getJspc().getClasspath()
  +                                  .concatSystemClasspath("ignore"));
               } else {
                   Path classpath=new Path(getProject());
                   classpath=classpath.concatSystemClasspath("only");
  
  
  
  1.23      +9 -12     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  
  Index: DefaultRmicAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DefaultRmicAdapter.java	25 Jul 2002 15:21:21 -0000	1.22
  +++ DefaultRmicAdapter.java	13 Jan 2003 15:52:12 -0000	1.23
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -144,18 +144,15 @@
   
           // Combine the build classpath with the system classpath, in an 
           // order determined by the value of build.sysclasspath
  -        if (attributes.getClasspath() == null) {
  -            if (attributes.getIncludeantruntime()) {
  -                classpath.addExisting(Path.systemClasspath);
  -            }
  +        
  +        Path cp = attributes.getClasspath();
  +        if (cp == null) {
  +            cp = new Path(attributes.getProject());
  +        }
  +        if (attributes.getIncludeantruntime()) {
  +            classpath.addExisting(cp.concatSystemClasspath("last"));
           } else {
  -            if (attributes.getIncludeantruntime()) {
  -                classpath.addExisting(attributes.getClasspath()
  -                                      .concatSystemClasspath("last"));
  -            } else {
  -                classpath.addExisting(attributes.getClasspath()
  -                                      .concatSystemClasspath("ignore"));
  -            }
  +            classpath.addExisting(cp.concatSystemClasspath("ignore"));
           }
   
           if (attributes.getIncludejavaruntime()) {
  
  
  
  1.21      +7 -5      jakarta-ant/src/main/org/apache/tools/ant/types/XMLCatalog.java
  
  Index: XMLCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/XMLCatalog.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XMLCatalog.java	10 Dec 2002 07:39:22 -0000	1.20
  +++ XMLCatalog.java	13 Jan 2003 15:52:12 -0000	1.21
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -697,11 +697,13 @@
           InputSource source = null;
   
           AntClassLoader loader = null;
  -        if (classpath != null) {
  -            loader = new AntClassLoader(getProject(), classpath);
  +        Path cp = classpath;
  +        if (cp != null) {
  +            cp = classpath.concatSystemClasspath("ignore");
           } else {
  -            loader = new AntClassLoader(getProject(), Path.systemClasspath);
  +            cp = (new Path(getProject())).concatSystemClasspath("last");
           }
  +        loader = new AntClassLoader(getProject(), cp);
   
           //
           // for classpath lookup we ignore the base directory
  
  
  

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