tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler AntCompiler.java JDTCompiler.java
Date Thu, 02 Sep 2004 16:05:07 GMT
yoavs       2004/09/02 09:05:07

  Modified:    jasper2/src/share/org/apache/jasper
                        EmbeddedServletOptions.java JspC.java Options.java
               jasper2/src/share/org/apache/jasper/compiler
                        AntCompiler.java JDTCompiler.java
  Log:
  Added compilerTargetVM option support, "1.4" default.
  
  Revision  Changes    Path
  1.13      +17 -0     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java
  
  Index: EmbeddedServletOptions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- EmbeddedServletOptions.java	1 Sep 2004 22:54:13 -0000	1.12
  +++ EmbeddedServletOptions.java	2 Sep 2004 16:05:06 -0000	1.13
  @@ -139,6 +139,11 @@
       private String compiler = null;
   
       /**
  +     * Compiler target VM.
  +     */
  +    private String compilerTargetVM = "1.4";
  +
  +    /**
        * Cache for the TLD locations
        */
       private TldLocationsCache tldLocationsCache = null;
  @@ -291,6 +296,13 @@
           return compiler;
       }
   
  +    /**
  +     * @see Options#getCompilerTargetVM
  +     */
  +    public String getCompilerTargetVM() {
  +        return compilerTargetVM;
  +    }
  +
       public boolean getErrorOnUseBeanInvalidClassAttribute() {
           return errorOnUseBeanInvalidClassAttribute;
       }
  @@ -553,6 +565,11 @@
   					   scratchDir.getAbsolutePath()));
                                     
           this.compiler = config.getInitParameter("compiler");
  +        
  +        String compilerTargetVM = config.getInitParameter("compilerTargetVM");
  +        if(compilerTargetVM != null) {
  +            this.compilerTargetVM = compilerTargetVM;
  +        }
   
           String javaEncoding = config.getInitParameter("javaEncoding");
           if (javaEncoding != null) {
  
  
  
  1.81      +15 -0     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- JspC.java	16 Jun 2004 14:20:17 -0000	1.80
  +++ JspC.java	2 Sep 2004 16:05:06 -0000	1.81
  @@ -142,7 +142,11 @@
       private int dieLevel;
       private boolean helpNeeded = false;
       private boolean compile = false;
  +
       private String compiler = null;
  +
  +    private String compilerTargetVM = "1.4";
  +
       private boolean classDebugInfo = true;
       private Vector extensions;
       private Vector pages = new Vector();
  @@ -460,6 +464,17 @@
   
       public void setCompiler(String c) {
           compiler=c;
  +    }
  +
  +    /**
  +     * @see Options#getCompilerTargetVM
  +     */
  +    public String getCompilerTargetVM() {
  +        return compilerTargetVM;
  +    }
  +
  +    public void setCompileTargetVM(String vm) {
  +        compilerTargetVM = vm;
       }
   
       public TldLocationsCache getTldLocationsCache() {
  
  
  
  1.24      +5 -0      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Options.java
  
  Index: Options.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Options.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Options.java	17 Mar 2004 19:23:03 -0000	1.23
  +++ Options.java	2 Sep 2004 16:05:06 -0000	1.24
  @@ -117,6 +117,11 @@
       public String getCompiler();
   
       /**
  +     * The compiler target VM, e.g. 1.1, 1.2, 1.3, or 1.4.
  +     */
  +    public String getCompilerTargetVM();
  +
  +    /**
        * The cache for the location of the TLD's
        * for the various tag libraries 'exposed'
        * by the web application.
  
  
  
  1.2       +5 -0      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java
  
  Index: AntCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AntCompiler.java	16 Aug 2004 23:48:35 -0000	1.1
  +++ AntCompiler.java	2 Sep 2004 16:05:06 -0000	1.2
  @@ -170,6 +170,11 @@
               javac.setCompiler(options.getCompiler());
               info.append("    compiler=" + options.getCompiler() + "\n");
           }
  +
  +        if (options.getCompilerTargetVM() != null) {
  +            javac.setTarget(options.getCompilerTargetVM());
  +            info.append("   compilerTargetVM=" + options.getCompilerTargetVM() + "\n");
  +        }
           
           // Build includes path
           PatternSet.NameEntry includes = javac.createInclude();
  
  
  
  1.2       +25 -0     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java
  
  Index: JDTCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JDTCompiler.java	16 Aug 2004 23:48:35 -0000	1.1
  +++ JDTCompiler.java	2 Sep 2004 16:05:06 -0000	1.2
  @@ -275,10 +275,35 @@
               settings.put(CompilerOptions.OPTION_Source,
                            CompilerOptions.VERSION_1_4);
           }
  +
  +        /* Use target attribute from Options instead
           if (target14) {
               settings.put(CompilerOptions.OPTION_TargetPlatform,
                            CompilerOptions.VERSION_1_4);
           }
  +        */
  +        if(ctxt.getOptions().getCompilerTargetVM() != null) {
  +            String opt = ctxt.getOptions().getCompilerTargetVM();
  +            if(opt.equals("1.1")) {
  +                settings.put(CompilerOptions.OPTION_TargetPlatform,
  +                             CompilerOptions.VERSION_1_1);
  +            } else if(opt.equals("1.2")) {
  +                settings.put(CompilerOptions.OPTION_TargetPlatform,
  +                             CompilerOptions.VERSION_1_2);
  +            } else if(opt.equals("1.3")) { 
  +                settings.put(CompilerOptions.OPTION_TargetPlatform,
  +                             CompilerOptions.VERSION_1_3);
  +            } else if(opt.equals("1.4")) {
  +                settings.put(CompilerOptions.OPTION_TargetPlatform,
  +                             CompilerOptions.VERSION_1_4);
  +            } else if(opt.equals("1.5")) {
  +                settings.put(CompilerOptions.OPTION_TargetPlatform,
  +                             CompilerOptions.VERSION_1_5);
  +            } else {
  +                log.warn("Unknown target VM " + opt + " ignored.");
  +            }
  +        }
  +
           final IProblemFactory problemFactory = 
               new DefaultProblemFactory(Locale.getDefault());
           
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message