[
https://issues.apache.org/jira/browse/FELIX-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476596
]
Stuart McCulloch commented on FELIX-218:
----------------------------------------
BTW, I'm working on the beginnings of a maven archetype that uses this
functionality to provide a single manifest shared between Eclipse and
maven/BND. The manifest is included in the instructions sent to the BND tool
and extracted from the generated jarfile at the end of the packaging phase (not
strictly necessary, but it makes sure the manifest is the same).
In case anyone is interested, it's available from
https://scm.ops4j.org/repos/ops4j/laboratory/users/stuart/maven/archetypes/pax-bundle-archetype
To create a new pax bundle project with basic Eclipse JDT settings, checkout
and install the archetype (mvn install) and enter:
mvn archetype:create -Peclipse \
-DarchetypeGroupId=org.ops4j.pax.maven \
-DarchetypeArtifactId=pax-bundle-archetype \
-DarchetypeVersion=0.1.0-SNAPSHOT \
-DgroupId=com.example \
-DartifactId=test \
-DpackageName=com.example.test \
-Dversion=0.4.0-SNAPSHOT
Note: this archetype doesn't yet add PDE support to the Eclipse project and is
liable to change at any time :)
It also requires patched versions of the BND tool and maven bundle plugin in
your local ~/.m2/repository
> Support BND directives in maven-bundle-plugin section of pom.xml
> ----------------------------------------------------------------
>
> Key: FELIX-218
> URL: https://issues.apache.org/jira/browse/FELIX-218
> Project: Felix
> Issue Type: Improvement
> Components: Maven Plugin
> Affects Versions: 1.0.0
> Reporter: Stuart McCulloch
> Priority: Minor
> Fix For: 1.0.0
>
> Attachments: bnd_include_directive.patch,
> bnd_include_directive_and_handle_manifests.patch, support_directives.patch
>
>
> The latest snapshot of the maven-bundle-plugin doesn't support BND directives
> (such as -donotcopy) in the pom.xml
> Unfortunately we can't have XML tags that start with '-', so we have to use
> '_' in the XML and convert this to '-' in the plugin.
> For example:
> <configuration>
> <instructions>
> <bundleName>My Bundle</bundleName>
> ... etc ...
> <_donotcopy>(CVS|.svn|.+.bak|~.+)</_donotcopy>
> </instructions>
> </configuration>
> I have a simple patch for this issue, which also adds support for the
> '-include' directive to let you drag in other property files.
> This can be useful if you have a common set of manifest entries defined in a
> parent project - however, this requires a patch
> to BND to expose an API to process the include directive, as currently it's
> only processed when properties are loaded from
> a file - not when they are set programatically.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.