commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r559885 - in /jakarta/commons/proper/jci/trunk/compilers/jsr199: pom.xml src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
Date Thu, 26 Jul 2007 17:08:27 GMT
Author: tcurdt
Date: Thu Jul 26 10:08:26 2007
New Revision: 559885

URL: http://svn.apache.org/viewvc?view=rev&rev=559885
Log:
https://issues.apache.org/jira/browse/JCI-52


Added:
    jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
  (with props)
Modified:
    jakarta/commons/proper/jci/trunk/compilers/jsr199/pom.xml
    jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java

Modified: jakarta/commons/proper/jci/trunk/compilers/jsr199/pom.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jci/trunk/compilers/jsr199/pom.xml?view=diff&rev=559885&r1=559884&r2=559885
==============================================================================
--- jakarta/commons/proper/jci/trunk/compilers/jsr199/pom.xml (original)
+++ jakarta/commons/proper/jci/trunk/compilers/jsr199/pom.xml Thu Jul 26 10:08:26 2007
@@ -21,11 +21,11 @@
     <parent>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-jci</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.1-SNAPSHOT</version>
     </parent>
     <packaging>jar</packaging>
     <artifactId>commons-jci-jsr166</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>1.1-SNAPSHOT</version>
     <name>compiler-jsr166</name>
     <description>
         Commons JCI compiler implementation for JDK 1.6 and up.
@@ -34,12 +34,12 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-jci-core</artifactId>
-            <version>1.0-SNAPSHOT</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-jci-core</artifactId>
-            <version>1.0-SNAPSHOT</version>
+            <version>${project.version}</version>
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>

Modified: jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java?view=diff&rev=559885&r1=559884&r2=559885
==============================================================================
--- jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java
(original)
+++ jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompiler.java
Thu Jul 26 10:08:26 2007
@@ -31,17 +31,15 @@
 import javax.tools.Diagnostic;
 import javax.tools.DiagnosticCollector;
 import javax.tools.FileObject;
-import javax.tools.JavaCompilerTool;
+import javax.tools.JavaCompiler;
 import javax.tools.JavaFileManager;
 import javax.tools.JavaFileObject;
 import javax.tools.SimpleJavaFileObject;
 import javax.tools.ToolProvider;
-import javax.tools.JavaFileObject.Kind;
 
 import org.apache.commons.jci.problems.CompilationProblem;
 import org.apache.commons.jci.readers.ResourceReader;
 import org.apache.commons.jci.stores.ResourceStore;
-import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -173,9 +171,22 @@
             log.debug("list " + location + packageName + kinds + recurse);
             return units;
         }
+		public boolean isSameFile(FileObject fileobject, FileObject fileobject1) {
+			return false;
+		}
     }
     
-    public CompilationResult compile( final String[] pResourcePaths, final ResourceReader
pReader, final ResourceStore pStore, final ClassLoader classLoader) {
+    private final Jsr199JavaCompilerSettings settings;
+    
+    public Jsr199JavaCompiler() {
+        settings = new Jsr199JavaCompilerSettings();
+    }
+
+    public Jsr199JavaCompiler( final Jsr199JavaCompilerSettings pSettings ) {
+        settings = pSettings;
+    }
+    
+    public CompilationResult compile( final String[] pResourcePaths, final ResourceReader
pReader, final ResourceStore pStore, final ClassLoader classLoader, JavaCompilerSettings settings)
{
 
         final Collection<JavaFileObject> units = new ArrayList<JavaFileObject>();
         for (int i = 0; i < pResourcePaths.length; i++) {
@@ -184,13 +195,13 @@
             units.add(new CompilationUnit(sourcePath, pReader));
         }
 
-        final JavaCompilerTool compiler = ToolProvider.getSystemJavaCompilerTool();
+        final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
 //        final JavaFileManager fileManager = compiler.getStandardFileManager(diagnostics);
         final JavaFileManager fileManager = new JciJavaFileManager(units, pStore);
         final DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
 
 
-        compiler.getTask(null, fileManager, diagnostics, null, null, units).run();
+        compiler.getTask(null, fileManager, diagnostics, null, null, units).call();
 
         try {
             fileManager.close();
@@ -208,5 +219,9 @@
 
         return new CompilationResult(problems);
     }
+
+	public JavaCompilerSettings createDefaultSettings() {
+		return this.settings;
+	}
 
 }

Added: jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java?view=auto&rev=559885
==============================================================================
--- jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
(added)
+++ jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
Thu Jul 26 10:08:26 2007
@@ -0,0 +1,5 @@
+package org.apache.commons.jci.compilers;
+
+public class Jsr199JavaCompilerSettings extends JavaCompilerSettings {
+
+}

Propchange: jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: jakarta/commons/proper/jci/trunk/compilers/jsr199/src/main/java/org/apache/commons/jci/compilers/Jsr199JavaCompilerSettings.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



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


Mime
View raw message