Fabric3 applications are packaged in one or more contributions. The following contribution formats are supported:
- JAR archives
- ZIP archives
- WAR archives
- OSGi bundles
- XML documents
JAR Contributions
Most SCA applications will be packaged as one or more JARs, which contain application classes and artifacts. A JAR contribution requires an contribution manifest file (sca-contribution.xml ) in the META-INF
directory.
Fabric3 supports two ways of packaging and deploying libraries used by a contribution: embedding them in the JAR; and importing them from another contribution. Similar to WARs, Fabric3 allows contribution JARs to bundle libraries by placing their JARs in the META-INF/lib
directory, which in turn will be made available on the contribution classpath. Imports are discussed in The Contribution Manifest.
WAR Contributions
Fabric3 supports packaging contributions as WAR files. WAR contributions behave like JAR contributions except the SCA manifest in is placed in WEB-INF
. In addition, libraries and classes in WEB-INF/lib
and WEB-INF/classes
respectively are placed on the contribution classpath. WAR contributions are used for deploying web applications to a domain.
ZIP Contributions
ZIP contributions are identicle to JAR contributions.
OSGi Bundles
Fabric3 also supports packaging contributions as OSGi bundles. In this case, OSGi bundle manifests may be used to export and import packages from other contributions. An SCA manifest file is not required.
Note Export-Package and Import-Package OSGi manifest headers are supported in a limited fashion. Specifically, attribute directives are not supported.
XML Documents
Fabric3 supports XML documents such as configuration files.