Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1193

Maven addon should support getting the groupId from the parent

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.0.M2
    • Fix Version/s: 1.1.0.M3
    • Component/s: BUILD
    • Labels:
      None

      Description

      We are trying to figure out ways to use Roo with existing, multi-module projects. The first immediate problem we run into is the Maven addon's parsing of the POM. Specifically, when it tries to figure out the groupId, it only looks for an explicit groupId. In many cases, we don't specify one - in this case, it is inherited from the parent.

      I've attached a simple patch that will - if no explicit groupId is found - look at the parent element to see if it can get it from there.

        Issue Links

          Activity

          Hide
          balex Ben Alex added a comment -

          Updated MavenProjectMetadataProvider in Git ID 30f9c259f1fd28d4304fec664eeef800accb02d2 (no need for CLA as I clean-roomed the two material lines concerned ).

          Show
          balex Ben Alex added a comment - Updated MavenProjectMetadataProvider in Git ID 30f9c259f1fd28d4304fec664eeef800accb02d2 (no need for CLA as I clean-roomed the two material lines concerned ).
          Hide
          bobfields Bob Fields added a comment -

          This same problem applies to pom version as well as groupId. In 1.2.3.BUILD-SNAPSHOT 11/1/2012 I get this error:
          [FelixDispatchQueue] Version is required for org.springframework.roo:org.springframework.roo.addon.plural
          java.lang.NullPointerException: Version is required for org.springframework.roo:org.springframework.roo.addon.plural at org.apache.commons.lang3.Validate.notBlank(Validate.java:448) at org.springframework.roo.project.GAV.<init>(GAV.java:
          59)
          at org.springframework.roo.project.maven.Pom.<init>(Pom.java:110)
          at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:102)

          It's an easy fix - just duplicate the code for this patch getGroupId for a new getVersion method. I'll create a new JIRA and a new patch.

          Show
          bobfields Bob Fields added a comment - This same problem applies to pom version as well as groupId. In 1.2.3.BUILD-SNAPSHOT 11/1/2012 I get this error: [FelixDispatchQueue] Version is required for org.springframework.roo:org.springframework.roo.addon.plural java.lang.NullPointerException: Version is required for org.springframework.roo:org.springframework.roo.addon.plural at org.apache.commons.lang3.Validate.notBlank(Validate.java:448) at org.springframework.roo.project.GAV.<init>(GAV.java: 59) at org.springframework.roo.project.maven.Pom.<init>(Pom.java:110) at org.springframework.roo.project.maven.PomFactoryImpl.getInstance(PomFactoryImpl.java:102) It's an easy fix - just duplicate the code for this patch getGroupId for a new getVersion method. I'll create a new JIRA and a new patch.

            People

            • Assignee:
              balex Ben Alex
              Reporter:
              suresk Spencer Uresk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: