commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-399) OSGI package versions are overly pessimistic, except when they're overly optimisic
Date Sat, 03 Jun 2017 00:23:04 GMT

    [ https://issues.apache.org/jira/browse/COMPRESS-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035682#comment-16035682
] 

ASF GitHub Bot commented on COMPRESS-399:
-----------------------------------------

Github user sesuncedu commented on the issue:

    https://github.com/apache/commons-compress/pull/26
  
    The packageinfo files are in the source tree because they're source files,
    and provide metadata for the package.
    You can also use a package annotation on package-info.java, which puts a
    Class Retention annotation on the packages package-info.class.
    
    Examples:
    
    https://github.com/apache/felix/blob/trunk/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/packageinfo
    
    https://github.com/apache/felix/blob/trunk/converter/
    converter/src/main/java/org/apache/felix/converter/dto/package-info.java
    
    (Requires provided / compileOnly dependency on the osgi annotation bundle).
    
    On Fri, Jun 2, 2017 at 6:11 PM, Jörg Schaible <notifications@github.com>
    wrote:
    
    > Why are those packageinfo files in src/main/java instead of
    > src/main/resources as it is common in Maven builds? Now you have to
    > configure explicitly these files as resources. On top of it, I don't like
    > the idea of modifying these files for each release manually. I'd look for a
    > solution that generates these files automatically into
    > target/generated-resources. Such a plugin should not be difficult.
    >
    > —
    > You are receiving this because you authored the thread.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/commons-compress/pull/26#issuecomment-305920965>,
    > or mute the thread
    > <https://github.com/notifications/unsubscribe-auth/AAZIGza5aeOCDCCwJhvZ1jufn0jZ7BkWks5sAIitgaJpZM4NukX5>
    > .
    >



> OSGI package versions are overly pessimistic, except when they're overly optimisic 
> -----------------------------------------------------------------------------------
>
>                 Key: COMPRESS-399
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-399
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.14
>            Reporter: Simon Spero
>            Priority: Minor
>             Fix For: 1.15
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> The OSGI versions in the current distributions are not being correctly generated.  OSGI
relies on package version numbers following semantic version properly for correct resolution.
 
> Current version numbers have been generated from the maven version. This has lead to
new minor version increases for packages that have no API changed; it has also concealed 
 major (breaking) changes to several packages since 1.0.
> I have created two branches that address the issue.
> Both add the bundle:baseline goal to the verify phase of the build. 
> The also both have packageinfo files added to every package, containing the package version.
These are picked up by the bundle manifest generator, and are used if no explicit version
is given in the "Export-Package" command. 
> Both branches bump the major version number for packages with any minor changes to 2.0.0.
 This makes the bundle correct, but does not fix improper import declarations made by users
of earlier bundles.   
> One branch uses the version number  from the oldest version that has no changes when
compared to HEAD, and which has not had any breaking changes since 1.0.0.  This will fail
the build because version numbers should be increasing, and may cause issues if an importing
bundle uses a range that requires an identical, but higher numbered version of the package
> The other branch uses version 1.14.0 for all packages with no major changes. 
> A third alternative, which I didn't add, is to just set all packages be version 1.14.0,
and just bump major versions when required going forward. The bulk of the major changes happened
a good few versions back,  so it's not as bad as it could be. 
> If you have a preferred option, I can create a pull request on Github 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message