Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Maven dependecy org.apache.commons.math error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
zaras  
View profile  
 More options Oct 15 2012, 9:22 am
From: zaras <xani...@gmail.com>
Date: Mon, 15 Oct 2012 06:22:50 -0700 (PDT)
Local: Mon, Oct 15 2012 9:22 am
Subject: Maven dependecy org.apache.commons.math error

Hello,

I have a plugin for Cytoscape 3.0 with a dependency on the external library
org.apache.commons.math (2.1)
Compilation is ok but at runtime the dependency jar is not getting deployed
or bundled when starting Cytoscape 3.0:

org.osgi.framework.BundleException: Unresolved constraint in bundle
org.cytoscape.dyn [48]:
Unable to resolve 48.0: missing requirement [48.0] package;
(&(package=org.apache.commons.math)(version>=2.1.0)(!(version>=3.0.0)))

The dependency is specified as a Maven dependency in the pom file:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-math</artifactId>
    <version>2.1</version>
</dependency>

How can I fix this?
Thanks in advance,

Sabina


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Montojo  
View profile  
 More options Oct 15 2012, 10:38 am
From: Jason Montojo <jrr...@gmail.com>
Date: Mon, 15 Oct 2012 10:38:26 -0400
Local: Mon, Oct 15 2012 10:38 am
Subject: Re: [Cytoscape-discuss] Maven dependecy org.apache.commons.math error

Hi Sabina,

You can bundle your dependencies in your app JAR by adding the following
snippet to your pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>${maven-bundle-plugin.version}</version>
            <configuration>
                <instructions>
                    ...

<Embed-Dependency>commons-math;groupId=org.apache.commons;inline=true</Embe d-Dependency>
                    <Import-Package>*;resolution:=optional</Import-Package>
                    ...
                </instructions>
            </configuration>
        </plugin>
    </plugins>
</build>

The other alternative is to use Bnd to wrap commons-math as an OSGi bundle
and distribute that with your app bundle.  Unfortunately, the App Store
doesn't currently support multi-bundle apps yet, so you wouldn't be able to
distribute your app through that channel.  Embedding the dependency as
described above is probably the best thing to do for now.

Hope this helps,
Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zaras  
View profile  
 More options Oct 16 2012, 12:41 pm
From: zaras <xani...@gmail.com>
Date: Tue, 16 Oct 2012 09:41:31 -0700 (PDT)
Local: Tues, Oct 16 2012 12:41 pm
Subject: Re: [Cytoscape-discuss] Maven dependecy org.apache.commons.math error

Thanks Jason, that works fine!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »