Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.0.RC1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: @ CORE
    • Environment:
      osx 10.6.8
      jdk 1.6.0_26

      Description

      with the latest 1.2.0.BUILD-SNAPSHOT the 'addon create' command fails.
      see the log below:

      ____ ____ ____
      / __ \/ __ \/ __ \
      / /_/ / / / / / / /
      / , _/ // / /_/ /
      // ||___/___/ 1.2.0.BUILD-SNAPSHOT [rev fe5ef0a]

      roo> development mode
      roo> addon create advanced --topLevelPackage org.myaddon --projectName myaddon --description bla
      File identifier required
      java.lang.IllegalArgumentException: File identifier required
      at org.springframework.roo.support.util.Assert.notNull(Assert.java:112)
      at org.springframework.roo.process.manager.internal.DefaultFileManager.createFile(DefaultFileManager.java:108)
      at org.springframework.roo.addon.creator.CreatorOperationsImpl.writePomFile(CreatorOperationsImpl.java:296)
      at org.springframework.roo.addon.creator.CreatorOperationsImpl.createProject(CreatorOperationsImpl.java:281)
      at org.springframework.roo.addon.creator.CreatorOperationsImpl.createAdvancedAddon(CreatorOperationsImpl.java:101)
      at org.springframework.roo.addon.creator.CreatorCommands.advanced(CreatorCommands.java:64)

        Activity

        Hide
        lalyos lajos papp added a comment -

        Looks like the reason is that DelegatePathResolver chooses the DefaultPathResolvingStrategy
        and its getFocusedIdentifier() method is:

        git blame ./project/src/main/java/org/springframework/roo/project/DefaultPathResolvingStrategy.java

        7422ca5f (Andrew Swan 2011-10-21 16:52:13 +1100 189) public String getFocusedIdentifier(final Path path, final String relativePath)

        { 7422ca5f (Andrew Swan 2011-10-21 16:52:13 +1100 190) return null; // TODO JTT to review 91b7f045 (James Tyrrell 2011-10-21 03:44:31 +1100 191) }
        Show
        lalyos lajos papp added a comment - Looks like the reason is that DelegatePathResolver chooses the DefaultPathResolvingStrategy and its getFocusedIdentifier() method is: git blame ./project/src/main/java/org/springframework/roo/project/DefaultPathResolvingStrategy.java 7422ca5f (Andrew Swan 2011-10-21 16:52:13 +1100 189) public String getFocusedIdentifier(final Path path, final String relativePath) { 7422ca5f (Andrew Swan 2011-10-21 16:52:13 +1100 190) return null; // TODO JTT to review 91b7f045 (James Tyrrell 2011-10-21 03:44:31 +1100 191) }
        Hide
        aswan Andrew Swan added a comment -

        This is happening because DefaultPathResolvingStrategy has some unwritten methods; see the TODO markers in that class.

        Show
        aswan Andrew Swan added a comment - This is happening because DefaultPathResolvingStrategy has some unwritten methods; see the TODO markers in that class.
        Hide
        balex Ben Alex added a comment -

        Andrew should look at this, as he is looking after the DefaultPathResolvingStrategy in the future.

        Show
        balex Ben Alex added a comment - Andrew should look at this, as he is looking after the DefaultPathResolvingStrategy in the future.
        Hide
        aswan Andrew Swan added a comment -

        Fixed by Git commit 366cce21654c6780ee9fae666302f8fb2e903363.

        Show
        aswan Andrew Swan added a comment - Fixed by Git commit 366cce21654c6780ee9fae666302f8fb2e903363 .

          People

          • Assignee:
            aswan Andrew Swan
            Reporter:
            lalyos lajos papp
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: