You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2014/07/03 20:53:10 UTC

[jira] (MDEPLOY-173) Enhance the Maven Deploy Plugin to support Flat POM

     [ https://jira.codehaus.org/browse/MDEPLOY-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MDEPLOY-173.
----------------------------------

    Resolution: Won't Fix
      Assignee: Robert Scholte

This is not just a deploy-plugin issue, but also an install-plugin issue. Hence this is not the right place to solve this.
Instead you should use the [flatten-maven-plugin|http://mojo.codehaus.org/flatten-maven-plugin/]

> Enhance the Maven Deploy Plugin to support Flat POM
> ---------------------------------------------------
>
>                 Key: MDEPLOY-173
>                 URL: https://jira.codehaus.org/browse/MDEPLOY-173
>             Project: Maven Deploy Plugin
>          Issue Type: New Feature
>          Components: deploy:deploy
>            Reporter: Jack Jia
>            Assignee: Robert Scholte
>
> *Problem*
> The pom.xml has dual purpose.
>     1. Building and distributing a jar
>     2. Used by another project for dependency management.
> For #1 build and distribution, pom.xml makes good sense with many sections and hierarchies. In this case the main objective is dealing with sources and various aspects of build.
> For #2, lets say project B needs the jar produced by project A ( #1), the only things B needs from A  are,
>     1. jar files
>     2. dependencies of this jar file
> For #2 use-case, none of the sections or hierarchies of pom.xml make sense, except for <dependencies>.sections and GAV.
> Unfortunately maven simply copies the same pom.xml used for build to the repository for distribution.
> This problem gets complicated when there are pom hierarchies and <dependencyManagement> sections
> In such cases, to resolve the dependencies of an artifact, maven needs to use more than one pom.xml. This results in complex release and patch process and potential build time issues.
> *Solution*
> Enhance the maven deploy plugin to deploy a "flattened" pom that contains only GAV and <dependencies> section.
> The <dependencies> section contains, properly resolved direct dependencies of the artifact, which are the same of "pom hierarchy" direct dependencies.
> "flattened" pom means it cannot have any parent or any other sections that are not necessary while deploying the artifact.
> Note that we may need to add removeMetadata method to org.apache.maven.artifact.Artifact interface to remove the original pom metadata and then add the "flattened" pom metadata. I have created jira issue http://jira.codehaus.org/browse/MNG-5544 for this function
> *Acceptance Criteria*
> 1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" pom's dependencies version should be the same as versions of "pom hierachy".
> 2. "flatten" pom only contains GAV and <dependencies> section.
> 3. "flatten" pom only contains original direct dependencies, not including transitive dependencies.
> 4. "flatten" pom won't inherit from any parent pom.
> 5. "flatten" pom is only for artifact whose packaging is jar.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)