This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Missing 1.1.5.RELEASE Maven dependencies?

Sep 6th, 2011, 03:39 PM

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?

Comment

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?

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?

Comment

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.

Comment

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).