AMAPstudio

User Tools


This is an old revision of the document!


How to freeze a library

It is possible using the freeze target of the Ant's build.xml file to freeze an existing library located in the capsis4/src directory in order to make a version of this library. A specific name composed of the library's name to which the user adds a suffix is used to generate in capsis4/ext directory a .jar file encapsulating the new renamed and compiled library. The initial library located in capsis4/src directory can continue to be developed independently of the frozen library.

Notes:
- only works with a library located in capsis4/src;
- it is not possible to correct / add functionalities to a frozen library.

In order to freeze a library, you have to type the following command from the capsis4 directory:

On Linux/MacOS:

sh ant freeze -Dlibrary.name=full.library.name -Dsuffix=suffix

On Windows:

ant freeze -Dlibrary.name=full.library.name -Dsuffix=suffix

where full.library.name is the full name of the library (including its package) and suffix is the suffix you want to add to the library's name.

For example, the following command (on Linux/MacOS):

sh ant freeze -Dlibrary.name=capsis.lib.castanea -Dsuffix=2018

will create in the capsis4/ext directory the capsis-lib-castanea2018.jar file containing:
- all directories and files (.java, .properties, …) from the capsis4/src/capsis/lib/castanea directory adapted to the new renamed library (source files belong to the capsis.lib.castanea2018 package);
- the corresponding compiled .class files.

The freeze target can be used before using the redirect target. Indeed, a module located in capsis4/src which depends on a library can be redirected to a frozen library (created with the freeze target) using the redirect target of the Ant's build.xml file (see How to redirect a module to a library).

documentation/freezelibrary.1520949583.txt · Last modified: 2018/03/13 13:59 by beudez