Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java-SCA-1.2
-
None
Description
Details on the discussion on adding manifest entries to Tuscany modules are on this thread:
http://marc.info/?l=tuscany-dev&m=120936893510825&w=2.
Modules will continue to be built as jars, and maven-bundle-plugin will be used to generate the jar manifest (with OSGi headers). This will not have any impact on the normal usage of the jars outside OSGi.
Each module pom.xml will contain an entry that looks like:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-Version>${tuscany.version}</Bundle-Version>
<Bundle-SymbolicName>org.apache.tuscany.sca.assembly</Bundle-SymbolicName>
<Bundle-Description>${pom.name}</Bundle-Description>
<Export-Package>org.apache.tuscany.sca.assembly*</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
If the module dynamically loads classes from packages which are not visible to the module (and yes, we do this in some places), there should also
be an additional <DynamicImport-Package/> entry which lists the packages (packages can be wildcarded).
When a new module is added, the section above (which is from modules/assembly) can be cut-and-paste with the following changes:
1) <Bundle-SymbolicName/> should be unique across all modules, and use the format org.apache.tuscany.sca.<module.name>
2) <Export-Package/> Comma separated list of packages exported by the module. Package name can be wildcarded. To start with, all modules will use wildcarded package names to avoid breakage when new subpackages are added.