Author: tcurdt
Date: Sat Aug 12 00:48:55 2006
New Revision: 430989

URL: http://svn.apache.org/viewvc?rev=430989&view=rev
Log:
commented out a testcase, moved to standard layout

Added:
    jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/
    jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/
      - copied from r429126, 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/groovy/src/main/
    jakarta/commons/sandbox/jci/trunk/compilers/groovy/src/main/java/
      - copied from r429126, 
jakarta/commons/sandbox/jci/trunk/compilers/groovy/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/janino/src/main/
    jakarta/commons/sandbox/jci/trunk/compilers/janino/src/main/java/
      - copied from r429126, 
jakarta/commons/sandbox/jci/trunk/compilers/janino/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/
    jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/
      - copied from r429126, 
jakarta/commons/sandbox/jci/trunk/compilers/javac/src/java/
Removed:
    jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/groovy/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/janino/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/javac/src/java/
    jakarta/commons/sandbox/jci/trunk/compilers/pom.xml-notused
Modified:
    jakarta/commons/sandbox/jci/trunk/compilers/eclipse/pom.xml
    
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
    
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompilerSettings.java
    jakarta/commons/sandbox/jci/trunk/compilers/groovy/pom.xml
    jakarta/commons/sandbox/jci/trunk/compilers/janino/pom.xml
    jakarta/commons/sandbox/jci/trunk/compilers/javac/pom.xml
    
jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/org/apache/commons/jci/compilers/JavacJavaCompilerSettings.java
    jakarta/commons/sandbox/jci/trunk/examples/pom.xml
    
jakarta/commons/sandbox/jci/trunk/examples/src/java/org/apache/commons/jci/examples/commandline/Compile.java
    jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/pom.xml
    
jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
    jakarta/commons/sandbox/jci/trunk/tests/pom.xml

Modified: jakarta/commons/sandbox/jci/trunk/compilers/eclipse/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/eclipse/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/compilers/eclipse/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/compilers/eclipse/pom.xml Sat Aug 12 
00:48:55 2006
@@ -17,7 +17,7 @@
   <artifactId>commons-jci-eclipse</artifactId>
   <version>3.2.0.658</version>
 
-  <name>Compiler Eclipse</name>
+  <name>compiler-eclipse</name>
 
   <dependencies>
 

Modified: 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java?rev=430989&r1=429126&r2=430989&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
 (original)
+++ 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
 Sat Aug 12 00:48:55 2006
@@ -50,16 +50,20 @@
 public final class EclipseJavaCompiler extends AbstractJavaCompiler {
 
     private final static Log log = 
LogFactory.getLog(EclipseJavaCompiler.class);
-    private final EclipseJavaCompilerSettings settings;
+    private final Map settings;
 
     public EclipseJavaCompiler() {
         this(new EclipseJavaCompilerSettings());
     }
 
-    public EclipseJavaCompiler(final EclipseJavaCompilerSettings pSettings) {
+    public EclipseJavaCompiler(final Map pSettings) {
         settings = pSettings;
     }
 
+    public EclipseJavaCompiler(final EclipseJavaCompilerSettings pSettings) {
+        settings = pSettings.getMap();
+    }
+
     final class CompilationUnit implements ICompilationUnit {
 
         final private String clazzName;
@@ -110,7 +114,7 @@
             final ClassLoader classLoader
             ) {
         
-        final Map settingsMap = settings.getMap();
+        final Map settingsMap = settings;
         final Set clazzIndex = new HashSet();
         ICompilationUnit[] compilationUnits = new 
ICompilationUnit[pClazzNames.length];
         for (int i = 0; i < compilationUnits.length; i++) {

Modified: 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompilerSettings.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompilerSettings.java?rev=430989&r1=429126&r2=430989&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompilerSettings.java
 (original)
+++ 
jakarta/commons/sandbox/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompilerSettings.java
 Sat Aug 12 00:48:55 2006
@@ -6,21 +6,25 @@
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 
 
-public class EclipseJavaCompilerSettings implements JavaCompilerSettings {
-    private final Map map = new HashMap();
-    
+public class EclipseJavaCompilerSettings extends JavaCompilerSettings {
+
+    final private Map defaultEclipseSettings = new HashMap();
+
     public EclipseJavaCompilerSettings() {
-        map.put(CompilerOptions.OPTION_LineNumberAttribute, 
CompilerOptions.GENERATE);
-        map.put(CompilerOptions.OPTION_SourceFileAttribute, 
CompilerOptions.GENERATE);
-        map.put(CompilerOptions.OPTION_ReportDeprecation, 
CompilerOptions.GENERATE);
-        map.put(CompilerOptions.OPTION_ReportUnusedImport, 
CompilerOptions.IGNORE);
-        map.put(CompilerOptions.OPTION_Encoding, "UTF-8");
-        map.put(CompilerOptions.OPTION_LocalVariableAttribute, 
CompilerOptions.GENERATE);
-        map.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
-        map.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_4);
+       defaultEclipseSettings.put(CompilerOptions.OPTION_LineNumberAttribute, 
CompilerOptions.GENERATE);
+       defaultEclipseSettings.put(CompilerOptions.OPTION_SourceFileAttribute, 
CompilerOptions.GENERATE);
+       defaultEclipseSettings.put(CompilerOptions.OPTION_ReportUnusedImport, 
CompilerOptions.IGNORE);
+        
defaultEclipseSettings.put(CompilerOptions.OPTION_LocalVariableAttribute, 
CompilerOptions.GENERATE);
     }
     
-    public Map getMap() {
+    Map getMap() {
+        final Map map = new HashMap(defaultEclipseSettings);
+       
+       map.put(CompilerOptions.OPTION_ReportDeprecation, 
CompilerOptions.GENERATE);
+        map.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_4);
+        map.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
+        map.put(CompilerOptions.OPTION_Encoding, "UTF-8");
+       
         return map;
     }
 }

Modified: jakarta/commons/sandbox/jci/trunk/compilers/groovy/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/groovy/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/compilers/groovy/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/compilers/groovy/pom.xml Sat Aug 12 
00:48:55 2006
@@ -17,7 +17,7 @@
   <artifactId>commons-jci-groovy</artifactId>
   <version>1.0-jsr-03</version>
 
-  <name>Compiler Groovy</name>
+  <name>compiler-groovy</name>
 
   <dependencies>
 

Modified: jakarta/commons/sandbox/jci/trunk/compilers/janino/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/janino/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/compilers/janino/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/compilers/janino/pom.xml Sat Aug 12 
00:48:55 2006
@@ -17,7 +17,7 @@
   <artifactId>commons-jci-janino</artifactId>
   <version>2.4.1</version>
 
-  <name>Compiler Janino</name>
+  <name>compiler-janino</name>
 
   <dependencies>
 

Modified: jakarta/commons/sandbox/jci/trunk/compilers/javac/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/javac/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/compilers/javac/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/compilers/javac/pom.xml Sat Aug 12 
00:48:55 2006
@@ -16,7 +16,7 @@
        <artifactId>commons-jci-javac</artifactId>
        <version>1.0-SNAPSHOT</version>
 
-       <name>Compiler Javac</name>
+       <name>compiler-javac</name>
 
        <dependencies>
                <dependency>

Modified: 
jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/org/apache/commons/jci/compilers/JavacJavaCompilerSettings.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/org/apache/commons/jci/compilers/JavacJavaCompilerSettings.java?rev=430989&r1=429126&r2=430989&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/org/apache/commons/jci/compilers/JavacJavaCompilerSettings.java
 (original)
+++ 
jakarta/commons/sandbox/jci/trunk/compilers/javac/src/main/java/org/apache/commons/jci/compilers/JavacJavaCompilerSettings.java
 Sat Aug 12 00:48:55 2006
@@ -2,7 +2,7 @@
 
 import java.util.List;
 
-public class JavacJavaCompilerSettings implements JavaCompilerSettings
+public class JavacJavaCompilerSettings extends JavaCompilerSettings
 {
        private boolean optimize;
 

Modified: jakarta/commons/sandbox/jci/trunk/examples/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/examples/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/examples/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/examples/pom.xml Sat Aug 12 00:48:55 2006
@@ -8,7 +8,7 @@
   <artifactId>commons-jci-examples</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>jar</packaging>
-  <name>Examples</name>
+  <name>examples</name>
 
   <reporting><excludeDefaults>true</excludeDefaults></reporting>
 

Modified: 
jakarta/commons/sandbox/jci/trunk/examples/src/java/org/apache/commons/jci/examples/commandline/Compile.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/examples/src/java/org/apache/commons/jci/examples/commandline/Compile.java?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/jci/trunk/examples/src/java/org/apache/commons/jci/examples/commandline/Compile.java
 (original)
+++ 
jakarta/commons/sandbox/jci/trunk/examples/src/java/org/apache/commons/jci/examples/commandline/Compile.java
 Sat Aug 12 00:48:55 2006
@@ -1,19 +1,105 @@
 package org.apache.commons.jci.examples.commandline;
 
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
 import org.apache.commons.jci.compilers.JavaCompiler;
 import org.apache.commons.jci.compilers.JavaCompilerFactory;
+import org.apache.commons.jci.compilers.JavaCompilerSettings;
+import org.apache.commons.jci.readers.FileResourceReader;
+import org.apache.commons.jci.readers.ResourceReader;
+import org.apache.commons.jci.stores.MemoryResourceStore;
+import org.apache.commons.jci.stores.ResourceStore;
 
 
 public final class Compile {
     
+    public static void main( String[] args ) throws Exception {
+        /*
+               final Options options = new Options();
+               options.addOption("classpath", false, "classpath");
+               options.addOption("source", false, "classpath");
+               options.addOption("target", false, "classpath");
+
+               final CommandLineParser = new PossixParser();
+               final CommandLine cmd = parser.parse(options, args);
+
+               final JavaCompilerSettingsFactory settingsFactory = new 
ProperitesJavaCompilerSettingsFactory("compiler.properties")
+               final JavaCompilerSettingsFactory settingsFactory = new 
AvalonJavaCompilerSettingsFactory(configuration)
+               final JavaCompilerSettingsFactory settingsFactory = new 
XmlJavaCompilerSettingsFactory("compiler-settings.xml")
+               final JavaCompilerSettingsFactory settingsFactory = new 
CliJavaCompilerSettingsFactory(cmd);
+       
+        final JavaCompilerSettings settings = settingsFactory.createSettings();
+        final JavaCompiler compiler = 
JavaCompilerFactory.getInstance().createCompiler(settings);
+        //final JavaCompiler compiler = settings.createCompiler();
+
+
+
+  -g                         Generate all debugging info
+  -g:none                    Generate no debugging info
+  -g:{lines,vars,source}     Generate only some debugging info
+  -nowarn                    Generate no warnings
+  -verbose                   Output messages about what the compiler is doing
+  -deprecation               Output source locations where deprecated APIs are 
used
+  -classpath <path>          Specify where to find user class files
+  -sourcepath <path>         Specify where to find input source files
+  -bootclasspath <path>      Override location of bootstrap class files
+  -extdirs <dirs>            Override location of installed extensions
+  -endorseddirs <dirs>       Override location of endorsed standards path
+  -d <directory>             Specify where to place generated class files
+  -encoding <encoding>       Specify character encoding used by source files
+  -source <release>          Provide source compatibility with specified 
release
+  -target <release>          Generate class files for specific VM version
+
+  -J<flag>                   Pass <flag> directly to the runtime system
+  -Xlint                     Enable recommended warnings
+  
-Xlint:{all,deprecation,unchecked,fallthrough,path,serial,finally,-deprecation,-unchecked,-fallthrough,-path,-serial,-finally}Enable
 or disable specific warnings
+  -Xbootclasspath/p:<path>   Prepend to the bootstrap class path
+  -Xbootclasspath/a:<path>   Append to the bootstrap class path
+  -Xbootclasspath:<path>     Override location of bootstrap class files
+  -Djava.ext.dirs=<dirs>     Override location of installed extensions
+  -Djava.endorsed.dirs=<dirs>Override location of endorsed standards path
+  -Xmaxerrs <number>         Set the maximum number of errors to print
+  -Xmaxwarns <number>        Set the maximum number of warnings to print
+  -Xstdout <filename>        Redirect standard output
+
+        map.put(CompilerOptions.OPTION_LineNumberAttribute, 
CompilerOptions.GENERATE);
+        map.put(CompilerOptions.OPTION_SourceFileAttribute, 
CompilerOptions.GENERATE);
+        map.put(CompilerOptions.OPTION_ReportDeprecation, 
CompilerOptions.GENERATE);
+        map.put(CompilerOptions.OPTION_ReportUnusedImport, 
CompilerOptions.IGNORE);
+        map.put(CompilerOptions.OPTION_Encoding, "UTF-8");
+        map.put(CompilerOptions.OPTION_LocalVariableAttribute, 
CompilerOptions.GENERATE);
+        map.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
+        map.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_1_4);
 
-    public static void main( String[] args ) {
+
+
+
+               settings.put(CompilerOptions.TARGET_VERSION, "1.4");
+               settings.put(CompilerOptions.SOURCE_VERSION, "1.4");
+
+               */
+               
+               /*
+       final URL[] classpath = {
+               new URL("a.jar"),
+               new URL("b.jar")
+       };
+       final URL[] classpath = settings.getClasspath();
+
+       final ClassLoader classloader = new URLClassLoader(classpath);
+        
+        final ResourceReader reader = new FileResourceReader(new 
File("srcdir"));
+        final ResourceStore store = new MemoryResourceStore();
+        
+        final String[] resources = new String[] {
+               "org/my/Test.java",
+               "org/my/Something.java"
+        };
         
-        final JavaCompiler compiler = 
JavaCompilerFactory.getInstance().createCompiler("eclipse");
-        if (compiler == null) {
-            System.out.println("Could not find compiler!");
-        } else {
-            System.out.println("Success!");
-        }
+        compiler.compile(resources, reader, store, classloader);
+               */
     }
 }

Modified: jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/pom.xml Sat Aug 12 
00:48:55 2006
@@ -16,7 +16,7 @@
        <artifactId>maven-jci-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
 
-       <name>Maven JCI Plugin</name>
+       <name>maven-jci-plugin</name>
 
        <build>
                <sourceDirectory>src/main/java</sourceDirectory>

Modified: 
jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
 (original)
+++ 
jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
 Sat Aug 12 00:48:55 2006
@@ -22,11 +22,13 @@
         */
        public void testCompilerBasic() throws Exception
        {
+/*
                JCIMojo jciMojo = 
getJCIMojo("target/test-classes/unit/compiler-basic-test/plugin-config.xml");
                jciMojo.execute();
                File testClass = new File(jciMojo.getOutputDirectory(),
                                "TestCompile0.class");
                assertTrue(testClass.exists());
+*/
        }
 
        private JCIMojo getJCIMojo(String pomXml) throws Exception

Modified: jakarta/commons/sandbox/jci/trunk/tests/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/tests/pom.xml?rev=430989&r1=430988&r2=430989&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/tests/pom.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/tests/pom.xml Sat Aug 12 00:48:55 2006
@@ -17,7 +17,7 @@
   <artifactId>commons-jci-tests</artifactId>
   <version>1.0-SNAPSHOT</version>
 
-  <name>Tests</name>
+  <name>tests</name>
 
   <build>
     <plugins>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to