FraSCAti Maven plugin

Description

For convenience, FraSCAti provides a plugin (MOJO) for Maven users, allowing to:

  • parse SCA composite files,

  • instanciate SCA components,

  • call a service/method on SCA components.

This MOJO can be used to run your SCA applications such as running an SCA composite in a server mode (if providing services for instance) or invoking services on loaded SCA composites.

Usage

Overview

You can use the FraSCAti factory maven plugin either in the main build step of your build process or in a dedicated maven profile.

Here is an example of a default configuration for this plugin:

<build>                                             
  <defaultGoal>org.ow2.frascati.factory:frascati-factory-plugin:1.1-SNAPSHOT:exec</defaultGoal>
  <plugins>                                                                                    
    <plugin>                                                                                                         
      <groupId>org.ow2.frascati.factory</groupId>                                                                    
      <artifactId>frascati-factory-plugin</artifactId>                                                               
      <executions>                                                                                                   
        <execution>                                                                                                  
          <phase>package</phase>                                                                                     
          <goals>                                                                                                    
            <goal>exec</goal>                                                                                        
          </goals>                                                                                                   
        </execution>                                                                                                 
      </executions>                                                                                                  
      <configuration>                                                                                                
        <loggingConfFile>${logging.conf.file}</loggingConfFile>                                                      
        <composite>${composite.file}</composite>                                                                     
        <service>${service.name}</service>                                                                           
        <method>${method.name}</method>                                                                              
        <methodParams>${method.params}</methodParams>                                                                
      </configuration>                                                                                               
    </plugin>                                                                                                        
  </plugins>                                                                                                         
</build>

Parameters

The FraSCAti factory MOJO can be configured with following parameters:

  • loggingConfFile [optional]: a logging configuration file. A default configuration file is provided at

  • composite [required]: the SCA composite file to load. Can be a path, a resource available in the classpath, or an URL.

  • service [optional]: the name of the service to use.

  • method [optional/required if service is specified]: the name of the method to invoke. If no method is specified, the composite will be run in a server mode.

  • methodParams [optional]: method parameters specified in a single line and space-separated.

  • methodParameters [optional]: allows to define <methodParameter> children as individual parameters. All the text encapsulated in a <methodParameter> tag is considered as a single parameter.