Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSGi Metadata #280

Closed
waynebeaton opened this issue Nov 9, 2023 · 12 comments
Closed

Add OSGi Metadata #280

waynebeaton opened this issue Nov 9, 2023 · 12 comments
Assignees

Comments

@waynebeaton
Copy link
Collaborator

Let's make the core artifact into an OSGi bundle.

@stbischof
Copy link
Contributor

@waynebeaton could you please assign me to do this issue ?

@stbischof
Copy link
Contributor

stbischof commented Sep 26, 2024

@waynebeaton
@HannesWell
@merks

Does anyone have some requirements?

Options:

  • full reproducible build
  • Export only some Packages
  • Package versioning
  • Base-lining / Semantic Versioning check link
  • test execution in OSGi Framework

Here would be my first Draft with bnd-maven plugin:
MANIFEST.MF:

Manifest-Version: 1.0
Bundle-Copyright: Copyright (c) (2024) Contributors to the Eclipse Fou
 ndation.
Bundle-Description: The Eclipse Dash License Tool identifies the licen
 ses of 		content.
Bundle-DocURL: https://github.com/eclipse-dash/dash-licenses
Bundle-License: "Eclipse Public License 2.0";link="https://www.eclipse
 .org/org/documents/epl-2.0/EPL-2.0.txt"
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse Dash License Tool Core and CLI
Bundle-SCM: url="https://github.com/eclipse-dash/dash-licenses",develo
 per-connection="scm:git:[email protected]:eclipse-dash/dash-licenses.git
 /org.eclipse.dash.licenses.core",tag=HEAD
Bundle-SymbolicName: org.eclipse.dash.licenses.core
Bundle-Vendor: The Eclipse Dash Project
Bundle-Version: 1.1.1.202409261206
Export-Package: org.eclipse.dash.licenses;uses:="jakarta.inject,org.ec
 lipse.dash.licenses.spdx";version="1.1.1",org.eclipse.dash.licenses.c
 learlydefined;uses:="jakarta.json,org.eclipse.dash.licenses";version=
 "1.1.1",org.eclipse.dash.licenses.cli;uses:="org.eclipse.dash.license
 s";version="1.1.1",org.eclipse.dash.licenses.context;uses:="com.googl
 e.inject,org.eclipse.dash.licenses";version="1.1.1",org.eclipse.dash.
 licenses.foundation;uses:="jakarta.json,org.eclipse.dash.licenses";ve
 rsion="1.1.1",org.eclipse.dash.licenses.http;version="1.1.1",org.ecli
 pse.dash.licenses.review;uses:="org.eclipse.dash.licenses,org.eclipse
 .dash.licenses.cli,org.gitlab4j.api,org.gitlab4j.api.models";version=
 "1.1.1",org.eclipse.dash.licenses.spdx;version="1.1.1",org.eclipse.da
 sh.licenses.util;uses:="jakarta.json,org.eclipse.dash.licenses";versi
 on="1.1.1",org.eclipse.dash.licenses.validation;version="1.1.1"
