You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason Melnick (JIRA)" <ji...@codehaus.org> on 2007/01/09 21:29:21 UTC

[jira] Created: (MNG-2751) Resource inheritance isn't additive

Resource inheritance isn't additive
-----------------------------------

                 Key: MNG-2751
                 URL: http://jira.codehaus.org/browse/MNG-2751
             Project: Maven 2
          Issue Type: Bug
          Components: Inheritance and Interpolation
    Affects Versions: 2.0.4
         Environment: All
            Reporter: Jason Melnick


I have an inheritance model as such:

Parent_POM (General dependencyManagement, pluginManagement, etc)
|-->Base_POM (global dependency inclusion, default goal, default plugins, etc)
     |-->Artifact_POM (declares specific artifact type functionality, resources, profiles, etc)
          |-->Project_POM (project specific dependencies, resources, etc)

I am attempting to create an hierarchy that will enable a new project to get up and running with very little modification. The issue I am having is if build.resources are declared in the Project_POM they are wiping the Artifact_POM's declarations.

I think that resources should always be additive. If nothing else add an <inherited> tag a la the plugin element's <inherited> tag. In lieu of that perhaps a resourceManagement section that exposes resource id's that could be selectively added by the child...

-- 
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

        

[jira] Commented: (MNG-2751) Resource inheritance isn't additive

Posted by "daniel carter (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280347#comment-280347 ] 

daniel carter commented on MNG-2751:
------------------------------------

and an flag to allow merging, as happens for other pom elements.

You should be able to specify

        <resources parent="merge">
            <resource><directory>src/main/licence</directory></resource>
        </resources>

instead of this monstrosity - no wonder maven gets a reputation for verbosity!

        <plugins>
            <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>add-resource</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <resources>
                    <resource><directory>src/main/licence</directory></resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>


> Resource inheritance isn't additive
> -----------------------------------
>
>                 Key: MNG-2751
>                 URL: https://jira.codehaus.org/browse/MNG-2751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>         Environment: All
>            Reporter: Jason Melnick
>             Fix For: Issues to be reviewed for 3.x
>
>
> I have an inheritance model as such:
> Parent_POM (General dependencyManagement, pluginManagement, etc)
> |-->Base_POM (global dependency inclusion, default goal, default plugins, etc)
>      |-->Artifact_POM (declares specific artifact type functionality, resources, profiles, etc)
>           |-->Project_POM (project specific dependencies, resources, etc)
> I am attempting to create an hierarchy that will enable a new project to get up and running with very little modification. The issue I am having is if build.resources are declared in the Project_POM they are wiping the Artifact_POM's declarations.
> I think that resources should always be additive. If nothing else add an <inherited> tag a la the plugin element's <inherited> tag. In lieu of that perhaps a resourceManagement section that exposes resource id's that could be selectively added by the child...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2751) Resource inheritance isn't additive

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-2751:
------------------------------

    Fix Version/s:     (was: Reviewed Pending Version Assignment)
                   3.x

> Resource inheritance isn't additive
> -----------------------------------
>
>                 Key: MNG-2751
>                 URL: http://jira.codehaus.org/browse/MNG-2751
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>         Environment: All
>            Reporter: Jason Melnick
>             Fix For: 3.x
>
>
> I have an inheritance model as such:
> Parent_POM (General dependencyManagement, pluginManagement, etc)
> |-->Base_POM (global dependency inclusion, default goal, default plugins, etc)
>      |-->Artifact_POM (declares specific artifact type functionality, resources, profiles, etc)
>           |-->Project_POM (project specific dependencies, resources, etc)
> I am attempting to create an hierarchy that will enable a new project to get up and running with very little modification. The issue I am having is if build.resources are declared in the Project_POM they are wiping the Artifact_POM's declarations.
> I think that resources should always be additive. If nothing else add an <inherited> tag a la the plugin element's <inherited> tag. In lieu of that perhaps a resourceManagement section that exposes resource id's that could be selectively added by the child...

-- 
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

        

[jira] Commented: (MNG-2751) Resource inheritance isn't additive

Posted by "Jason Shao (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224758#action_224758 ] 

Jason Shao commented on MNG-2751:
---------------------------------

Still the case as of 2.2.1 - though I can't change the Affect Versions. If this is not going to be addressed, I'd like to get the documentation fixed, from http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

> Resource inheritance isn't additive
> -----------------------------------
>
>                 Key: MNG-2751
>                 URL: http://jira.codehaus.org/browse/MNG-2751
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>         Environment: All
>            Reporter: Jason Melnick
>             Fix For: Issues to be reviewed for 3.x
>
>
> I have an inheritance model as such:
> Parent_POM (General dependencyManagement, pluginManagement, etc)
> |-->Base_POM (global dependency inclusion, default goal, default plugins, etc)
>      |-->Artifact_POM (declares specific artifact type functionality, resources, profiles, etc)
>           |-->Project_POM (project specific dependencies, resources, etc)
> I am attempting to create an hierarchy that will enable a new project to get up and running with very little modification. The issue I am having is if build.resources are declared in the Project_POM they are wiping the Artifact_POM's declarations.
> I think that resources should always be additive. If nothing else add an <inherited> tag a la the plugin element's <inherited> tag. In lieu of that perhaps a resourceManagement section that exposes resource id's that could be selectively added by the child...

-- 
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