Outils pour utilisateurs

Outils du site


public:dev_lib_wrapper_plugin_addition

Adding a library to TXM project

Information to add a third-party or custom library to TXM project.

External libraries in TXM should be wrapped into some RCP plug-in project to manage their own version, their own license and to not be updated by the client if not needed/changed.

Installation

Example with the Colt library:

  • create a new Plug-in project with pattern org.txm.libs.LIBRARY_NAME, eg.: org.txm.libs.colt
  • set the same string that above as “ID” of plug-in, eg.: org.txm.libs.colt
  • set the “version” of the .jar library that will be wrapped, eg.: 1.2.0
  • set the “vendor” as URL or Name. The “vendor” field is the “provider” field that appears in the “Installation details” table of the about menu in an RCP application
  • eg.: set the “vendor” to: https://dst.lbl.gov/ACSSoftware/colt/
  • uncheck “This plug-in will make contributions to the UI” and create the project
  • create an new folder “lib” at root of the new project
  • move the .jar file to “lib” folder
  • add the .jar to the Java build path in the “Project\Properties\Libraries” tab
  • check the .jar library in the “Project\Properties\Order and Export” tab to export it when building
  • in “plugin.xml\Runtime” tab, expose all the packages of the library
  • in “plugin.xml\Build” tab, check the .jar library
  • the library can now be added to the dependencies of another TXM sub-project
  • if possible, store the Javadoc in the project of the used version and add it as ZIP in a non source/exported folder (“doc”) and target it in the “Project\Properties\Libraries” tab
  • if the Javadoc does not exist as file(s) (doc only online), it would be better to store the src code in the project in a non source/exported folder (“src”) and target it in the “Project\Properties\Libraries” tab rather than use the Javadoc URL because generally the content of the doc change overtime following the versions.

License

For legal information management in Eclipse RCP see: https://eclipse.org/legal/guidetolegaldoc.php

[WIP]

  • create a file about.html in the root of the project containing the information and license of the library
  • this file is the one that will be opened when clicking on “Legal info” of a plug-in in the “Installation details” table of an RCP application
  • if the about.html page needs to link some local TXT files (eg.: a local TXT file containing the Apache License content) or some other files, these files must be in a directory named “about_files”
  • TODO: test the behavior with the P2 updates system Wizard
public/dev_lib_wrapper_plugin_addition.txt · Dernière modification: 2017/06/16 15:24 par sebastien.jacquot@univ-fcomte.fr