Git-Descriptor: 1.1.0-77-g3853a9cff-dirty
Git-SHA: 3853a9cff5a56fd62c8727a59f76f4f7bae59bdc
Import-Package: com.google.common.collect;version="[31.0,32)",com.goog
 le.inject;version="[1.4,2)",com.google.inject.binder;version="[1.4,2)
 ",com.google.inject.multibindings;version="[1.4,2)",com.google.inject
 .util;version="[1.4,2)",jakarta.inject;version="[2.0,3)",jakarta.json
 ;version="[2.0,3)",jakarta.json.stream;version="[2.0,3)",java.io,java
 .lang,java.lang.invoke,java.net,java.net.http,java.nio.charset,java.t
 ime,java.util,java.util.concurrent.atomic,java.util.function,java.uti
 l.regex,java.util.stream,org.apache.commons.cli;version="[1.6,2)",org
 .eclipse.dash.api,org.eclipse.dash.licenses,org.eclipse.dash.licenses
 .clearlydefined,org.eclipse.dash.licenses.cli,org.eclipse.dash.licens
 es.context,org.eclipse.dash.licenses.foundation,org.eclipse.dash.lice
 nses.http,org.eclipse.dash.licenses.review,org.eclipse.dash.licenses.
 spdx,org.eclipse.dash.licenses.util,org.eclipse.dash.licenses.validat
 ion,org.eclipse.jgit.api;version="[6.10,7)",org.eclipse.jgit.api.erro
 rs;version="[6.10,7)",org.eclipse.jgit.lib;version="[6.10,7)",org.ecl
 ipse.jgit.transport;version="[6.10,7)",org.gitlab4j.api,org.gitlab4j.
 api.models,org.slf4j;version="[1.7,2)",org.yaml.snakeyaml;version="[2
 .2,3)",org.yaml.snakeyaml.constructor;version="[2.2,3)",org.yaml.snak
 eyaml.introspector;version="[2.2,3)",org.yaml.snakeyaml.representer;v
 ersion="[2.2,3)"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
SPDX-License-Identifier: Eclipse Public License 2.0

in pritty Print

[MANIFEST]

Bundle-Copyright                        Copyright (c) (2024) Contributors to the Eclipse Foundation.
Bundle-Description                      The Eclipse Dash License Tool identifies the licenses of 		content.
Bundle-DocURL                           https://github.com/eclipse-dash/dash-licenses
Bundle-License                          "Eclipse Public License 2.0";link="https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt"
Bundle-ManifestVersion                  2
Bundle-Name                             Eclipse Dash License Tool Core and CLI
Bundle-SCM                              developer-connection="scm:git:[email protected]:eclipse-dash/dash-licenses.git/org.eclipse.dash.licenses.core"
                                        tag=HEAD
                                        url="https://github.com/eclipse-dash/dash-licenses"
Bundle-SymbolicName                     org.eclipse.dash.licenses.core
Bundle-Vendor                           The Eclipse Dash Project
Bundle-Version                          1.1.1.202409261206
Export-Package                          org.eclipse.dash.licenses.clearlydefined;uses:="jakarta.json,org.eclipse.dash.licenses";version="1.1.1"
                                        org.eclipse.dash.licenses.cli;uses:="org.eclipse.dash.licenses";version="1.1.1"
                                        org.eclipse.dash.licenses.context;uses:="com.google.inject,org.eclipse.dash.licenses";version="1.1.1"
                                        org.eclipse.dash.licenses.foundation;uses:="jakarta.json,org.eclipse.dash.licenses";version="1.1.1"
                                        org.eclipse.dash.licenses.http;version="1.1.1"
                                        org.eclipse.dash.licenses.review;uses:="org.eclipse.dash.licenses,org.eclipse.dash.licenses.cli,org.gitlab4j.api,org.gitlab4j.api.models";version="1.1.1"
                                        org.eclipse.dash.licenses.spdx;version="1.1.1"
                                        org.eclipse.dash.licenses.util;uses:="jakarta.json,org.eclipse.dash.licenses";version="1.1.1"
                                        org.eclipse.dash.licenses.validation;version="1.1.1"
                                        org.eclipse.dash.licenses;uses:="jakarta.inject,org.eclipse.dash.licenses.spdx";version="1.1.1"
