Maven does not provide anything like the metadata provided by OBR, which boils 
down to the requirements and capabilities of every artefact.  

As you acknowledge, maven dependency information is frequently wrong, 
especially in the runtime scope. This is because it is written manually and 
based on a developer's understanding of the world at a point in time. Not only 
can developers be wrong, but also the world changes. This is why the principle 
of using maven runtime scope dependency closures to assemble applications is 
*not* sound.  

OBR metadata is based on the actual content of the artefacts, typically 
analysed by an automated tool, and is therefore very accurate. Using this data 
another tool called a resolver is able to fully calculate a minimal transitive 
dependency set that actually works.  

Given this, and the fact that OBR actually predates maven, your question should 
perhaps be inverted: why didn't maven use OBR?

Regards
Neil


On Thursday, 4 June 2015 at 20:00, Simon Kitching wrote:

> Hi,
>  
> A maven pom declares dependencies on a set of artifacts with different  
> scopes. Maven's dependencies are a pretty generic model, and scopes  
> include "compile", "provided", "test" and "runtime".
>  
> The "runtime" scope is used for example by the exec-maven-plugin which will:
> * download all the necessary dependencies (compile, provided and runtime);
> * create a classpath that points to them; and
> * launch the application's main method
> using just the information in the pom-file.
>  
> It seems entirely possible to build an OSGi provisioning system based on  
> Maven rather than OBR; every bundle has a pom that defines the artifacts  
> it depends on and they can be found and downloaded automatically as the  
> exec-maven-plugin demonstrates. Of course this would rely on having  
> correct runtime-scope dependencies in maven poms which is often not the  
> case, but the principle seems sound.
>  
> Now I can see some possible advantages that OBR has over Maven, but I  
> would have thought that somebody would already have written a blog  
> article about this, or that the info would be on the Felix OBR project's  
> wiki or similar. However I just cannot find anything about this topic,  
> and hoped somebody here would be able to point me at the relevant info..
>  
> I'm familiar with Karaf's features-files which work fine with Maven. I  
> know that they also have OBR-related information in them  
> (dependency="true") - but I've never understood why that is useful. The  
> karaf-cave website describes what it does (how OBR works) but doesn't  
> have any information about what advantages OBR-style dependencies have  
> over Maven-style dependencies, which is what I was hoping to find.
>  
> Thanks,
> Simon
>  
> On 06/04/2015 08:32 PM, Jean-Baptiste Onofré wrote:
> > Hi Simon,
> >  
> > Maven is build time, OBR is runtime.
> >  
> > You can also take a look on:
> > - Karaf and features
> > - Karaf Cave OBR
> >  
> > Regards
> > JB
> >  
> > On 06/04/2015 08:27 PM, Simon Kitching wrote:
> > > Hi All,
> > >  
> > > Can anyone provide me with a link to a comparison of OBR and Maven? I
> > > can find reasonable amounts of information about what OBR does, but
> > > nothing about the motivation to create it given that Maven already
> > > existed...
> > >  
> > > Thanks,
> > > Simon
> > >  
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >  
> >  
> >  
>  
>  
>  
>  
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>  
>  


Reply via email to