You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2005/08/13 21:04:57 UTC

[jira] Created: (MNG-732) Improve plugin configuration property merge algorithm

Improve plugin configuration property merge algorithm
-----------------------------------------------------

         Key: MNG-732
         URL: http://jira.codehaus.org/browse/MNG-732
     Project: Maven 2
        Type: Improvement
  Components: maven-core  
    Versions: 2.0-alpha-3    
 Reporter: Vincent Massol


If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:

My parent POM:

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemProperties>

              <property>
                <name>cargo.resin3x.port</name>
                <value>8280</value>
              </property>
              <property>
                <name>cargo.resin3x.url</name>
                <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
              </property>

            </systemProperties>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

My child POM:

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>

            <!-- Default list of containers to run on. If you want to shorten or change the
                 execution of 'samples', simply specify a shorter list of containers on the
                 command line or in your settings -->
            <property>
              <name>cargo.containers</name>
              <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
            </property>

            <!-- Location where to download and install the containers for the tests -->
            <property>
              <name>cargo.install.dir</name>
              <value>${basedir}/../../target/installs</value>
            </property>

          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>

It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_45353 ] 

Vincent Massol commented on MNG-732:
------------------------------------

John,

I'm trying to use this feature with the example above and when I run my build with -X I get:

[DEBUG] Setting system property [cargo.containers]=[resin3x, orion2x, tomcat5x, jetty4xEmbedded]
[DEBUG] Setting system property [cargo.install.dir]=[C:\dev\cargo\samples\java/../../target/installs]

Unfortunately the other properties (cargo.resin3x.port and cargo.resin3x.url) do not seem to be set.

Any idea?

Thanks

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>        Time Spent: 2 hours
>         Remaining: 0 minutes
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_44442 ] 

Vincent Massol commented on MNG-732:
------------------------------------

yes, an override attribute sounds good so that merge is the default.

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>      Fix For: 2.0-beta-1

>
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_45357 ] 

Brett Porter commented on MNG-732:
----------------------------------

Vincent, please reopen if you think it is not working. How does your use case differ from it0060? Can you enhance the it?

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>        Time Spent: 2 hours
>         Remaining: 0 minutes
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]

John Casey updated MNG-732:
---------------------------

    Remaining Estimate: 3 hours  (was: 8 hours)
     Original Estimate: 10800  (was: 28800)

since this is mostly a plexus fix, the hours on this end are basically just for testing...

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>         Remaining: 3 hours
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]

John Casey updated MNG-732:
---------------------------

    Remaining Estimate: 8 hours  (was: 1 day)
     Original Estimate: 28800  (was: 86400)

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 8 hours
>         Remaining: 8 hours
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]

Brett Porter updated MNG-732:
-----------------------------

    Priority: Critical  (was: Major)

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]

Brett Porter updated MNG-732:
-----------------------------

    Fix Version: 2.0-beta-1

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>      Fix For: 2.0-beta-1

>
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]
     
John Casey closed MNG-732:
--------------------------

    Resolution: Fixed

see it0060

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>        Time Spent: 2 hours
>         Remaining: 0 minutes
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_44410 ] 

Vincent Massol commented on MNG-732:
------------------------------------

I think I may have traced it to line 278 of ModelUtils in maven-core:

        Xpp3Dom childConfiguration = (Xpp3Dom) child.getConfiguration();
        Xpp3Dom parentConfiguration = (Xpp3Dom) parent.getConfiguration();

        childConfiguration = Xpp3Dom.mergeXpp3Dom( childConfiguration, parentConfiguration );

Which itself leads to the following method from plexus-util/Xpp3Dom.java in Plexus:

    private static void mergeIntoXpp3Dom( Xpp3Dom dominant, Xpp3Dom recessive )
    {
        // TODO: how to mergeXpp3Dom lists rather than override?
        // TODO: share this as some sort of assembler, implement a walk interface?
        if ( recessive == null )
        {
            return;
        }

        Xpp3Dom[] children = recessive.getChildren();
        for ( int i = 0; i < children.length; i++ )
        {
            Xpp3Dom child = children[i];
            Xpp3Dom childDom = dominant.getChild( child.getName() );
            if ( childDom != null )
            {
                mergeIntoXpp3Dom( childDom, child );
            }
            else
            {
                dominant.addChild( new Xpp3Dom( child ) );
            }
        }
    }

Does my use case correspond to the first todo item in the code?


> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol

>
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_45371 ] 

Vincent Massol commented on MNG-732:
------------------------------------

No, it was just me not knowing how to use it. I had somehow imagine inheritance would have been automatic and you would only need to specify an attribute for not inheriting...

So it's working even though I find it a tad complex to have to specify an <inheritance> object in the parent's POM and an attribute in the child project. But I'm sure you've weighted pros and cons before reaching this conclusion so that's probably fine...

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>        Time Spent: 2 hours
>         Remaining: 0 minutes
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_45382 ] 

Brett Porter commented on MNG-732:
----------------------------------

I thought inherited=true was the default too, but I do remember we discussed the pros and cons and I trust John to have implemented what we agreed at the time and my memory to have failed me (that part was a while ago)

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 3 hours
>        Time Spent: 2 hours
>         Remaining: 0 minutes
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-732?page=comments#action_44438 ] 

Brett Porter commented on MNG-732:
----------------------------------

yes, this is the first TODO.

I guess the reason I haven't jumped in is that we might need to consider whether it needs to be able to override in some cases instead of merge. Got any suggestions for syntax?

maybe:

<excludes override="true">

?



> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol

>
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-732) Improve plugin configuration property merge algorithm

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-732?page=all ]

John Casey updated MNG-732:
---------------------------

             Assign To: John Casey
            Complexity: Expert  (was: Intermediate)
    Remaining Estimate: 1 day
     Original Estimate: 86400

need fix +tests...this will require fix in plexus-utils, so I'll file an issue there and link to this.

> Improve plugin configuration property merge algorithm
> -----------------------------------------------------
>
>          Key: MNG-732
>          URL: http://jira.codehaus.org/browse/MNG-732
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-core
>     Versions: 2.0-alpha-3
>     Reporter: Vincent Massol
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
> Original Estimate: 1 day
>         Remaining: 1 day
>
> If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:
> My parent POM:
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <configuration>
>             <systemProperties>
>               <property>
>                 <name>cargo.resin3x.port</name>
>                 <value>8280</value>
>               </property>
>               <property>
>                 <name>cargo.resin3x.url</name>
>                 <value>http://www.caucho.com/download/resin-3.0.9.zip</value>
>               </property>
>             </systemProperties>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> My child POM:
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <systemProperties>
>             <!-- Default list of containers to run on. If you want to shorten or change the
>                  execution of 'samples', simply specify a shorter list of containers on the
>                  command line or in your settings -->
>             <property>
>               <name>cargo.containers</name>
>               <value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
>             </property>
>             <!-- Location where to download and install the containers for the tests -->
>             <property>
>               <name>cargo.install.dir</name>
>               <value>${basedir}/../../target/installs</value>
>             </property>
>           </systemProperties>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
> It sounds a reasonable expectations that the system properties will get merged.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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