If a metamodel was created in an Actifsource project, this usually contains java code which must be compiled before generation or validation. It should therefore be possible to compile such a project via Ant in order to integrate it into the CI/CD pipeline.
The corresponding Ant file can be generated automatically via Project Explorer 'Export->Actifsource->Ant BuildFiel Export':
The Ant file now contains the following two essential targets:
1. export-classpath
This target can be used to collect the class path of a project, which is required to compile the project:
The export dependency can now be configured with the following properties:
2. compile-project
The project can now be compiled using this target:
The 'classpathproperty' property from the 'export-classpath' target is used for the ClassPath.
On github there is an example (Use the ant build file 'asbuild.dynamic.loading.compile_validate_generate.xml'):
The corresponding Ant file can be generated automatically via Project Explorer 'Export->Actifsource->Ant BuildFiel Export':
The Ant file now contains the following two essential targets:
1. export-classpath
This target can be used to collect the class path of a project, which is required to compile the project:
The export dependency can now be configured with the following properties:
- classpathproperty: The project classpath is written to the property and can be used in the antscript.
- classpathseparator: The ClassPath separator (default ;) can be customized.
- classpathfile: The project classpath is written to the file.
- classpathmapproperty: The Project ClasspathMap is written to the property and can be used in the antscript.
- classpathmapfile: The Project ClasspathMap is written to the file.
- dependencytreeproperty: The project dependencytree is written to the property and can be used in the antscript.
- dependencytreefile: The project dependencytree is written to the file.
2. compile-project
The project can now be compiled using this target:
The 'classpathproperty' property from the 'export-classpath' target is used for the ClassPath.
On github there is an example (Use the ant build file 'asbuild.dynamic.loading.compile_validate_generate.xml'):
- See https://github.com/actifsource/ch.actifsource.example.ant