You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nick Stolwijk (JIRA)" <ji...@codehaus.org> on 2009/10/20 15:26:26 UTC

[jira] Created: (MDEP-236) analyze-dep-mgt doesn't fail on version mismatches while failbuild is set

analyze-dep-mgt doesn't fail on version mismatches while failbuild is set
-------------------------------------------------------------------------

                 Key: MDEP-236
                 URL: http://jira.codehaus.org/browse/MDEP-236
             Project: Maven 2.x Dependency Plugin
          Issue Type: Improvement
          Components: analyze
    Affects Versions: 2.1, 2.0
            Reporter: Nick Stolwijk
            Assignee: Brian Fox
         Attachments: test-artifact.tar.gz

Even if failBuild is set to true, the builds still succeeds if there is a version mismatch.

Output with attached pom:

[INFO] [dependency:analyze-dep-mgt {execution: analyze}]
[INFO] Found Resolved Dependency / DependencyManagement mismatches:
[INFO]  Dependency: junit:junit:jar
[INFO]          DepMgt  : 3.7.9
[INFO]          Resolved: 3.8.1
[INFO]    None
[INFO] [install:install {execution: default-install}]
[INFO] Installing /tmp/test-artifact/target/test-artifact-1.0-SNAPSHOT.jar to /home/nick/.m2/repository/org/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Tue Oct 20 13:56:19 CEST 2009
[INFO] Final Memory: 21M/39M

-- 
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] Updated: (MDEP-236) analyze-dep-mgt doesn't fail on version mismatches while failbuild is set

Posted by "werner mueller (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

werner mueller updated MDEP-236:
--------------------------------

    Attachment: hierarch-test.zip

added a small test-project:

pom.xml -> 'company parent pom', install first
/project
/project/pom.xml -> project parent pom
/project/modules...

i've played with the hibernate versions. depending whether the version is defined in the company parent pom (depMgmt) and the project parent pom (depMgmt) the plugin can detect the wrong version or it cant. In neither case does the build fail.

if the depMgmt section in project parent pom does not overwrite the one from the company parent the detection works, but the build does not fail.
if the project parent pom overwrites the company parent pom depMgmt section then the wrong version is not detected.


> analyze-dep-mgt doesn't fail on version mismatches while failbuild is set
> -------------------------------------------------------------------------
>
>                 Key: MDEP-236
>                 URL: http://jira.codehaus.org/browse/MDEP-236
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Improvement
>          Components: analyze
>    Affects Versions: 2.0, 2.1
>            Reporter: Nick Stolwijk
>            Assignee: Brian Fox
>         Attachments: hierarch-test.zip, test-artifact.tar.gz
>
>
> Even if failBuild is set to true, the builds still succeeds if there is a version mismatch.
> Output with attached pom:
> [INFO] [dependency:analyze-dep-mgt {execution: analyze}]
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]  Dependency: junit:junit:jar
> [INFO]          DepMgt  : 3.7.9
> [INFO]          Resolved: 3.8.1
> [INFO]    None
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /tmp/test-artifact/target/test-artifact-1.0-SNAPSHOT.jar to /home/nick/.m2/repository/org/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Oct 20 13:56:19 CEST 2009
> [INFO] Final Memory: 21M/39M

-- 
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] Updated: (MDEP-236) analyze-dep-mgt doesn't fail on version mismatches while failbuild is set

Posted by "Andrey Vorobiev (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Vorobiev updated MDEP-236:
---------------------------------

    Attachment: AnalyzeDepMgt.patch

Hi, guys.

What's about applying AnalyzeDepMgt.patch (see attachment) to org.apache.maven.plugin.dependency.AnalyzeDepMgt? This patch fails build process if any version mismatch does exist. Or maybe providing another facilities to resolve issues described above?

