User Tools

How to check the dependencies of a package

It is possible using the check-dependencies target of the Ant's build.xml file to check the dependencies of a package from capsis4/src directory. These dependencies can be other packages from capsis4/src directory and/or .jar files from capsis4/ext directory.

All dependencies have to be listed in a specific file associated to the package. This file has to be:
- called
- stored in capsis4/etc/check-dependencies directory.

In order to check the dependencies of a package, you have to type the following command from the capsis4 directory:

On Linux/macOS:

sh ant check-dependencies

On Windows:

ant check-dependencies

where is the name of a package stored in capsis4/src directory.

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

sh ant check-dependencies

will compile the capsis4/src/capsis/lib/biomechanics source files (package name: capsis.lib.biomechanics) using the dependencies listed in capsis4/etc/check-dependencies/capsis.lib.biomechanics-dependencies.txt file.

You can see below an example of the content of capsis.lib.biomechanics-dependencies.txt file:

# List of dependencies: package names and .jar files (one per line).

The compilation of capsis.lib.biomechanics package is launched with 6 dependencies:
- five packages from capsis4/src directory: capsis.kernel, capsis.commongui.util, capsis.util, capsis.lib.rubberband, capsis.defaulttype
- one .jar file from capsis4/ext directory: jeeb-util.jar

- Before launching check-dependencies target, you have to launch one time the clean compile targets in order to generate compiled files in capsis4/class directory.
- check-dependencies target is not built depending on clean compile because we do not want clean compile to be run each time a dependency is added or removed in the file containing the list of dependencies.

documentation/checkdependencies.txt ยท Last modified: 2020/02/13 09:17 by beudez