You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org> on 2011/03/08 13:08:59 UTC

[jira] Created: (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
----------------------------------------------------------------------------------------------------

                 Key: FELIX-2873
                 URL: https://issues.apache.org/jira/browse/FELIX-2873
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-2.3.4
            Reporter: Pierre-Arnaud Marcelot
            Priority: Blocker


Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

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

Pierre-Arnaud Marcelot updated FELIX-2873:
------------------------------------------

    Attachment: MANIFEST.MF

Here's the resulting MANIFEST.MF file, which contains packages like 'net.jcip.annotations' and 'edu.umd.cs.findbugs.annotations' from a provided dependency.

> Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2873
>                 URL: https://issues.apache.org/jira/browse/FELIX-2873
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.4
>            Reporter: Pierre-Arnaud Marcelot
>            Priority: Blocker
>         Attachments: MANIFEST.MF, pom.xml
>
>
> Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

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

Pierre-Arnaud Marcelot updated FELIX-2873:
------------------------------------------

    Attachment: pom.xml

Here's a pom.xml demonstrating the issue.

> Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2873
>                 URL: https://issues.apache.org/jira/browse/FELIX-2873
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.4
>            Reporter: Pierre-Arnaud Marcelot
>            Priority: Blocker
>         Attachments: pom.xml
>
>
> Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050530#comment-13050530 ] 

Pierre-Arnaud Marcelot commented on FELIX-2873:
-----------------------------------------------

Thanks for the "<_exportcontents>" directive trick.
This one seems based on the scope of the "<Embed-Dependency>" directive.

> Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2873
>                 URL: https://issues.apache.org/jira/browse/FELIX-2873
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.4
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Stuart McCulloch
>            Priority: Blocker
>         Attachments: MANIFEST.MF, pom.xml
>
>
> Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

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

Stuart McCulloch resolved FELIX-2873.
-------------------------------------

    Resolution: Invalid
      Assignee: Stuart McCulloch

The observed change in behaviour is due to FELIX-2817 which fixed the manifest goal to honor the supportedProjectTypes configuration setting. This change means that the manifest goal now does a full bnd analysis to generate the manifest whereas originally it did a quick analysis, which skipped checking the full project classpath.

The problem is in the example bundle instructions, it has:
{code}
<Export-Package>*</Export-Package>
{code}
Which tells bnd to export the complete project classpath - this includes compile, runtime, _and_ provided dependencies. Instead it should use:
{code}
<_exportcontents>*</_exportcontents>
{code}
Which tells bnd to export whatever ends up packaged inside the bundle (ie. not the full project classpath).

Also note that because you have a "maven-jar-plugin" entry which pulls the generated "META-INF/MANIFEST.MF" back in before the bundleplugin runs you should remove this file so that bnd can re-generate it from scratch (otherwise it will pick up the existing instructions and you will likely end up with the same results).


> Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2873
>                 URL: https://issues.apache.org/jira/browse/FELIX-2873
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.4
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Stuart McCulloch
>            Priority: Blocker
>         Attachments: MANIFEST.MF, pom.xml
>
>
> Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (FELIX-2873) Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't

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

Stuart McCulloch edited comment on FELIX-2873 at 6/16/11 2:46 PM:
------------------------------------------------------------------

The observed change in behaviour is due to FELIX-2817 which fixed the manifest goal to honor the supportedProjectTypes configuration setting. This change means that the manifest goal now does a full bnd analysis to generate the manifest whereas originally it did a quick analysis, which skipped checking the full project classpath.

The problem is in the example bundle instructions, it has:

   <Export-Package>*</Export-Package>

Which tells bnd to export the complete project classpath - this includes compile, runtime, _and_ provided dependencies. Instead it should use:

   <_exportcontents>*</_exportcontents>

Which tells bnd to export whatever ends up packaged inside the bundle (ie. not the full project classpath).

Also note that because you have a "maven-jar-plugin" entry which pulls the generated "META-INF/MANIFEST.MF" back in before the bundleplugin runs you should remove this file so that bnd can re-generate it from scratch (otherwise it will pick up the existing instructions and you will likely end up with the same results).


      was (Author: mcculls):
    The observed change in behaviour is due to FELIX-2817 which fixed the manifest goal to honor the supportedProjectTypes configuration setting. This change means that the manifest goal now does a full bnd analysis to generate the manifest whereas originally it did a quick analysis, which skipped checking the full project classpath.

The problem is in the example bundle instructions, it has:
{code}
<Export-Package>*</Export-Package>
{code}
Which tells bnd to export the complete project classpath - this includes compile, runtime, _and_ provided dependencies. Instead it should use:
{code}
<_exportcontents>*</_exportcontents>
{code}
Which tells bnd to export whatever ends up packaged inside the bundle (ie. not the full project classpath).

Also note that because you have a "maven-jar-plugin" entry which pulls the generated "META-INF/MANIFEST.MF" back in before the bundleplugin runs you should remove this file so that bnd can re-generate it from scratch (otherwise it will pick up the existing instructions and you will likely end up with the same results).

  
> Dependencies with 'provided' scope gets added to the 'Export-Package' directive while they shouldn't
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2873
>                 URL: https://issues.apache.org/jira/browse/FELIX-2873
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.4
>            Reporter: Pierre-Arnaud Marcelot
>            Assignee: Stuart McCulloch
>            Priority: Blocker
>         Attachments: MANIFEST.MF, pom.xml
>
>
> Since version 3.2.4, the plugin adds dependencies with 'provided' scope to the 'Export-Package' directive even when Embed-Dependency only includes 'compile' or/and 'runtime' scopes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira