1

When I download the protobuf-javalite-3.17.3 pom: https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.pom I can see inside

<packaging>bundle</packaging>

What packaging : bundle mean exactly? on https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/ I can see that their is a protobuf-javalite-3.17.3.jar but no protobuf-javalite-3.17.3.bundle, so do I need to download instead the protobuf-javalite-3.17.3.jar ?

zeus
  • 12,173
  • 9
  • 63
  • 184
  • 2
    Packging bundle means it will create an OSGi bundle. A bundle is simply a jar file with special information in the `MANIFEST.MF` file... – khmarbaise Nov 04 '22 at 11:26
  • 1
    @khmarbaise so you mean that in my project I can simply include the equivalent jar file when I encounter a packaging: bundle ? here i just need to include in my project protobuf-javalite-3.17.3.jar right ? – zeus Nov 04 '22 at 12:44
  • 1
    Yes you can use the usual dependency which means a jar file ... that should work.. Apart from using an old version which 3.17.X is use a more recent versions .... – khmarbaise Nov 04 '22 at 12:47
  • I allowed myself to formulate an extended version of @khmarbaise 's comments as an answer post below. – Krokomot Jun 02 '23 at 08:39

1 Answers1

1

Though the question has basically been answered in the comments by @khmarbaise, some references and elaboration might be useful.

According to the chapter in Maven's POM Reference on Packaging, the <packaging> tag in a .pom file defines, how a project file has to be packaged. Thereby:

The current core packaging values are: pom, jar, maven-plugin, ejb, war, ear, rar.

The default is jar. Other packaging types can be provided through plugins.

Now, <packaging>bundle</packaging> refers to an OSGi bundle.

Technically, a [OSGi] bundle is just a jar file with a MANIFEST.MF file containing some OSGi-specific headers.

For an overview you might be interested in an Introduction to OSGi.

So, yes. You will want to download the protobuf-javalite-3.17.3.jar. When unzipping it and taking a look into the MANIFEST.MF file you will discover the OSGi-related entry

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))"
Krokomot
  • 3,208
  • 2
  • 4
  • 20