Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7036

Modules of a Maven multimodule-build are not marked as FAILED/FAILURE in Hudson when dependencies cannot be resolved

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Maven 2 (does work with maven 3)

      If a Module of a multimodule Maven build fails during compile it is marked as FAILED in the reactor summary (end of the build). If a module fails due to nonresolvable dependencies (for example version that does not exist), it is marked as FAILED in the reactor summary, but in Hudson it gets the status SUCCESS (job.getBuildByNumber(number).getResult() == Result.SUCCESS) instead of FAILURE.

      Hudson console (reactor summary):

      [Info] TestProject3 ...................................... FAILED [0.244s]

      Plugin code:

      job.getBuildByNumber(number).getResult().toString() => SUCCESS

          [JENKINS-7036] Modules of a Maven multimodule-build are not marked as FAILED/FAILURE in Hudson when dependencies cannot be resolved

          dtriphaus created issue -

          dtriphaus added a comment -

          Does anyone care about this?

          dtriphaus added a comment - Does anyone care about this?

          kutzi added a comment -

          I assume you mean the maven2 job type? Then you should assign it to the maven2 component.

          kutzi added a comment - I assume you mean the maven2 job type? Then you should assign it to the maven2 component.

          dtriphaus added a comment -

          Yes, thanks for the hint, I assigned it to the maven2 component.

          dtriphaus added a comment - Yes, thanks for the hint, I assigned it to the maven2 component.
          dtriphaus made changes -
          Component/s New: maven2 [ 15487 ]
          Component/s Original: core [ 15593 ]

          dtriphaus added a comment -

          Hm nothing happened for about a month, anyone cares about open bugs?

          dtriphaus added a comment - Hm nothing happened for about a month, anyone cares about open bugs?

          kutzi added a comment -

          Would be good if you could attach a minimal project to reproduce the problem.

          Also: pull requests are welcome

          kutzi added a comment - Would be good if you could attach a minimal project to reproduce the problem. Also: pull requests are welcome

          kutzi added a comment -

          Without further info we cannot fix it.

          kutzi added a comment - Without further info we cannot fix it.
          kutzi made changes -
          Resolution New: Incomplete [ 4 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dtriphaus added a comment -

          There is no need for a special project to reproduce this, you can just use ANY multimodule project and just have to use a dependency with a non-existent version (so build fails during dependency analyzing). Then the console output says the project failed (see above description). But in the plugin code, using job.getBuildByNumber(currentBuildNumber).getResult().toString() returns SUCCESS. So programatically the plugin cannot determine wether the build failed or not. So in fact to test this you don't need a special maven project, just a multimodule build with 2 module (for example) and one module uses a non-existent dependency-version (i.e. log4j 3.0.0). Does this help you as further info?

          dtriphaus added a comment - There is no need for a special project to reproduce this, you can just use ANY multimodule project and just have to use a dependency with a non-existent version (so build fails during dependency analyzing). Then the console output says the project failed (see above description). But in the plugin code, using job.getBuildByNumber(currentBuildNumber).getResult().toString() returns SUCCESS. So programatically the plugin cannot determine wether the build failed or not. So in fact to test this you don't need a special maven project, just a multimodule build with 2 module (for example) and one module uses a non-existent dependency-version (i.e. log4j 3.0.0). Does this help you as further info?

            Unassigned Unassigned
            dtriphaus dtriphaus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: