Author: mkleint
Date: Sun Jan 20 12:38:58 2008
New Revision: 613673

URL: http://svn.apache.org/viewvc?rev=613673&view=rev
Log:
604980 doesn't seem to work when plugin accesses the field by reflection. 

See:
Caused by: java.lang.NoSuchFieldException: processedProjectCache
        at java.lang.Class.getDeclaredField(Class.java:1854)
        at 
org.apache.maven.shared.repository.DefaultRepositoryAssembler.invalidateProccessedProjectCache(DefaultRepositoryAssembler.java:495)

Modified:
    
maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
    
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: 
maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj?rev=613673&r1=613672&r2=613673&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
 (original)
+++ 
maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/compat/Maven20xProjectCompatAspect.aj
 Sun Jan 20 12:38:58 2008
@@ -10,6 +10,8 @@
 
     //DO NOT USE, it is here only for backward compatibility reasons. The 
existing
     // maven-assembly-plugin (2.2-beta-1) is accessing it via reflection.
-    private Map DefaultMavenProjectBuilder.processedProjectCache = new 
HashMap();
+
+// the aspect weaving seems not to work for reflection from plugin.
+//    private Map DefaultMavenProjectBuilder.processedProjectCache = new 
HashMap();
 
 }

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=613673&r1=613672&r2=613673&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Sun Jan 20 12:38:58 2008
@@ -159,6 +159,13 @@
     private ProfileAdvisor profileAdvisor;
 
     private MavenTools mavenTools;
+    
+    //DO NOT USE, it is here only for backward compatibility reasons. The 
existing
+    // maven-assembly-plugin (2.2-beta-1) is accessing it via reflection.
+
+// the aspect weaving seems not to work for reflection from plugin.
+    private Map processedProjectCache = new HashMap();
+    
 
     public static final String MAVEN_MODEL_VERSION = "4.0.0";
 


Reply via email to