You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2010/06/04 05:17:55 UTC

[jira] Created: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

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
             Fix For: karaf 1.8.0


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.


[jira] Commented: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved FELIX-2388.
---------------------------------

    Resolution: Not A Problem

> 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.


[jira] Assigned: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned FELIX-2388:
-----------------------------------

    Assignee: Freeman Fang

> 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.


[jira] Updated: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated FELIX-2388:
--------------------------------

    Attachment: FELIX-2388.patch

> 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
>             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.


[jira] Commented: (FELIX-2388) Karaf feature validate plugin should take the osgi system package into consideration

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875454#action_12875454 ] 

Willem Jiang commented on FELIX-2388:
-------------------------------------

Cool, got it, this provider dependency can do the same that I want to do, it also have lots of flexibilities.


> 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.