Git-Descriptor                          1.1.0-77-g3853a9cff-dirty
Git-SHA                                 3853a9cff5a56fd62c8727a59f76f4f7bae59bdc
Import-Package                          com.google.common.collect;version="[31.0,32)"
                                        com.google.inject.binder;version="[1.4,2)"
                                        com.google.inject.multibindings;version="[1.4,2)"
                                        com.google.inject.util;version="[1.4,2)"
                                        com.google.inject;version="[1.4,2)"
                                        jakarta.inject;version="[2.0,3)"
                                        jakarta.json.stream;version="[2.0,3)"
                                        jakarta.json;version="[2.0,3)"
                                        java.io
                                        java.lang
                                        java.lang.invoke
                                        java.net
                                        java.net.http
                                        java.nio.charset
                                        java.time
                                        java.util
                                        java.util.concurrent.atomic
                                        java.util.function
                                        java.util.regex
                                        java.util.stream
                                        org.apache.commons.cli;version="[1.6,2)"
                                        org.eclipse.dash.api
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.review
                                        org.eclipse.dash.licenses.spdx
                                        org.eclipse.dash.licenses.util
                                        org.eclipse.dash.licenses.validation
                                        org.eclipse.jgit.api.errors;version="[6.10,7)"
                                        org.eclipse.jgit.api;version="[6.10,7)"
                                        org.eclipse.jgit.lib;version="[6.10,7)"
                                        org.eclipse.jgit.transport;version="[6.10,7)"
                                        org.gitlab4j.api
                                        org.gitlab4j.api.models
                                        org.slf4j;version="[1.7,2)"
                                        org.yaml.snakeyaml.constructor;version="[2.2,3)"
                                        org.yaml.snakeyaml.introspector;version="[2.2,3)"
                                        org.yaml.snakeyaml.representer;version="[2.2,3)"
                                        org.yaml.snakeyaml;version="[2.2,3)"
Manifest-Version                        1.0
Require-Capability                      osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
SPDX-License-Identifier                 Eclipse Public License 2.0


[IMPEXP]

Import-Package
  com.google.common.collect              {version=[31.0,32)}
  com.google.inject                      {version=[1.4,2)}
  com.google.inject.binder               {version=[1.4,2)}
  com.google.inject.multibindings        {version=[1.4,2)}
  com.google.inject.util                 {version=[1.4,2)}
  jakarta.inject                         {version=[2.0,3)}
  jakarta.json                           {version=[2.0,3)}
  jakarta.json.stream                    {version=[2.0,3)}
  java.io                                
  java.lang                              
  java.lang.invoke                       
  java.net                               
  java.net.http                          
  java.nio.charset                       
  java.time                              
  java.util                              
  java.util.concurrent.atomic            
  java.util.function                     
  java.util.regex                        
  java.util.stream                       
  org.apache.commons.cli                 {version=[1.6,2)}
  org.eclipse.dash.api                   
  org.eclipse.dash.licenses              
  org.eclipse.dash.licenses.clearlydefined 
  org.eclipse.dash.licenses.cli          
  org.eclipse.dash.licenses.context      
  org.eclipse.dash.licenses.foundation   
  org.eclipse.dash.licenses.http         
  org.eclipse.dash.licenses.review       
  org.eclipse.dash.licenses.spdx         
  org.eclipse.dash.licenses.util         
  org.eclipse.dash.licenses.validation   
  org.eclipse.jgit.api                   {version=[6.10,7)}
  org.eclipse.jgit.api.errors            {version=[6.10,7)}
  org.eclipse.jgit.lib                   {version=[6.10,7)}
  org.eclipse.jgit.transport             {version=[6.10,7)}
  org.gitlab4j.api                       
  org.gitlab4j.api.models                
  org.slf4j                              {version=[1.7,2)}
  org.yaml.snakeyaml                     {version=[2.2,3)}
  org.yaml.snakeyaml.constructor         {version=[2.2,3)}
  org.yaml.snakeyaml.introspector        {version=[2.2,3)}
  org.yaml.snakeyaml.representer         {version=[2.2,3)}

Export-Package
  org.eclipse.dash.licenses              {version=1.1.1}
  org.eclipse.dash.licenses.clearlydefined {version=1.1.1}
  org.eclipse.dash.licenses.cli          {version=1.1.1}
  org.eclipse.dash.licenses.context      {version=1.1.1}
  org.eclipse.dash.licenses.foundation   {version=1.1.1}
  org.eclipse.dash.licenses.http         {version=1.1.1}
  org.eclipse.dash.licenses.review       {version=1.1.1}
  org.eclipse.dash.licenses.spdx         {version=1.1.1}
  org.eclipse.dash.licenses.util         {version=1.1.1}
  org.eclipse.dash.licenses.validation   {version=1.1.1}

