[
https://issues.apache.org/jira/browse/FELIX-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875449#action_12875449
]
Freeman Fang commented on FELIX-2388:
-------------------------------------
Hi Willem,
I believe systemExports property in ValidateFeaturesMojo already take care of
it.
Please see the code
{code}
public boolean visit(DependencyNode node) {
if (node.getState() != DependencyNode.OMITTED_FOR_CONFLICT) {
Artifact artifact = node.getArtifact();
info(" scanning %s for exports", artifact);
if (Artifact.SCOPE_PROVIDED.equals(artifact.getScope()) &&
!artifact.getType().equals("pom")) {
try {
for (Clause clause :
ManifestUtils.getExports(getManifest(artifact))) {
getLog().debug(" adding " + clause.getName() +
" to list of available packages");
systemExports.add(clause.getName());
}
...
{code}
systemExports will add artifacts package automatically if it's scope is
provided in the pom.xml. Just like
{code}
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>${felix.framework.version}</version>
<scope>provided</scope>
</dependency>
{code}
So what you need do is just add dependency to the pom as provided scope, and
the package in that artifact is available for the features validate plugin.
IMHO, leverage the maven dependency mechanism and add package automatically is
more reasonable than specify each package yourself.
Anyway, thanks for this patch.
Freeman
> Karaf feature validate plugin should take the osgi system package into
> consideration
> ------------------------------------------------------------------------------------
>
> Key: FELIX-2388
> URL: https://issues.apache.org/jira/browse/FELIX-2388
> Project: Felix
> Issue Type: Improvement
> Components: Karaf
> Reporter: Willem Jiang
> Assignee: Freeman Fang
> Fix For: karaf 1.8.0
>
> Attachments: FELIX-2388.patch
>
>
> Because Karaf exports this packages by default, when using the validate
> plugin to validate the features, it should treat the osgi system packages of
> the configure.properties as the default export package.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.