It is possible using the redirect target of the Ant's build.xml file to redirect a module to a frozen library (encapsulated in a .jar file stored in capsis4/ext directory and previously obtained using the freeze target, see: How to freeze a library) or to a library in development located in capsis4/src directory.
In order to redirect a module to a library, you have to type the following command from the capsis4 directory:
sh ant redirect -Dmodule.name=modulename -Dlibrary.name=library.package.name -Dsuffix=suffix
ant redirect -Dmodule.name=modulename -Dlibrary.name=library.package.name -Dsuffix=suffix
where modulename is the package's name of the module located in capsis4/src you want to redirect, and library.package.name and suffix refer to the package's name to which you want to redirect the module.
There are two cases:
- If suffix is different from NONE, then the module will be redirected to the library encapsulated in the .jar file of capsis4/ext which contains the package composed of library.package.name and suffix. This case occurs when a module has not yet been redirected to a frozen library or when it has already but has to be redirected to another frozen library.
- If suffix is equal to NONE, then the module will be redirected to the library located in capsis4/src whose name is defined by its package: library.package.name. This case occurs when a module has previously been redirected to a frozen library and has to be redirected to the library that is still in development.
For example, the following command (on Linux/MacOS):
sh ant redirect -Dmodule.name=physiodemogenetics -Dlibrary.name=capsis.lib.castanea -Dsuffix=2018
will redirect the capsis4/src/physiodemogenetics module to the library encapsulated in the capsis-lib-castanea2018.jar (package capsis.lib.castanea2018) stored in capsis4/ext.
And the following command (on Linux/MacOS):
sh ant redirect -Dmodule.name=physiodemogenetics -Dlibrary.name=capsis.lib.castanea -Dsuffix=NONE
will redirect the capsis4/src/physiodemogenetics module to the capsis.lib.castanea library located in capsis4/src (package capsis.lib.castanea).