[CAPABILITIES]

Require-Capability
  osgi.ee                                {filter:=(&(osgi.ee=JavaSE)(version=11))}

[COMPONENTS]



[METATYPE]



[API USES]


[USES]

org.eclipse.dash.licenses               jakarta.inject
                                        jakarta.json
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.spdx
                                        org.eclipse.dash.licenses.util
                                        org.slf4j
org.eclipse.dash.licenses.clearlydefined jakarta.inject
                                        jakarta.json
                                        jakarta.json.stream
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.util
                                        org.slf4j
org.eclipse.dash.licenses.cli           com.google.inject
                                        jakarta.json
                                        org.apache.commons.cli
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.review
                                        org.eclipse.dash.licenses.util
                                        org.eclipse.dash.licenses.validation
                                        org.slf4j
                                        org.yaml.snakeyaml
                                        org.yaml.snakeyaml.constructor
                                        org.yaml.snakeyaml.introspector
                                        org.yaml.snakeyaml.representer
org.eclipse.dash.licenses.context       com.google.inject
                                        com.google.inject.binder
                                        com.google.inject.multibindings
                                        com.google.inject.util
                                        org.eclipse.dash.api
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.review
org.eclipse.dash.licenses.foundation    jakarta.inject
                                        jakarta.json
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.http
                                        org.slf4j
org.eclipse.dash.licenses.http          jakarta.inject
                                        org.eclipse.dash.licenses
                                        org.slf4j
org.eclipse.dash.licenses.review        com.google.common.collect
                                        jakarta.inject
                                        org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.util
                                        org.gitlab4j.api
                                        org.gitlab4j.api.models
                                        org.slf4j
org.eclipse.dash.licenses.spdx          
org.eclipse.dash.licenses.util          jakarta.json
                                        org.eclipse.dash.licenses
                                        org.eclipse.jgit.api
                                        org.eclipse.jgit.api.errors
                                        org.eclipse.jgit.lib
                                        org.eclipse.jgit.transport
org.eclipse.dash.licenses.validation    jakarta.inject
                                        org.eclipse.dash.api
                                        org.eclipse.dash.licenses.review
                                        org.slf4j


[USEDBY]

com.google.common.collect               org.eclipse.dash.licenses.review
com.google.inject                       org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.context
com.google.inject.binder                org.eclipse.dash.licenses.context
com.google.inject.multibindings         org.eclipse.dash.licenses.context
com.google.inject.util                  org.eclipse.dash.licenses.context
jakarta.inject                          org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.review
                                        org.eclipse.dash.licenses.validation
jakarta.json                            org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.util
jakarta.json.stream                     org.eclipse.dash.licenses.clearlydefined
org.apache.commons.cli                  org.eclipse.dash.licenses.cli
org.eclipse.dash.api                    org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.validation
org.eclipse.dash.licenses               org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.review
                                        org.eclipse.dash.licenses.util
org.eclipse.dash.licenses.clearlydefined org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.review
org.eclipse.dash.licenses.cli           org.eclipse.dash.licenses.review
org.eclipse.dash.licenses.context       org.eclipse.dash.licenses.cli
org.eclipse.dash.licenses.foundation    org.eclipse.dash.licenses.context
org.eclipse.dash.licenses.http          org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.foundation
org.eclipse.dash.licenses.review        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.context
                                        org.eclipse.dash.licenses.validation
org.eclipse.dash.licenses.spdx          org.eclipse.dash.licenses
org.eclipse.dash.licenses.util          org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.review
org.eclipse.dash.licenses.validation    org.eclipse.dash.licenses.cli
org.eclipse.jgit.api                    org.eclipse.dash.licenses.util
org.eclipse.jgit.api.errors             org.eclipse.dash.licenses.util
org.eclipse.jgit.lib                    org.eclipse.dash.licenses.util
org.eclipse.jgit.transport              org.eclipse.dash.licenses.util
org.gitlab4j.api                        org.eclipse.dash.licenses.review
org.gitlab4j.api.models                 org.eclipse.dash.licenses.review
org.slf4j                               org.eclipse.dash.licenses
                                        org.eclipse.dash.licenses.clearlydefined
                                        org.eclipse.dash.licenses.cli
                                        org.eclipse.dash.licenses.foundation
                                        org.eclipse.dash.licenses.http
                                        org.eclipse.dash.licenses.review
                                        org.eclipse.dash.licenses.validation
org.yaml.snakeyaml                      org.eclipse.dash.licenses.cli
org.yaml.snakeyaml.constructor          org.eclipse.dash.licenses.cli
org.yaml.snakeyaml.introspector         org.eclipse.dash.licenses.cli
org.yaml.snakeyaml.representer          org.eclipse.dash.licenses.cli

@merks
Copy link

merks commented Sep 26, 2024

I wonder about some of the version ranges on the package imports.

Guava is currently at version 33.3.0.jre. Many projects have been "working hard" to get rid of guava because they have a bad habit of breaking API and produce new major versions. Ideally this dependency would not be there...

JGit released 7.0.0 for 2024-09 so probably best to update that.

@waynebeaton
Copy link
Collaborator Author

@merks I was looking at Guava just last night. We have a security advisory on the version that gets resolved by the build. I'd been tinkering with forcing the use of an updated version.

It's a transitive dependency of Guice. I don't think that I can remove it completely.

@waynebeaton
Copy link
Collaborator Author

Options:

full reproducible build

Nice to have.

Export only some Packages

No opinion.

Package versioning

No opinion beyond the component versioning that is expressed in the pom files.

Base-lining / Semantic Versioning check [link](https://github.com/bndtools/bnd/tree/master/maven-plugins/bnd-baseline-maven-plugin)

Nice to have.

test execution in OSGi Framework

Tests are always good.

@stbischof
Copy link
Contributor

stbischof commented Sep 26, 2024

All versions are calculated by bnd - so ots just the used versions. PR #377

@waynebeaton
Copy link
Collaborator Author

JGit released 7.0.0 for 2024-09 so probably best to update that.

I've updated the Maven build to use this version.

@HannesWell
Copy link
Contributor

It's a transitive dependency of Guice. I don't think that I can remove it completely.

Unfortunately yes and I proposed dropping at google/guice#1785 and already did some work.
In general with some good will and effort and probably Java-11 I think it would be feasible, but I have the impression there is not much interest from the Guice maintainers in that.

But to avoid Guava in this repo I created #386.

@waynebeaton
Copy link
Collaborator Author

JGit released 7.0.0 for 2024-09 so probably best to update that.

I've updated the Maven build to use this version.

@merks FYI, JGit 7.0.0+ requires Java 17. I didn't notice until the Jenkins build failed. I hesitate to update the JRE requirement without putting some more thought into it, so I'm going to revert to the most recent release in the 6.x stream.

I've opened #388 to discuss updating to Java 17. I'm thinking that we should just do it, but want to capture the decision explicitly.

waynebeaton added a commit that referenced this issue Sep 27, 2024
@merks
Copy link

merks commented Sep 28, 2024

I see. Yes, as we merrily progress to Java 21 for SimRel, it's easy to overlook that there is also significant merit it running on older versions of Java. For what it's worth, when moving to version 7.x's APIs in Oomph there was only a single deprecated method removed that had an impact....

@stbischof
Copy link
Contributor

@HannesWell here is no close button for me to close this. could you please

@waynebeaton
Copy link
Collaborator Author

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants