Commits

Artem Melentyev  committed 9e85acb Merge

update deps

  • Participants
  • Parent commits d0ca505, d4d6810
  • Branches jackpot

Comments (0)

Files changed (8)

File core/pom.xml

     <dependency>
       <groupId>com.google.inject</groupId>
       <artifactId>guice</artifactId>
-      <version>3.0-rc3</version>
+      <version>3.0</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

File demo/pom.xml

   <version>0.2-SNAPSHOT</version>
   <description>Standalone project for demonstrate how to use juast with maven</description>
   <properties>
-    <juast.version>0.1</juast.version>
+    <juast.version>0.2-SNAPSHOT</juast.version>
   </properties>
   <dependencies>
     <dependency>
           <version>2.3.2-fix62</version> <!-- corrected 2.3.2 version for support multiple compiler args -->
           <configuration>
             <!-- Annotation processing works only on JDK 1.6+ -->
-            <source>1.6</source>
-            <target>1.6</target>
+            <source>1.7</source>
+            <target>1.7</target>
             <!-- Show warnings produced by juast -->
             <showWarnings>true</showWarnings>
             <!-- juast configuration -->

File ecj/src/main/java/juast/ecj/EcjAnnotationProcessorProxy.java

  * Because javac can't create {@link EcjAnnotationProcessor} dirrectly.
  */
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 @SupportedOptions("juast.process")
 public class EcjAnnotationProcessorProxy extends AbstractProcessor {
 	private static boolean isSupported(ProcessingEnvironment processingEnv) {

File javac/src/main/java/juast/javac/JavacAnnotationProcessor.java

 			getProcessingEnv().getContext().put(TaskListener.class, newTaskListener);
 		}
 		
+		try { // protect classloader from closing
+			Field f = getProcessingEnv().getClass().getDeclaredField("processorClassLoader");
+			f.setAccessible(true);
+			ClassLoader cl = (ClassLoader) f.get(getProcessingEnv());
+			cl = new ClassLoader(cl) {};
+			f.set(getProcessingEnv(), cl);
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
 		return false;
 	}
 

File javac/src/main/java/juast/javac/JavacAnnotationProcessorProxy.java

 import javax.lang.model.element.TypeElement;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 @SupportedOptions("juast.process")
 public class JavacAnnotationProcessorProxy extends AbstractProcessor {
 
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.3.2-fix62</version>
           <configuration>
-            <source>1.6</source>
-            <target>1.6</target>
+            <source>1.7</source>
+            <target>1.7</target>
           </configuration>
         </plugin>
         <plugin>
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>4.8.2</version>
+        <version>4.10</version>
       </dependency>
       <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
-        <version>2.0.1</version>
+        <version>2.3</version>
       </dependency>
       <dependency>
         <groupId>commons-lang</groupId>
       <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
-        <version>1.8.5</version>
+        <version>1.9.0</version>
       </dependency>
       <dependency>
         <groupId>org.eclipse.jdt.core.compiler</groupId>
         <artifactId>ecj</artifactId>
-        <version>3.6.1</version>
+        <version>3.7.2</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
   </pluginRepositories>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <netbeans.version>RELEASE70-BETA</netbeans.version>
+    <netbeans.version>RELEASE712</netbeans.version>
   </properties>
   <scm>
     <connection>scm:hg:https://bitbucket.org/amelentev/juast</connection>

File processors/src/main/java/juast/processors/SystemOutPrintlnProcessor.java

 	public static String errorMessage = "using System.out.println is bad practice";
 	
 	@Override
-	public void afterAnalyse(final CompilationUnit cu) {
+	public void afterParse(final CompilationUnit cu) {
 		cu.accept(new SuppressWarningsVisitor() {
 			@Override
 			public boolean enter(MethodInvExpr node) {

File processors/src/test/java/juast/processors/AProcessorTest.java

 	}
 
 	Set<String> ignoredKeys = new HashSet<String>(Arrays.asList(
+			null, // XXX: Eclipse 3.7 messager
 			"compiler.note.proc.messager", 
 			"compiler.warn.proc.use.proc.or.implicit",
 			"compiler.warn.proc.unmatched.processor.options",