PDA

View Full Version : maven and spring osgi


kockas
May 12th, 2008, 10:41 AM
First of all thank you for bringing OSGI into Spring world. :) But I've some remarks to your usage of maven.

It's nice, that you use maven to support build process, however I found it kind of tricky.
Maven is good because it brought convention over configuration into java. And here comes problems.
I'm used to write 'mvn test' and expect BUILD SUCCESSFUL. Instead I receive a plenty of strange exceptions. (I know I need to define profile, but #%^#$ )
There should be the default one.
When I need to run test I need to use profile "it"? Instead of 'mvn test'? Why? That's crazy.

In many places in documentation, you are going too deep into technical details (how and why things done), but it takes time to find out, how to import project into eclipse without compilation problems. How to run tests? And definitely: WHY usual maven commands does not behave like they should?

Your doc, is definitely missing maven howto. And I think it is wrong, that it needs it...

oleg.zhurakousky
May 12th, 2008, 11:07 PM
Agreed, there are things that are missing from the documentation, but considering how "bleeding edge" this project is I hope you can understand :-)
Be assured that the work is under way.
cheers

kockas
May 13th, 2008, 03:46 AM
I definitely agree, that maven does not offer everything in way, OSGI needs. That's question if OSGI guys shouldn't learn something from maven. But we will probably not solve that. :rolleyes:

However on many projects I worked on, I saw, that people desperately like to bent maven instead of make some effort to meet maven conventions. That's why I post this message.

Again, thank you for great job, and please, if you have chosen maven, use as much as possible of conventions, and all the differences should be very carefully considered, and documented.

Costin Leau
May 13th, 2008, 05:14 AM
Kockas have you read readme-building.txt? It explains in details what profiles depending on what OSGi platform you want to use and what components.
It's quite cumbersome I give you that but that's the best setup I could come up with (after some *long* trials).
Feedback and improvements from maven experts are definitely welcomed!

The problem with profiles is that you cannot have more then one activated by default.
Initially we used equinox as the default platform however depending on your JVM we needed an additional profile to be enabled - 1.4 or 1.5.
Since the two would not kick in at the same time, we opted for the latter - hence the need to specify the OSGi platform.
I might add that we got lucky since normally, from what I could tell, default profiles do not get enabled if one specifies a profile however, for some reason, the 1.4/1.5 one kicks in so the user has to specify only one.
The same thing applies for integration testing - if you run the integration tests, the build takes somewhere between 7-10 minutes depending on your machine and logging level.
Since this is not always desired, we've used profiles to switch on/off that part of the project.

This being said, point taken. The docs can always use improvements and the maven build might be one of them - the readme-building.txt could be mentioned for example.
Consider raising an JIRA issue just in case.

Thanks,