Results 1 to 9 of 9

Thread: Missing 1.1.5.RELEASE Maven dependencies?

  1. #1
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Question Missing 1.1.5.RELEASE Maven dependencies?

    I'm trying to upgrade an old Roo-based project to 1.1.5.RELEASE. When I perform a Maven build, it complains of several missing 1.1.5 bundles from the repo.

    I have "http://spring-roo-repository.springsource.org/release" configured in my POM (and my settings.xml). Browsing the XML feed from the Spring Roo repository, it does appear that the missing bundles are in fact not there.

    Is there an updated repo containing all 1.1.5 dependencies, or do I have to manually install them in my local repo one by one from the 1.1.5 release disto zip?

    Missing artifacts:
    org.springframework.roo:org.springframework.roo.me tadata:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.pr ocess.manager:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.pr oject:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.su pport:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.sh ell:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.cl asspath:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.ad don.entity:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.ad don.web.mvc.controller:bundle:1.1.5.RELEASE
    org.springframework.roo:org.springframework.roo.ad don.web.mvc.jsp:bundle:1.1.5.RELEASE

  2. #2
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Question

    I can't replicate your problem. I did this:
    1. Started the Roo 1.1.5 shell (from the command line)
    2. Executed the command "addon create simple --topLevelPackage com.example.forum"
    3. Quit the shell
    4. Deleted the "org/springframework/roo" folder from my local Maven repository, to ensure a fresh download of the Roo JARs
    5. Ran "mvn package", which emitted this output, showing that the necessary Roo 1.1.5 artifacts were successfully downloaded: download-roo-artifacts.txt:

    The "repositories" section of my addon's POM seems to have the same URL as yours:

    Code:
    <repositories>
        <repository>
          <id>spring-roo-repository</id>
          <name>Spring Roo Repository</name>
          <url>http://spring-roo-repository.springsource.org/release</url>
        </repository>
      </repositories>
    So please try the steps I used above and see if they work for you.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  3. #3
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Default

    Thanks Andrew, that test case works for me too. However, I still can't build my project. I think there's something else going on here:

    1. My project depends on a custom addon I've developed locally
    2. That addon declares several dependencies on Roo bundles
    3. In order to build the project after clearing out my local repo of all Roo artifacts, I first have to build my custom addon
    4. The 7-8 Roo dependencies that give me problems when building my project are the same ones on which my addon declares an explicit dependency


    Clearly building my addon is messing up my local repo, not sure why though. Any ideas what I should check?

  4. #4
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Lightbulb

    Ah, found it. The custom addon declared the various Roo dependencies using
    HTML Code:
    <type>bundle</type>
    . Removing this line from each dependency, then rebuilding the addon & the project fixed my issue.

    What's interesting is that this is how "addon create" sets up the POM for an addon: various core Roo dependencies are inserted with type of "bundle". I can't be the first person to encounter this then?

  5. #5
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Question

    Quote Originally Posted by rdouglas View Post
    My project depends on a custom addon I've developed locally
    This bit seems odd; it's not normal for an addon to be a dependency (as in a Maven dependency) of a Roo-managed project. If you run any of the sample scripts (e.g. vote.roo), you'll see that the only Roo-related dependency in the generated POM is the Roo annotations JAR. There's no dependencies on any Roo addons, core or otherwise. Is there any special reason your addon is a dependency of your project?

  6. #6
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Default

    looking into it some more, I don't think I need my addon as a dependency of my project. This is, however, another left-over from using the "addon create" command: if you do "addon create advanced" it creates a *OperationsImpl class with a setup() method that includes code to add the addon jar as a project dependency. I kept that code because I figured it was required :-)

    I think perhaps the addon create command needs to be cleaned up a little, or documented to indicate when you would/wouldn't need certain parts of the generated example code. Now that I know a little more about addons I might take a look at doing that when I get a chance.

  7. #7
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Default

    Quote Originally Posted by rdouglas View Post
    if you do "addon create advanced" it creates a *OperationsImpl class with a setup() method that includes code to add the addon jar as a project dependency.
    Yes, that code doesn't seem to make sense; please log a JIRA ticket to have this changed so that it adds a more realistic dependency to your project.
    Last edited by Andrew Swan; Sep 7th, 2011 at 06:19 PM.

  8. #8
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Default

    Filed ROO-2719 and ROO-2720 for the sample code & the type=bundle issue. Thanks for your help Andrew!

  9. #9
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Post

    I've fixed ROO-2720 by removing the "type=bundle", as the addon builds and runs fine without it.

    Further to my last comment, I've thought of a reason why an addon-using project would need to have a runtime dependency on that addon, namely that the addon provides an annotation that the project needs available on the classpath. The classic example is a trigger annotation provided by an advanced addon (i.e. an addon that produces an ITD in response to the presence of an addon-provided annotation on some source code in the project).
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

Posting Permissions

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