You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ah...@apache.org on 2005/07/20 01:37:42 UTC

svn commit: r219812 - /maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java

Author: aheritier
Date: Tue Jul 19 16:37:42 2005
New Revision: 219812

URL: http://svn.apache.org/viewcvs?rev=219812&view=rev
Log:
fix MAVEN-1646 : Jelly tag "maven:pom" doesn't use inheritance  

Modified:
    maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java

Modified: maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java
URL: http://svn.apache.org/viewcvs/maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java?rev=219812&r1=219811&r2=219812&view=diff
==============================================================================
--- maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java (original)
+++ maven/maven-1/core/trunk/src/java/org/apache/maven/jelly/tags/maven/PomTag.java Tue Jul 19 16:37:42 2005
@@ -27,6 +27,8 @@
 
 /**
  * MavenSession Jelly tag that creates a POM instance.
+ * By default, the inheritance in the POM isn't used.
+ * You must use the attribute useInheritance to activate it.
  *
  * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
  * @version $Id$
@@ -39,6 +41,9 @@
 
     /** Name of var to give the project object. */
     private String var;
+    
+    /** Define if the pom must use the inheritance. */
+    private boolean useInheritance;
 
     /**
      * Set MavenSession project descriptor.
@@ -59,6 +64,15 @@
     {
         this.var = var;
     }
+    
+    /**
+     * Define if the pom must use the inheritance. 
+     * Setted to false by default to keep a backward compatibility.
+     * @param useInheritance true if the pom object must use the inheritance.
+     */
+    public void setUseInheritance(boolean useInheritance){
+        this.useInheritance = useInheritance;
+    }
 
     /**
      * Perform functionality provided by the tag
@@ -79,7 +93,7 @@
             context.setVariable( var,
                                  MavenUtils.getProject( projectDescriptor,
                                                         getMavenContext(),
-                                                        false ) );
+                                                        useInheritance) );
         }
         catch ( Exception e )
         {



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