You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Tim Moloney <t....@verizon.net> on 2006/10/07 18:11:17 UTC

Is there a xerces bundle that works with Maven2?

I'm still relatively new to Maven and Felix but I've been doing as much 
reading and experimenting as I can.

I'm trying to write an application that has the following dependencies.


MyApp --> MyUtils
  |          |
  |          V
  +------> xerces

I can successfully build and run MyApp if I include the xerces jar file 
in both the MyApp and MyUtils bundles.

What I'd really like to do is use a separate xerces bundle that both 
MyApp and MyUtils depend on.

I can't find an existing xerces bundle and pom file that works with both 
Felix and Maven2.  Does one exist?  If not, is there a process that I 
can follow to manually take the xerces jar file (or any third party 
library) and create a Felix bundle and pom file that Maven can use when 
building projects?

Tim Moloney


Re: Is there a xerces bundle that works with Maven2?

Posted by Carlos Sanchez <ca...@apache.org>.
On 10/10/06, Tim Moloney <t....@verizon.net> wrote:
> Tim Moloney wrote:
> > I'm still relatively new to Maven and Felix but I've been doing as
> > much reading and experimenting as I can.
> >
> > I'm trying to write an application that has the following dependencies.
> >
> >
> > MyApp --> MyUtils
> >  |          |
> >  |          V
> >  +------> xerces
> >
> > I can successfully build and run MyApp if I include the xerces jar
> > file in both the MyApp and MyUtils bundles.
> >
> > What I'd really like to do is use a separate xerces bundle that both
> > MyApp and MyUtils depend on.
> >
> > I can't find an existing xerces bundle and pom file that works with
> > both Felix and Maven2.  Does one exist?  If not, is there a process
> > that I can follow to manually take the xerces jar file (or any third
> > party library) and create a Felix bundle and pom file that Maven can
> > use when building projects?
> >
> > Tim Moloney
>
> I've managed to get my bundles to build without including the xerces jar
> in each of them.  Unfortunately, I'm building against one jar and
> executing using another.
>
> Into my local maven repository, I installed the xerces 2.8.0 bundle that
> I found at http://bundles.osgi.org/Main/Repository.  I then tried to use
> the following dependency in my pom.xml.
>
>     <dependency>
>       <groupId>xerces</groupId>
>       <artifactId>org.apache.xerces</artifactId>
>       <version>2.8.0.v200606131651</version>
>       <scope>provided</scope>
>     </dependency>
>
> This gave me a "package org.apache.xml.serialize does not exist" error.
>
> The xerces 2.8.0 bundle doesn't directly contain any class files.
> Instead, it contains resolver.jar, xercesImpl.jar, and xml-apis.jar.
> Can maven not see into nested jar files?

the short answer is no


>
> If I use the following dependencies, I can build successfully but then
> I'm building against the xerces jar file from the ibiblio repository and
> not with the xerces bundle that I will be executing.
>
>     <dependency>
>       <groupId>xerces</groupId>
>       <artifactId>xercesImpl</artifactId>
>       <version>2.8.0</version>
>       <scope>provided</scope>
>     </dependency>
>
> Is there a way to get around this problem?

not right now, you'd have to rely that the jars inside the bundles are
the official releases like the ones in the maven repository. You can
build the xerces bundle with maven to be sure or do some checksum
checking.
There's some work being done to support OSGi in Maven 2.1.

>
> Tim Moloney
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Is there a xerces bundle that works with Maven2?

Posted by Tim Moloney <t....@verizon.net>.
Carlos Sanchez wrote:
> On 10/10/06, Tim Moloney <t....@verizon.net> wrote:
>> If I use the following dependencies, I can build successfully but then
>> I'm building against the xerces jar file from the ibiblio repository and
>> not with the xerces bundle that I will be executing.
>>
>> [...]
>>
>> Is there a way to get around this problem?
>
> not right now, you'd have to rely that the jars inside the bundles are
> the official releases like the ones in the maven repository. You can
> build the xerces bundle with maven to be sure or do some checksum
> checking.
> There's some work being done to support OSGi in Maven 2.1.
Thanks for the info.  :)


Re: Is there a xerces bundle that works with Maven2?

