[
https://issues.apache.org/jira/browse/FELIX-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stuart McCulloch resolved FELIX-684.
------------------------------------
Resolution: Fixed
Rather than invent a new syntax for filtering dependencies I decided to re-use
the filter code from embedding dependencies:
( this approach also means we retain backwards compatibility, because a simple
name is taken to be a filter on the artifactId )
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin(BND)-Embeddingdependencies
this means you can now exclude dependencies based on clauses:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.5.0-SNAPSHOT</version>
<configuration>
<excludeDependencies>clause,clause,...</excludeDependencies>
<instructions>
<!- usual BND stuff -->
</instructions>
</configuration>
</plugin>
where:
clause ::= MATCH ( ';' attr '=' MATCH )
attr ::= 'groupId' | 'artifactId' | 'version' | 'scope' | 'type' |
'classifier'
MATCH ::= <globbed regular expression>
for example:
<excludeDependencies>*;scope=provided</excludeDependencies>
will exclude all provided scope dependencies from the classpath passed to BND
(mimicking the old behaviour)
> Enable excludeDependencies to check groupId, version, etc. rather than only
> artifactId
> --------------------------------------------------------------------------------------
>
> Key: FELIX-684
> URL: https://issues.apache.org/jira/browse/FELIX-684
> Project: Felix
> Issue Type: Improvement
> Components: Maven Bundle Plugin
> Affects Versions: maven-bundle-plugin-1.4.3
> Reporter: Stefano Lenzi
> Assignee: Stuart McCulloch
> Priority: Minor
> Fix For: maven-bundle-plugin-1.6.0
>
> Attachments: excludedependencies.r686718.patch
>
>
> At the moment maven-bundle-plugin allow a comma separated list as
> excludeDependencies, but this list allows the selection of the dependencies
> to exclude by means of artifacId.
> I'd like to be able to change the behavior of the excludeDependencies in
> order to accept a list of dependencies URI, so that the dependencies will be
> excluded only if it matches the whole URI.
> The URI for a dependency is defined as follow:
> <groupId>:<artifactId>:<type>:<version>:<scope>
> The plugin should try to interpret non full qualified URI, in order to match
> the old behavior and to make the excludeDependecies more user-friendly. For
> instance, depending on the number of colon:
> 0 colon -> <artifactId>
> 1 colon -> <groupId>:<artifactId>
> 2 colon -> <groupId>:<artifactId>:<version>
> 3 colon -> <groupId>:<artifactId>:<type>:<version>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.