Message Boards

How does marketplace apps work with external dependancies

thumbnail
Jonatan Cloutier, modified 4 Years ago.

How does marketplace apps work with external dependancies

New Member Posts: 24 Join Date: 6/7/13 Recent Posts
Hi,
I’m developing an app for the market place that depend on external dependencies as osgi bundle. How does the market place manage those dependencies?

Do I need to bundle them with my app? Wouldn’t that risk to create conflict on the Liferay instance if the same dependencies are bundled in different versions? (I know osgi check the versions but it’s not every lib that really follow SemVer.)
Or do we let the user resolve the dependency problem with the help of a little documentation?I do hope there is a good solution to this.

Regards
thumbnail
Olaf Kock, modified 4 Years ago.

RE: How does marketplace apps work with external dependancies

Liferay Legend Posts: 6400 Join Date: 9/23/08 Recent Posts
Jonatan Cloutier:

I’m developing an app for the market place that depend on external dependencies as osgi bundle. How does the market place manage those dependencies?

Do I need to bundle them with my app? Wouldn’t that risk to create conflict on the Liferay instance if the same dependencies are bundled in different versions? (I know osgi check the versions but it’s not every lib that really follow SemVer.)
Or do we let the user resolve the dependency problem with the help of a little documentation?I do hope there is a good solution to this.
I'd personally prefer the apps to be self-contained. But it depends a bit on the dependency that you're talking about: If it's a humongous interface implementation that you require, that others might also use in their apps: A shared version is good. If the dependency is already an OSGi bundle, it most likely uses semver - even if it's not perfect, you can still embed it and depend on your version.
Think of "good solution" from your user's point of view: If they install your app and it doesn't work - what would they do? Who reads documentation? If you make your app just work out of the box, they'd be happier users. And if you really don't trust the SemVer of the library you use, you can always embed it in your own bundle, instead of depending on it as an external dependency.
thumbnail
David H Nebinger, modified 4 Years ago.

RE: How does marketplace apps work with external dependancies

Liferay Legend Posts: 14915 Join Date: 9/2/06 Recent Posts
I'd embed the dependencies. You have no guarantee that someone wanting to use your modules will have the dependencies.

There won't be a conflict with OSGi because OSGi will not try to bind in external dependencies because you ultimately will not be importing any of the packages.
thumbnail
Jonatan Cloutier, modified 4 Years ago.

RE: How does marketplace apps work with external dependancies

New Member Posts: 24 Join Date: 6/7/13 Recent Posts
Thank you both for your answers and sorry for the delayed response, I forgot to check the "subscribe me" feature.
I’ll thus embed the dependencies in my packaged.
Regards