My task:
I am in the process of migrating our repositories hosted on premise Nexus to JFrog Artifactory and i am stuck at support for OSGi-bundles (upload and dependency-resolution).
Current situation:
Currently we develop, build, deploy and consume our own OSGi-bundles via Nexus. The OSGi-bundle gets built and deployed (with Maven and Tycho) to Nexus as ZIP/JAR. On Nexus we use a plugin (Tycho/Nexus Unzip Plugin) that mirrors and unzips the OSGi-bundles and makes them available as a virtual repository. This enables Maven with the Tycho-plugin to resolve dependencies when consuming those OSGi-bundles.
A example structure in the SNAPSHOT repository on Nexus:
+- Snapshots
+--- A0
+--- A1
+--- A2
+--- 1.*.*-SNAPSHOT
|+-- A2-1.*.*.zip
|+-- A2-1.*.*.pom
|+-- A2-1.*.*-p2artifacts.xml
|+-- A2-1.*.*-p2metadata.xml
And the corresponding structure generated by Tycho/Nexus Unzip Plugin on Nexus:
+- Snapshots-Unzip for P2
+--- A0
+--- A1
+--- A2
+--- 1.*.*-SNAPSHOT
+--- A2-1.*.*-SNAPSHOT.zip-unzip
|+-- features
|+-- plugins
|+-- artifacts.jar
|+-- artifacts.xml.xz
|+-- content.jar
|+-- content.xml.xz
|+-- p2.index
The dependency (A2 in this case) is included in the *.target.target file by pointing to the location of the unzip-repository: http://*****:****/nexus/service/local/repositories/Snapshot-Unzip/content/A0/A1/A2/1.*.*-SNAPSHOT/A2-1.*.*-SNAPSHOT.zip-unzip
My problem:
There seems to be no solution to implicitly or explicitly provide the deployed OSGi-bundles unziped as Nexus with the Tycho/Nexus Unzip Plugin does on JFrog Artifactory.
My research and attempts:
Official documentations of JFrog Artifactory suggest that there is explicit support for P2-repositories (P2-repositories). However when attempting to replicate the steps the results were not what I was expecting.
- We do not have one OSGi-bundle but multiple with multiple versions (SNAPSHOT & RELEASE) in each corresponding repository
- When creating a virtual P2-repository and trying to include a local repository (where our OSGi-bundles reside) I have to point to the metadata directly and cannot include a whole repository
- Also when pointing to the metadata which resides in a ZIP, the documentation suggests to finish the subpath/URL with '!'. This however does nothing and dependency resolution during build process fails
My expectations:
The current use-case is something that was implemented long before I started working and needs to be supported for existing applications. I cannot change the way the applications depend and resolve OSGi-bundles. I "just" need to replicate the current behavior of Nexus in JFrog Artifactory (ideally).
Is there a approach I could try or some implementation detail in JFrog Artifactory that I missed? Thanks!