maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (MDEPLOY-173) Enhance the Maven Deploy Plugin to support Flat POM
Date Sun, 16 Oct 2016 22:01:20 GMT


ASF GitHub Bot commented on MDEPLOY-173:

Github user gmcdonald closed the pull request at:

> Enhance the Maven Deploy Plugin to support Flat POM
> ---------------------------------------------------
>                 Key: MDEPLOY-173
>                 URL:
>             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
> This problem gets complicated when there are pom hierarchies and <dependencyManagement>
> 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 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
> 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

View raw message