Cytoscape App and external Dependencies

273 views
Skip to first unread message

Mathias Kemeter

unread,
Sep 9, 2021, 4:10:01 AM9/9/21
to cytoscape-app-dev
Hi everyone,

I have developed a database connectivity app for SAP HANA, which requires the JDBC client for SAP HANA to be on the class path. With some trial&error I found, that the plugin works fine when I copy the ngdbc.jar (the JDBC client) to "/Applications/Cytoscape_v3.8.2/framework/lib/openjfx/mac".

Now, I would like to submit the app to the app store to make it more convenient (and visible) for users. Is there any best practice how to deal with the external dependency?

Many thanks,
Mathias

Scooter Morris

unread,
Sep 9, 2021, 11:25:42 AM9/9/21
to cytoscape-app-dev
Hi Mathias,
   Sure -- what you need to do is to add (embed) the dependency to your jar, and the trick to doing that is all in your pom.xml.  There are a number of apps that embed dependencies -- one of mine, clusterMaker2, has quite a number of them, so you can take a look at the pom here: https://github.com/RBVI/clusterMaker2/blob/master/pom.xml  In particular, look at the <configuration><instructions> for the org.apache.felix plugin and then the <dependency> for org.ojalgo.  The net result of that will be a jar for your app that has all of your dependent jars included.

-- scooter

Mathias Kemeter

unread,
Sep 13, 2021, 10:44:14 AM9/13/21
to cytoscap...@googlegroups.com
Thank you Scooter! Your suggestion almost worked. I am still facing issues, because my packaged dependency is a multi-release jar and for some reason it is fetching the incorrect release for my Java version. But I assume that this issue is not in any way related to Cytoscape specifics.

Regards,
Mathias

--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-app-dev/Asv4ifiYY84/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-app-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/475d11b1-6010-46a3-9a40-3b6d22d83413n%40googlegroups.com.

Mathias Kemeter

unread,
Dec 8, 2021, 9:17:31 AM12/8/21
to cytoscape-app-dev
Hi everyone,

this topic got staled a bit on my side. Now, I've found some time to dig deeper and found the following bug report, which is essentially describing the issue with my external dependency (..which happens to be the same SAP HANA driver mentioned in the bug report):
https://issues.apache.org/jira/browse/FELIX-6396

The bottom line is that multi-release jars are only supported with Karaf 4.3.1 upwards. 

Are there any plans for Cytoscape to move to OSGI 7 / Karaf 4.3.1?

Many thanks,
Mathias

Mike Kucera

unread,
Dec 8, 2021, 10:11:56 AM12/8/21
to cytoscape-app-dev
Hi Mathias,

I am currently migrating the develop branch of Cytoscape 3.10 to Java 17, OSGi 7 and Karaf 4.3.3. 

This will be the platform used by Cytoscape 3.10. However 3.9 was just released recently, so it will be a while until 3.10 is released.

When I have the Cytoscape 3.10 build working can I ask you to test it with your App, to make sure the multi-release jars are working?

Thanks.

Mike.



You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/f77a6c8d-73e6-4914-bb4c-36ea0053dedan%40googlegroups.com.

Mathias Kemeter

unread,
Dec 8, 2021, 10:45:56 AM12/8/21
to cytoscape-app-dev
Many thanks! I am looking forward to 3.10 then :)

Sure, you can reach out. I am happy to test it with my app.

Regards,
Mathias

Mathias Kemeter

unread,
May 22, 2023, 3:19:37 AM5/22/23
to cytoscap...@googlegroups.com
Hi everyone,

let me dig out this old thread as 3.10 has been released. Should this be working now? 

I was assuming, that I need to increase the Cytoscape API version to 3.10 and OSGI to 7 in my pom.xml. It seems both is not available on the Cytoscape Nexus.

Best regards,
Mathias

Mathias Kemeter

unread,
May 22, 2023, 8:07:39 AM5/22/23
to cytoscap...@googlegroups.com
Small update: I meanwhile changed my project to consume "api-bundle" instead of the individual API jars since for "api-bundle" there is a version 3.10.0 available. However, I am still receiving this error: 
Failed to read artifact descriptor for org.cytoscape:api-bundle:jar:3.10.0: org.cytoscape:api-parent:pom:3.10.0 was not found in https://nrnb-nexus.ucsd.edu/repository/cytoscape_releases/ during a previous attempt.

Is this an issue with my pom.xml?

Regards,
Mathias

Scooter Morris

unread,
May 24, 2023, 10:58:21 PM5/24/23
to cytoscape-app-dev
Hi Mathias,

I've seen this before, and typically it means that in a previous attempt it failed and won't retry unless it's forced.  There's probably a flag for that, but I usually just go into my .m2 directory and delete the old attempt.

-- scooter

Mathias Kemeter

unread,
May 25, 2023, 2:06:46 AM5/25/23
to cytoscap...@googlegroups.com
Hi Scooter,

that's actually what I tried first. I simply deleted .m2 completely. 

My understanding is that the 3.10 api-bundle refers to the 3.10 api-parent, which is not existing on the Nexus:

Regards,
Mathias

Scooter Morris

unread,
Jun 14, 2023, 11:38:01 PM6/14/23
to cytoscape-app-dev
Hi Mathias,

You are correct -- we didn't get all of the bundles deployed for some reason.  I'll try to get that corrected by the team tomorrow.

-- scooter

Mathias Kemeter

unread,
Jun 23, 2023, 4:40:33 AM6/23/23
to cytoscap...@googlegroups.com
Hi Scooter,

Many thanks! I can see that meanwhile more 3.10 artifacts are available. 

However, I am still having trouble with api-parent, which seems to be a dependency of application-api:
Failed to collect dependencies at org.cytoscape:application-api:jar:3.10.0: Failed to read artifact descriptor for org.cytoscape:application-api:jar:3.10.0

Regards,
Mathias

Mike Kucera

unread,
Jun 25, 2023, 12:10:02 PM6/25/23
to cytoscap...@googlegroups.com
Hi Mathias, 

Can you try again and let me know?

Thanks.

Mathias Kemeter

unread,
Jun 26, 2023, 10:53:31 AM6/26/23
to cytoscap...@googlegroups.com
Thanks Mike! It works on my end now and I can build my plug-in with the 3.10 bindings.

(Unfortunately my initial issue with the multi-release dependency is not yet solved, but that's a different thing)

Regards,
Mathias

Reply all
Reply to author
Forward
0 new messages