Usage
It is recommended that you kick-start a Cecilia application project using the maven-archetype-cecilia-application} or maven-archetype-cecilia-library}. It will generate a template source tree structure and a pom.xml file with a lot of things already configured, among which this Maven plugin, whose configuration looks like the following:
<!--
This is the pom.xml of your Cecilia application
-->
<project>
<groupId>your_project_groupid</groupId>
<artifactId>your_project_name</artifactId>
<!--
this packaging is to indicate the nature of the project and will be
handled by the "maven-cecilia-plugin" in the <build> section.
-->
<packaging>cecilia-application</packaging>
<dependencies>
<dependency>
<groupId>org.objectweb.fractal.cecilia</groupId>
<artifactId>cecilia-baselib</artifactId>
<!-- value of the cecilia.version property defined before -->
<version>${cecilia.version}</version>
<!-- Cecilia libraries are package as .car files -->
<type>car</type>
</dependency>
<!-- other Cecilia libraries you need in your application -->
</dependencies>
<build>
<plugins>
<!-- ================================================================= -->
<!-- maven-cecilia-plugin -->
<plugin>
<groupId>org.objectweb.fractal.cecilia</groupId>
<artifactId>maven-cecilia-plugin</artifactId>
<version>${cecilia.version}</version>
<extensions>true</extensions>
</plugin>
<!-- ================================================================= -->
<!-- maven-ceciliaadl-plugin to invoke the Cecilia ADL Launcher -->
<plugin>
<groupId>org.objectweb.fractal.cecilia.toolchain</groupId>
<artifactId>maven-ceciliaadl-plugin</artifactId>
<version>${cecilia.version}</version>
<configuration>
<target>unix</target>
<adl>helloworld.Helloworld:helloworld</adl>
<arguments>
<properties>
<file>flags.properties</file>
</properties>
</arguments>
</configuration>
</plugin>
<!-- ================================================================= -->
</plugins>
</build>
</project>
In the <configuration> section of the maven-ceciliaadl-plugin you can configure the following things (see compile goal for details):
- (mandatory) the <target> you want to compile for by means of the Cecilia ADL Launcher (currently, you most probably want the "unix" target)
- (mandatory) the <adl> you want to compile by means of the Cecilia ADL Launcher
- an ordered list of <arguments> to pass to it, which can be in 2 forms
- as simple (name,value) pairs
- as path to properties file
The Cecilia compiler will then be invoked with the following command line:
$ ceciliac adl -name_1=value_1 -name_2=value_2 ... -name_n=value_n
ADL checking mode
Since Cecilia 2.1, this plugin can separate checking of the correctness of the ADL (and the associated IDL files, if any) and code generation + compilation/linking/archiving.
This mode is especially useful for Cecilia libraries: this way, you can check the correctness of the ADL/IDL contained in the library, without having to make applications that use the library.
You can activate this mode by typing
mvn compile ceciliaadl:check
or adding the --check-adl flag to the ceciliac invocation.
It will check all files given in the <configuration> section of the pom.xml:
<project>
...
<packaging>cecilia-library</packaging>
...
<build>
<plugins>
<plugin>
<groupId>org.objectweb.fractal.cecilia</groupId>
<artifactId>maven-cecilia-plugin</artifactId>
<version>${cecilia.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.objectweb.fractal.cecilia.toolchain</groupId>
<artifactId>maven-ceciliaadl-plugin</artifactId>
<version>${cecilia.version}</version>
<configuration>
<adl>packagename.ComponentDefinition</adl>
</configuration>
</plugin>
</plugins>
</build>
</project>
or
<project>
...
<packaging>cecilia-library</packaging>
...
<build>
<plugins>
<plugin>
<groupId>org.objectweb.fractal.cecilia</groupId>
<artifactId>maven-cecilia-plugin</artifactId>
<version>${cecilia.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.objectweb.fractal.cecilia.toolchain</groupId>
<artifactId>maven-ceciliaadl-plugin</artifactId>
<version>${cecilia.version}</version>
<configuration>
<adls>
<adl><definition>packagename.ComponentDefinition</definition></adl>
<adl><definition>packagename.ComponentDefinition2</definition></adl>
</adls>
</configuration>
</plugin>
</plugins>
</build>
</project>