Posted by Carlos Sanchez <ca...@apache.org>.
On 10/10/06, Tim Moloney <t....@verizon.net> wrote:
> Tim Moloney wrote:
> > I'm still relatively new to Maven and Felix but I've been doing as
> > much reading and experimenting as I can.
> >
> > I'm trying to write an application that has the following dependencies.
> >
> >
> > MyApp --> MyUtils
> >  |          |
> >  |          V
> >  +------> xerces
> >
> > I can successfully build and run MyApp if I include the xerces jar
> > file in both the MyApp and MyUtils bundles.
> >
> > What I'd really like to do is use a separate xerces bundle that both
> > MyApp and MyUtils depend on.
> >
> > I can't find an existing xerces bundle and pom file that works with
> > both Felix and Maven2.  Does one exist?  If not, is there a process
> > that I can follow to manually take the xerces jar file (or any third
> > party library) and create a Felix bundle and pom file that Maven can
> > use when building projects?
> >
> > Tim Moloney
>
> I've managed to get my bundles to build without including the xerces jar
> in each of them.  Unfortunately, I'm building against one jar and
> executing using another.
>
> Into my local maven repository, I installed the xerces 2.8.0 bundle that
> I found at http://bundles.osgi.org/Main/Repository.  I then tried to use
> the following dependency in my pom.xml.
>
>     <dependency>
>       <groupId>xerces</groupId>
>       <artifactId>org.apache.xerces</artifactId>
>       <version>2.8.0.v200606131651</version>
>       <scope>provided</scope>
>     </dependency>
>
> This gave me a "package org.apache.xml.serialize does not exist" error.
>
> The xerces 2.8.0 bundle doesn't directly contain any class files.
> Instead, it contains resolver.jar, xercesImpl.jar, and xml-apis.jar.
> Can maven not see into nested jar files?

the short answer is no


>
> If I use the following dependencies, I can build successfully but then
> I'm building against the xerces jar file from the ibiblio repository and
> not with the xerces bundle that I will be executing.
>
>     <dependency>
>       <groupId>xerces</groupId>
>       <artifactId>xercesImpl</artifactId>
>       <version>2.8.0</version>
>       <scope>provided</scope>
>     </dependency>
>
> Is there a way to get around this problem?

not right now, you'd have to rely that the jars inside the bundles are
the official releases like the ones in the maven repository. You can
build the xerces bundle with maven to be sure or do some checksum
checking.
There's some work being done to support OSGi in Maven 2.1.

>
> Tim Moloney
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Is there a xerces bundle that works with Maven2?

Posted by Tim Moloney <t....@verizon.net>.
Tim Moloney wrote:
> I'm still relatively new to Maven and Felix but I've been doing as 
> much reading and experimenting as I can.
>
> I'm trying to write an application that has the following dependencies.
>
>
> MyApp --> MyUtils
>  |          |
>  |          V
>  +------> xerces
>
> I can successfully build and run MyApp if I include the xerces jar 
> file in both the MyApp and MyUtils bundles.
>
> What I'd really like to do is use a separate xerces bundle that both 
> MyApp and MyUtils depend on.
>
> I can't find an existing xerces bundle and pom file that works with 
> both Felix and Maven2.  Does one exist?  If not, is there a process 
> that I can follow to manually take the xerces jar file (or any third 
> party library) and create a Felix bundle and pom file that Maven can 
> use when building projects?
>
> Tim Moloney

I've managed to get my bundles to build without including the xerces jar 
in each of them.  Unfortunately, I'm building against one jar and 
executing using another.

Into my local maven repository, I installed the xerces 2.8.0 bundle that 
I found at http://bundles.osgi.org/Main/Repository.  I then tried to use 
the following dependency in my pom.xml.

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>org.apache.xerces</artifactId>
      <version>2.8.0.v200606131651</version>
      <scope>provided</scope>
    </dependency>

This gave me a "package org.apache.xml.serialize does not exist" error.

The xerces 2.8.0 bundle doesn't directly contain any class files.  
Instead, it contains resolver.jar, xercesImpl.jar, and xml-apis.jar.  
Can maven not see into nested jar files?

If I use the following dependencies, I can build successfully but then 
I'm building against the xerces jar file from the ibiblio repository and 
not with the xerces bundle that I will be executing.

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.0</version>
      <scope>provided</scope>
    </dependency>

Is there a way to get around this problem?

Tim Moloney