On 4/19/10 5:32 AM, Nick Wilson wrote:
> I'm having a problem using Maven to build an EAR file for an application
> that makes calls to the OBR API. What seems to be happening is that as
> soon as I add the OBR API as a maven dependency...
> 
>  
> 
>             <dependency>
> 
>                   <groupId>org.apache.felix</groupId>
> 
>                   <artifactId>org.osgi.service.obr</artifactId>
> 
>                   <version>1.0.2</version>
> 
>             </dependency>
> 
>  
> 
> ...maven automatically adds "org.osgi.core-1.0.1.jar" to the EAR file.
> My application then falls over when it tries to call Bundle.getVersion()
> as that method isn't present in the 1.0 core API.
> 
>  
> 
> Why is Maven including that version of the core API?
Because it is listed as a dependency. Take a look at the pom
(http://repo2.maven.org/maven2/org/apache/felix/org.osgi.service.obr/1.0.2/org.osgi.service.obr-1.0.2.pom)

> Is there some way I
> can tell it not to?
Yes. See
http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-conflict.html#ex-exclude

HTH,
Justin

> 
>  
> 
> Regards,
> 
>  
> 
> Nick
> 
>  
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to