Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6411

Improve readability of project list returned when --resume-from option value is invalid

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.3
    • Fix Version/s: 3.5.4
    • Component/s: Command Line
    • Labels:
      None

      Description

      When value passed for -rf option is invalid, a full list of details of all projects in build is returned.

      This list contains too much information. For every project it includes groupId, artifactId, version and pom location. While it is useful for debugging purposes many, if not most, developers are interested in specific coordinate (groupId:artifactId) which should be passed to next execution, and which is valid -rf optional value.

      Note that below outputs contain new lines for ease of read. This could be also added to exception message to make it more readable.

      Assuming, that I've passed -rf :x Current output in case of failure:

      ERROR] Could not find project to resume reactor build from: :x vs [
      	MavenProject: com.example:foobar:1.0.0-SNAPSHOT @ ~/sources/foobar/pom.xml,
      	MavenProject: com.example.foobar:parent:1.0.0-SNAPSHOT @ ~/sources/foobar/parent/pom.xml,
      	MavenProject: com.example.foobar:api:1.0.0-SNAPSHOT @ ~/sources/foobar/api/pom.xml,
      	MavenProject: com.example.foobar:model:1.0.0-SNAPSHOT @ ~/sources/foobar/model/pom.xml,
      	MavenProject: com.example.foobar:csv:1.0.0-SNAPSHOT @ ~/sources/foobar/csv/pom.xml,
      	MavenProject: com.example.foobar.csv:model:1.0.0-SNAPSHOT @ ~/sources/foobar/csv/model/pom.xml,
      	MavenProject: com.example.foobar.csv:api:1.0.0-SNAPSHOT @ ~/sources/foobar/csv/api/pom.xml,
      	MavenProject: com.example.foobar:json:1.0.0-SNAPSHOT @ ~/sources/foobar/json/pom.xml,
      	MavenProject: com.example.foobar.json:model:1.0.0-SNAPSHOT @ ~/sources/foobar/json/model/pom.xml,
      	MavenProject: com.example.foobar.json:api:1.0.0-SNAPSHOT @ ~/sources/foobar/json/api/pom.xml,
      	MavenProject: com.example.foobar.json:core:1.0.0-SNAPSHOT @ ~/sources/foobar/json/core/pom.xml,
      	MavenProject: com.example.foobar:fax:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/pom.xml,
      	MavenProject: com.example.foobar.fax:api:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/api/pom.xml,
      	MavenProject: com.example.foobar.fax:model:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/model/pom.xml,
      	MavenProject: com.example.foobar.fax:web:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/web/pom.xml,
      	MavenProject: com.example.foobar.fax.web:api:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/web/api/pom.xml,
      	MavenProject: com.example.foobar.fax.web:core:1.0.0-SNAPSHOT @ ~/sources/foobar/fax/web/core/pom.xml] -> [Help 1]
      

      Additional information about pom locations is irrelevant from message point of view, because valid input for -rf option is presented below:

      ERROR] Could not find project to resume reactor build from: :x vs [
      	com.example:foobar,
      	com.example.foobar:parent,
      	com.example.foobar:api,
      	com.example.foobar:model,
      	com.example.foobar:csv,
      	com.example.foobar.csv:model,
      	com.example.foobar.csv:api,
      	com.example.foobar:json,
      	com.example.foobar.json:model,
      	com.example.foobar.json:api,
      	com.example.foobar.json:core,
      	com.example.foobar:fax,
      	com.example.foobar.fax:api,
      	com.example.foobar.fax:model,
      	com.example.foobar.fax:web,
      	com.example.foobar.fax.web:api,
      	com.example.foobar.fax.web:core] -> [Help 1]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                ldywicki Łukasz Dywicki
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: