svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Torsten Curdt
Author: tcurdt
Date: Wed Nov  9 15:46:18 2005
New Revision: 332178

URL: http://svn.apache.org/viewcvs?rev=332178&view=rev
Log:
some fixes from Mark Proctor

Modified:
    jakarta/commons/sandbox/jci/trunk/project.xml
    jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
    jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Modified: jakarta/commons/sandbox/jci/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/project.xml?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/project.xml (original)
+++ jakarta/commons/sandbox/jci/trunk/project.xml Wed Nov  9 15:46:18 2005
@@ -74,6 +74,11 @@
       <id>jheinicke</id>
       <email>joerg.heinicke at gmx.de</email>
     </contributor>
+    <contributor>
+      <name>Mark Proctor</name>
+      <id>mprotor</id>
+      <email>mproctor at codehaus.org</email>
+    </contributor>
   </contributors>
 
   <dependencies>

Modified: jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java Wed Nov  9 15:46:18 2005
@@ -19,16 +19,13 @@
                               final ResourceStore pStore
                               ) {
         
-        ClassLoader classLoader = null;
-
-        classLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         
-        if ( classLoader == null ) {
+        if (classLoader == null) {
             classLoader = this.getClass().getClassLoader();
         }
-
         
-        return compile( pClazzNames, pReader, pStore, classLoader );              
+        return compile(pClazzNames, pReader, pStore, classLoader);
     }
     
 }

Modified: jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java?rev=332178&r1=332177&r2=332178&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java (original)
+++ jakarta/commons/sandbox/jci/trunk/src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java Wed Nov  9 15:46:18 2005
@@ -1,6 +1,5 @@
 package org.apache.commons.jci.compilers.groovy;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -35,7 +34,7 @@
     
         final CompilerConfiguration configuration = new CompilerConfiguration();
         final ErrorCollector collector = new ErrorCollector(configuration);
-        final CompilationUnit unit = new CompilationUnit(configuration);
+        final CompilationUnit unit = new CompilationUnit(configuration, null, classLoader);
         final SourceUnit[] source = new SourceUnit[clazzNames.length];
         for (int i = 0; i < source.length; i++) {
             final String filename = clazzNames[i].replace('.','/') + ".groovy";
@@ -59,9 +58,8 @@
             final List classes = unit.getClasses();
             for (final Iterator it = classes.iterator(); it.hasNext();) {
                 final GroovyClass clazz = (GroovyClass) it.next();
-                final String name = clazz.getName().replace('.', File.separatorChar) + ".class";
                 final byte[] bytes = clazz.getBytes();
-                store.write(name, bytes);
+                store.write(clazz.getName(), bytes);
             }
         } catch (final MultipleCompilationErrorsException e) {
             final ErrorCollector col = e.getErrorCollector();



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Brett Porter-2
> Modified: jakarta/commons/sandbox/jci/trunk/project.xml
> URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/project.xml?rev=332178&r1=332177&r2=332178&view=diff
> ==============================================================================
> --- jakarta/commons/sandbox/jci/trunk/project.xml (original)
> +++ jakarta/commons/sandbox/jci/trunk/project.xml Wed Nov  9 15:46:18 2005
> @@ -74,6 +74,11 @@
>        <id>jheinicke</id>
>        <email>joerg.heinicke at gmx.de</email>
>      </contributor>
> +    <contributor>
> +      <name>Mark Proctor</name>
> +      <id>mprotor</id>
> +      <email>mproctor at codehaus.org</email>
> +    </contributor>
>    </contributors>
>  
>    <dependencies>
>

id is an invalid element for a contributor (you can't just make them up :)

It's meant to be the scm username (yes, it should be renamed...)

- Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Torsten Curdt

>> +    <contributor>
>> +      <name>Mark Proctor</name>
>> +      <id>mprotor</id>
>> +      <email>mproctor at codehaus.org</email>
>> +    </contributor>
>>    </contributors>
>>     <dependencies>
>
> id is an invalid element for a contributor (you can't just make  
> them up :)
Hm... copy & past ...cannot remember where it came from in the first  
place.
Anyway - thanks for the headsup!

> It's meant to be the scm username (yes, it should be renamed...)

;-)

Wondering: why isn't the pom checked against a DTD/Schema anyway?

cheers
--
Torsten



PGP.sig (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r332178 - in /jakarta/commons/sandbox/jci/trunk: project.xml src/java/org/apache/commons/jci/compilers/AbstractJavaCompiler.java src/java/org/apache/commons/jci/compilers/groovy/GroovyJavaCompiler.java

Mark Proctor-4
No idea, I think this is only errorring out on me because I'm using
Maven 1.1 - prior to that I think it was just deprecated and ignored.

Mark
Torsten Curdt wrote:

>
>>> +    <contributor>
>>> +      <name>Mark Proctor</name>
>>> +      <id>mprotor</id>
>>> +      <email>mproctor at codehaus.org</email>
>>> +    </contributor>
>>>    </contributors>
>>>     <dependencies>
>>
>> id is an invalid element for a contributor (you can't just make them
>> up :)
>
> Hm... copy & past ...cannot remember where it came from in the first
> place.
> Anyway - thanks for the headsup!
>
>> It's meant to be the scm username (yes, it should be renamed...)
>
> ;-)
>
> Wondering: why isn't the pom checked against a DTD/Schema anyway?
>
> cheers
> --
> Torsten
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]