Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Picking up OSGi bundles at maven.java.net?

Everyone,

I was able to fix this by adding the line of code that Xavier sent and the following lines to my parent pom:

    <!-- Add the repositorys for the Jersey bundles -->
    <repositories>

        <repository>
            <id>jerseyRepository</id>
            <name>Java.net Jersey Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/releases/com/sun/jersey</url>
            <layout>default</layout>
        </repository>

        <repository>
            <id>javaxRepository</id>
            <name>Java.net Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/releases/javax/</url>
            <layout>default</layout>
        </repository>

    </repositories>

    <!-- Pull down the Jersey dependencies -->
    <dependencies>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>1.12</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-servlet</artifactId>
            <version>1.12</version>
        </dependency>

    </dependencies>

Furthermore, I had to have my server bundle require javax.servlet (2.5.0) as a required bundle.

Jay


On Wed, Apr 11, 2012 at 12:40 PM, Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:
Xavier,

Thanks!

Unfortunately, it didn't work. I've pasted the exact error below. It looks like Maven downloaded them OK - all of the bundles are in ~/.m2/repository/com/sun/java/jersey-* and they all have MANIFEST.mf files in them. Any thoughts?

Jay

I received this error (which is the same error as before):

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: gov.ornl.nice.niceclient 2.0.0
[ERROR]   Missing requirement: gov.ornl.nice.nicecore 2.0.0 requires 'package com.sun.jersey.spi.container.servlet 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: gov.ornl.nice.niceclient 2.0.0 depends on: package gov.ornl.nice.nicecore.iNiCECore 0.0.0
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package com.sun.jersey.spi.container.servlet 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs.core 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs.ext 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package com.sun.jersey.spi.container.servlet 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs.core 0.0.0.", "Unable to satisfy dependency from gov.ornl.nice.nicecore 2.0.0 to package javax.ws.rs.ext 0.0.0.", "No solution found because the problem is unsatisfiable."]
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)


On Wed, Apr 11, 2012 at 12:21 PM, Xavier S. <xavier.seignard@xxxxxxxxx> wrote:
Hi, 
Did you add the following?

<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>target-platform-configuration</artifactId>
  <version>${tycho-version}</version>
  <configuration>
    <pomDependencies>consider</pomDependencies>
  </configuration>
</plugin>
 


Regards

Le 11 avril 2012 17:38, Jay Jay Billings <jayjaybillings@xxxxxxxxx> a écrit :
Everyone,

What's the best way to pick up OSGi bundles stored at maven.java.net or the snapshot repository:

https://maven.java.net/content/repositories/snapshots/

We are using Jersey, which is already osgi-ified and ready to go. They work fine if I drop it into a directory in the Target file, but of course Tycho can't handle that. I've added the following to my pom.xml:

parent pom:

    <repositories>

        <repository>
            <id>snapshot-repository.java.net</id>
            <name>Java.net Snapshot Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/snapshots/</url>
            <layout>default</layout>
        </repository>

    </repositories>

project (bundle) pom:

    <!-- Pull down the Jersey dependency -->
    <dependencies>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>1.12</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-servlet</artifactId>
            <version>1.12</version>
        </dependency>
    </dependencies>


Any thoughts?

Jay

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user




Back to the top