AMAPstudio

User Tools


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 and 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 or 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=library.package.name -Dsuffix=suffix

On Windows:

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

where library.package.name is the name of the library's package (from capsis4/src directory) 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 (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.txt · Last modified: 2018/03/22 13:19 by beudez