Results 1 to 4 of 4

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

  1. #1
    Join Date
    Oct 2007
    Posts
    22

    Default 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. #2
    Join Date
    Oct 2007
    Posts
    22

    Default

    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>

  3. #3
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •