Hi Karl,

> what we are doing at the moment to avoid your problems is to 
> add exclude statements to our dependencies i.e.,
> 
> <dependency>
>       <groupId>${groupId}</groupId>
>       <artifactId>org.apache.felix.framework</artifactId>
>       <exclusions>
>         <exclusion>
>           <groupId>${pom.groupId}</groupId>
>           <artifactId>org.osgi.core</artifactId>
>         </exclusion>
>      </exclusions>
> </dependency>
> 

Thanks for the tip, I tried that, but I must be missing something as my
build fails now.  Let me give you a concrete example so you can point
out what I'm doing wrong ;-)

In my jackrabbit-osgi-bundle pom, I have this:

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.jcr</groupId>
      <artifactId>jcr</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>jackrabbit-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
  </dependencies>

And in the project that depends on this, I've done this, basically
exclude all the artifacts that jackrabbit depends on:

    <!-- Jackrabbit bundle -->
    <dependency>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>jackrabbit-osgi-bundle</artifactId>
      <version>1.0-SNAPSHOT</version>
      <exclusions>
        <exclusion>
          <groupId>javax.jcr</groupId>
          <artifactId>jcr</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.jackrabbit</groupId>
          <artifactId>jackrabbit-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

Right?

But I'm getting this error:

C:\dev\mqsoftware-web\mqsoftware-cms\src\main\java\com\mqsoftware\cms\re
pository\JackRabbitRepository.java:[6,17] package javax.jcr does not
exist

I thought it might be a problem with my imports/exports, but it appears
correct to me, in the jackrabbit-osgi-bundle I have:

        <configuration>
          <instructions>
 
<Export-Package>javax.jcr.*,org.apache.jackrabbit.*</Export-Package>
            <Private-Package></Private-Package>
          </instructions>
        </configuration>

and in the project that depends on jackrabbit I have:

        <configuration>
          <instructions>
            <Export-Package>com.mqsoftware.cms.*</Export-Package>
 
<Import-Package>javax.jcr.*,org.apache.jackrabbit.*,org.apache.velocity.
*,javax.naming.*</Import-Package>
            <Private-Package></Private-Package>
          </instructions>
        </configuration>

any idea what I'm doing wrong?  Thanks much for your help!

Cheers,
Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to