exchange jar-files through OSGi packages from repositories
Activity
Carlos Ruiz September 8, 2018 at 2:36 PM
Closing as lack of interest from community
Carlos Ruiz November 18, 2015 at 3:20 PM
, wondering if this can be closed now that was integrated

Hiep Lq June 16, 2015 at 7:43 AMEdited
Hi .
about avoid jar file in truck, have two solution
1. same as zk library in 3.0
2. as i description at https://groups.google.com/d/msg/idempiere/jRcEziAV7dI/Ls8tStFbv7EJ
about your above description:
+ with rmap. all file after download will go to targetPlatform not in your plug-in folder.
when you change dependency in plug-in you must update rmap file, so it will don't standard for extend plug-in
+ about <maven:entry artifactId="jasperreports" groupId="net.sf.jasperreports" name="net.sf.jasperreports.engine"/>
"name" is for resolver material but it's also name for library dependency. so it must is name of bundle. other you can material but can't compiler or compiler but can't material.

Thomas Bayen June 16, 2015 at 6:50 AM
I want here to give a link to http://wiki.idempiere.org/en/Decrease_Idempiere_Repository

Thomas Bayen June 16, 2015 at 6:25 AMEdited
The process of exchanging a jar file has several steps. As an example I replaces the jasperreports library. It is included in the plugin org.adempiere.report.jasper.libraries.
identify an OSGi plugin in a repository.
The best guess is to look at http://mvnrepository.com. I found an actual library file here: http://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports/5.6.1 . To check if this is OSGi-capable you can download the jar-file and see if we have a file "META-INF/MANIFEST.MF". If you look into that you see if that is an OSGi bundle definition.Add a search path to the rmap of our Buckminster installation
You can open the file "org.adempiere.sdk-feature/adempiere.rmap" and add one or two entries: One is a general locator that maps from a plugin name to a repository using a regex:Please note that the maven central repository is already configured (later in the file). It is represented through the "bundles.maven" reference.
After that we need a mapping to translate a plugin name into the artifactId and groupId of the maven central repository:In our case the OSGi plugin name is a bit different from the maven name (it ends with the word "engine". The mapping alllows to translate that. (I dont know if this entry is needed if the naming scheme is more standard.)
remove the dependency to the jar file
Remove the jar file from the classpath in the MANIFEST.MF. And remove it from the Eclipse classpath. Then you can delete the jar file in the trunk.create a new dependency from our plugin to the OSGi plugin
In the file org.adempiere.report.jasper.library/META-INF/MANIFEST.MF you should add an entry to the Require-Bundle section like that:You can not do this step in the Eclipse manifest editor but you have to do it in the text editor. (If someone can improve my workflow to make that easie please comment!)
restart the buckminster initialization
This is the same procedure that you did when you installed your workspace the first time. After that you better clean and rebuild the whole workspace.
Details
Details
Assignee
Reporter

The iDempiere trunk contains a lot of jar-files for external libraries. In the last years a lot of them are removed and replaced by a reference to an OSGi plugin that is loaded from a public repository. When I started to work on that issue I didn't know how to do these changes. I needed to improve my knowledge about OSGi and buckminster.
This tracker item is to collect information how to do that, share this knowledge and to exchange some of these libraries.