Announcement Announcement Module
Collapse
No announcement yet.
How to use roo with existing Maven Project? NullPointerException Dependency.java:95 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use roo with existing Maven Project? NullPointerException Dependency.java:95

    What do I need to use roo with an existing Maven Project?

    If I type roo in the project home, I get a NullpointerException:

    ____ ____ ____
    / __ \/ __ \/ __ \
    / /_/ / / / / / / /
    / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/ 1.0.0.RC2 [rev 321]


    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    NullPointerException at org.springframework.roo.project.Dependency.<init>( Dependency.java:95)

  • #2
    Apparently all plugins (including default) require a groupId.

    Making sure all plugins had a groupId resolved this.

    FYI: This is the plugin that was causing my problem:

    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.0.2</version>
    <configuration>
    <source>1.6</source>
    <target>1.6</target>
    </configuration>
    </plugin>

    Comment


    • #3
      Yes you are correct. This is because Roo parses the pom in order to anaylyse your exisiting dependencies (this way we can make sure that Roo won't install duplicate dependencies). I am not aware of any case where you don't need a groupId, so I am surprised this plugin worked before including the groupId. Looking at your specific plugin the usage example also has a groupId in use:

      http://maven.apache.org/plugins/mave...gin/usage.html

      Cheers,
      Stefan

      Comment


      • #4
        I noticed https://jira.springsource.org/browse/ROO-319 was logged for this bug. I have just marked it as resolved, as I encountered this problem when working on ROO-287 and already committed the necessary fix in SVN revision 339. It will therefore be included in Roo 1.0.0.RC3.

        Comment

        Working...
        X