[ 
https://issues.apache.org/jira/browse/MNG-6123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gregor B. Rosenauer updated MNG-6123:
-------------------------------------
    Description: 
Maven does not detect self references in a POM and tries to download the 
artifact it is about to build, which makes no sense and should result in an 
early error and abort of the build.

E.g. sample POM:
{code}
    <groupId>org.my.acme</groupId>
    <artifactId>my-module</artifactId>
    <version>1.2.3</version>
    <dependencies>
        ...
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>my-module</artifactId>
            <version>${project.version}</version>
        <dependency>
    <dependencies>
{code}
Maven tries to download my-module.jar but obviously fails...

  was:
Maven does not detect self references in a POM and tries to download the 
artifact it is about to build, which makes no sense and should result in an 
early error and abort of the build.

E.g. pseudo POM:
{code}
    <groupId>org.my.acme</groupId>
    <artifactId>my-module</artifactId>
    <version>1.2.3</version>
    <dependencies>
        ...
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>my-module</artifactId>
            <version>${project.version}</version>
        <dependency>
    <dependencies>
{code}
Maven tries to download my-module.jar but obviously fails...


> detect self references in POM and fail fast
> -------------------------------------------
>
>                 Key: MNG-6123
>                 URL: https://issues.apache.org/jira/browse/MNG-6123
>             Project: Maven
>          Issue Type: Improvement
>          Components: Bootstrap & Build, Dependencies
>    Affects Versions: 3.3.9
>         Environment: Oracle JDK 1.8.0_111 on Linux 4.8 x64
>            Reporter: Gregor B. Rosenauer
>            Priority: Minor
>              Labels: build, easyfix
>
> Maven does not detect self references in a POM and tries to download the 
> artifact it is about to build, which makes no sense and should result in an 
> early error and abort of the build.
> E.g. sample POM:
> {code}
>     <groupId>org.my.acme</groupId>
>     <artifactId>my-module</artifactId>
>     <version>1.2.3</version>
>     <dependencies>
>         ...
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>my-module</artifactId>
>             <version>${project.version}</version>
>         <dependency>
>     <dependencies>
> {code}
> Maven tries to download my-module.jar but obviously fails...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to