An SCA contribution is an interoperable packaging format containing all stuff needed to deploy and run SCA composite(s). With FraSCAti, you can embed jar files containing source code, resources, composite files and libraries.
In order to simplify the creation of contribution files, FraSCAti provides two utilities:
a Maven plugin. You can use it as following:
<plugins> <plugin> <groupId>org.ow2.frascati.mojo</groupId> <artifactId>frascati-contribution-plugin</artifactId> <version>1.4</version> <executions> <execution> <id>frascati-contribution</id> <phase>package</phase> <goals> <goal>install</goal> </goals> </execution> </executions> <configuration> <include> <dependency> <groupId>org.ow2.frascati.examples</groupId> <artifactId>counter-server</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>org.ow2.frascati.examples</groupId> <artifactId>counter-client</artifactId> <version>1.4</version> </dependency> </include> <deployables> <deployable>counter-server.composite</deployable> <deployable>counter-client.composite</deployable> </deployables> </configuration> </plugin> </plugins>
It will generate the contribution (zip) file in the target directory.
a utility class: org.ow2.frascati.mojo.ContributionUtil allowing to create contribution files via a simple call:
import org.ow2.frascati.mojo.ContributionUtil; Collection<File> jars = new ArrayList<File>(); Collection<String> deployables = new ArrayList<String>(); jars.add(new File("alib.jar")); jars.add(new File("myapp.jar")); deployables.add("mycomp.composite"); File workingDir = new File("./target"); File contribFile = ContributionUtil.makeContribution(jars, deployables, "mycontribution", workingDir);