> analyze-dep-mgt doesn't fail on version mismatches while failbuild is set
> -------------------------------------------------------------------------
>
>                 Key: MDEP-236
>                 URL: http://jira.codehaus.org/browse/MDEP-236
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Improvement
>          Components: analyze
>    Affects Versions: 2.0, 2.1
>            Reporter: Nick Stolwijk
>            Assignee: Brian Fox
>         Attachments: AnalyzeDepMgt.patch, hierarch-test.zip, test-artifact.tar.gz
>
>
> Even if failBuild is set to true, the builds still succeeds if there is a version mismatch.
> Output with attached pom:
> [INFO] [dependency:analyze-dep-mgt {execution: analyze}]
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]  Dependency: junit:junit:jar
> [INFO]          DepMgt  : 3.7.9
> [INFO]          Resolved: 3.8.1
> [INFO]    None
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /tmp/test-artifact/target/test-artifact-1.0-SNAPSHOT.jar to /home/nick/.m2/repository/org/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Oct 20 13:56:19 CEST 2009
> [INFO] Final Memory: 21M/39M

-- 
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: (MDEP-236) analyze-dep-mgt doesn't fail on version mismatches while failbuild is set

Posted by "Dan Tran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204919#action_204919 ] 

Dan Tran commented on MDEP-236:
-------------------------------

after unpack the test file, pom.xml is not readable, please resubmit another test file

> analyze-dep-mgt doesn't fail on version mismatches while failbuild is set
> -------------------------------------------------------------------------
>
>                 Key: MDEP-236
>                 URL: http://jira.codehaus.org/browse/MDEP-236
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Improvement
>          Components: analyze
>    Affects Versions: 2.0, 2.1
>            Reporter: Nick Stolwijk
>            Assignee: Brian Fox
>         Attachments: test-artifact.tar.gz
>
>
> Even if failBuild is set to true, the builds still succeeds if there is a version mismatch.
> Output with attached pom:
> [INFO] [dependency:analyze-dep-mgt {execution: analyze}]
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]  Dependency: junit:junit:jar
> [INFO]          DepMgt  : 3.7.9
> [INFO]          Resolved: 3.8.1
> [INFO]    None
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /tmp/test-artifact/target/test-artifact-1.0-SNAPSHOT.jar to /home/nick/.m2/repository/org/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Oct 20 13:56:19 CEST 2009
> [INFO] Final Memory: 21M/39M

-- 
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: (MDEP-236) analyze-dep-mgt doesn't fail on version mismatches while failbuild is set

Posted by "a (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232214#action_232214 ] 

a commented on MDEP-236:
------------------------

It seems that dev team have forgotten about this issue, but the problem it addresses is important for big projects.

See class AnalyzeDepMgt. There is not "foundError = true;" statement if there is a version mismatch (AnalyzeDepMgt:166-174, http://svn.apache.org/viewvc/maven/plugins/tags/maven-dependency-plugin-2.1/src/main/java/org/apache/maven/plugin/dependency/AnalyzeDepMgt.java?view=markup)

So all exclusion errors in fact do fail build, but version mismatches do not. This issue is important if you have a big project with many modules and you deploy them all into single JVM (for example - a webapp) and resolved dependencies versions may differ from required ones (this may be inacceptable for enterpise scale app). So you try to make a single parent pom and list allowed dependency versions in it using depMgt section. So all modules inherit depMgt section and may report version mismatches. And so it would be usefull if build can be failed explicitly if such a mismatch detected.

> analyze-dep-mgt doesn't fail on version mismatches while failbuild is set
> -------------------------------------------------------------------------
>
>                 Key: MDEP-236
>                 URL: http://jira.codehaus.org/browse/MDEP-236
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Improvement
>          Components: analyze
>    Affects Versions: 2.0, 2.1
>            Reporter: Nick Stolwijk
>            Assignee: Brian Fox
>         Attachments: test-artifact.tar.gz
>
>
> Even if failBuild is set to true, the builds still succeeds if there is a version mismatch.
> Output with attached pom:
> [INFO] [dependency:analyze-dep-mgt {execution: analyze}]
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]  Dependency: junit:junit:jar
> [INFO]          DepMgt  : 3.7.9
> [INFO]          Resolved: 3.8.1
> [INFO]    None
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /tmp/test-artifact/target/test-artifact-1.0-SNAPSHOT.jar to /home/nick/.m2/repository/org/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Oct 20 13:56:19 CEST 2009
> [INFO] Final Memory: 21M/39M

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