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

It would be nice if jackson had native karaf features #2434

Closed
steinarb opened this issue Aug 28, 2019 · 30 comments
Closed

It would be nice if jackson had native karaf features #2434

steinarb opened this issue Aug 28, 2019 · 30 comments

Comments

@steinarb
Copy link

steinarb commented Aug 28, 2019

Apache karaf features are used by Apache karaf to load runtime dependencies.

When using features karaf is very clever at finding and correctly loading run-time dependencies. The startup problems familiar to developers of OSGi applications are a non-issue when using karaf features to load the applications.

A manually created third party jackson karaf feature exist https://github.com/Code-House/karaf-jackson but that feature isn't actively maintained (last commit was one year ago for jackson 2.8.11). I also have a feature loading some jackson artifacts in my jersey karaf feature https://github.com/steinarb/jersey-karaf-feature (which I will happily abandon if jackson and jersey start providing their own karaf features).

Using the karaf-maven-plugin it is possible to piggyback the creation of karaf features during the regular build. I.e. the features would be created and released with jackson.

The artifacts created by the karaf-maven-plugin consists of attachments with classifier features and type xml to the jar file/OSGi bundle artifacts.

In addition to the feature file attachment of the karaf-maven-plugin, for my own projects, I usually create a semi-manual features.xml file attachment to the top pom, that aggregates all of the feature files of the jar files/OSGi bundle projects. This means I only need to load a single feature file to have all of the features available.

If there is interest in having a jackson karaf feature (or actually: set of features), I can provide a pull request.

@steinarb
Copy link
Author

See also eclipse-ee4j/jersey#4191 (which hasn't received much interest since it was opened on July 5 2019).

@cowtowncoder
Copy link
Member

@steinarb Improvements to OSGi metadata sound like a good improvement, so PR would be nice, would be happy to help merge. The only (?) limitation is that there shouldn't be new runtime dependencies; I assume only Maven build plug-ins are needed.

At this point changes should probably go against 2.10 branch, in order to make them in 2.10 (master is for 3.0.0-SNAPSHOT which won't be out for months).

@steinarb
Copy link
Author

@cowtowncoder No new runtime dependencies will be introduced, only a build dependency to the karaf-maven-plugin. XML files will be created and added to the jar artifacts.

I will work on a PR for the 2.10 branch

@cowtowncoder
Copy link
Member

@steinarb Excellent, sounds good. I am hoping to publish 2.10.0.pr2 quite soon, but will probably wait until early next week. If PR makes it in by then (I'll be out for the weekend but will have time before release), good, if not, there's still some time between that in final 2.10.0.

@steinarb
Copy link
Author

steinarb commented Aug 31, 2019

@cowtowncoder What projects/repos will be affected by, and included in, the 2.10 release? I assume jackson-core, but which others? The ones in the jackson-bom? Is there a master POM where it is possible to put <pluginManagement> configurations?

@steinarb
Copy link
Author

steinarb commented Aug 31, 2019

Answering my own question, looking at https://github.com/FasterXML/jackson#active-jackson-projects I think that the repos that I need to fork and create PR in, are:

@cowtowncoder This was a lot of repos to fork and modify, so I have a feeling that I may have promised more than I can keep, especially with the 2.10 target. But I will try! :-)

@cowtowncoder
Copy link
Member

Yes, that looks like most things. No need to do datatype-jdk7 any more, but add:

Now: now worries about 2.10.0. We'll do what we can. I did push 2.10.0.pr2 already, just because I figure that gives more time for other testing.

@steinarb
Copy link
Author

@cowtowncoder The following repos had problems, so I'm focusing on the others (including the ones you listed in the previous comments):

Note: I haven't investigated any of the build errors mentioned below. I just did a quick "mvn clean install" to get a baseline before doing the changes.

@steinarb
Copy link
Author

steinarb commented Aug 31, 2019

@cowtowncoder Looks like I need to add oss-parent to the list. That's where the configuration of maven-bundle-plugin resides, and it would be natural to put the karaf-maven-plugin next to it (that's what I've done in my own projects).

Or should I put the configuration into jackson-parent? oss-parent is not versioned as often as jackson proper, and has no 2.10 branch. I guess I go for jackson-parent for now, unless I hear something else.

@steinarb
Copy link
Author

Another complication: jackson-parent has a fixed version 2.10.pr2 rather than a SNAPSHOT version, so I can't modify it (the version from maven central is used instead).

I guess I can move it down into jackson-base, and replicate the configuration in jackson-annotation...?

@steinarb
Copy link
Author

@cowtowncoder I think it would be best to make these changes to something with SNAPSHOT versions, so I think I will have to abort these changes and move them to master instead (or whatever branch is most appropriate.

There are two reasons for this:

  1. Right now I have to make feature dependencies with the version ${project.version} while the corresponding bundle dependency has a specific dependency (because the bundle dependency is an already built and deployed version (2.10.pr2), while the feature is only in the SNAPSHOT version, like eg so:
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version.core}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${project.version}</version>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
    
  2. I need to change bundle dependencies from <scope>compile</scope> to <scope>provided</scope> and that should have a little more testing than the time until the release

@steinarb
Copy link
Author

steinarb commented Sep 3, 2019

@cowtowncoder FYI I'm still working on a pr against 2.10. I had to change the properties in the jackson-bom pom to snapshot version numbers, and change some parent numbers to the current snapshot on the 2.10 branch, to make the build work.

(But don't wait for me, I can move to master if I miss the 2.10 train)

@cowtowncoder
Copy link
Member

@steinarb for now, 2.10 is fine; there's a chance there will also be 2.11, and if so, that will be similar to 2.10.

@steinarb
Copy link
Author

steinarb commented Sep 5, 2019

@cowtowncoder Ok, I will move on to the 2.11 branch if I can't reach 2.10.

@steinarb
Copy link
Author

steinarb commented Sep 8, 2019

@cowtowncoder Problem in jackson-dataformats-binary/avro/:

  1. The avro dependency has transitive dependencies to jackson 1.9.13
  2. Not doing anything about the 1.9.13 dependencies cause the maven-bundle-plugin to not find the expected version of the imported packages when attempted loaded:
    Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=jackson-dataformat-avro; type=karaf.feature; version="[2.10.0.SNAPSHOT,2.10.0.SNAPSHOT]"; filter:="(&(osgi.identity=jackson-dataformat-avro)(type=karaf.feature)(version>=2.10.0.SNAPSHOT)(version<=2.10.0.SNAPSHOT))" [caused by: Unable to resolve jackson-dataformat-avro/2.10.0.SNAPSHOT: missing requirement [jackson-dataformat-avro/2.10.0.SNAPSHOT] osgi.identity; osgi.identity=avro; type=osgi.bundle; version="[1.8.2,1.8.2]"; resolution:=mandatory [caused by: Unable to resolve avro/1.8.2: missing requirement [avro/1.8.2] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.codehaus.jackson)(version>=1.9.0)(!(version>=2.0.0)))"]]
    
  3. Excluding the 1.9.13 dependencies cause java compilation to fail because the compilation uses deprecated classes (well that one was just a warning), and because classes aren't found:
    [INFO] -------------------------------------------------------------
    [WARNING] COMPILATION WARNING : 
    [INFO] -------------------------------------------------------------
    [WARNING] bootstrap class path not set in conjunction with -source 7
    [WARNING] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroUntypedDeserializer.java:[34,40] UntypedObjectDeserializer() in com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer has been deprecated
    [WARNING] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java:[192,30] Field(java.lang.String,org.apache.avro.Schema,java.lang.String,org.codehaus.jackson.JsonNode) in org.apache.avro.Schema.Field has been deprecated
    [INFO] 3 warnings 
    [INFO] -------------------------------------------------------------
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR : 
    [INFO] -------------------------------------------------------------
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[5,28] package org.codehaus.jackson does not exist
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[13,13] cannot find symbol
      symbol:   class JsonNode
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java:[14,32] package org.codehaus.jackson.map does not exist
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[15,14] cannot find symbol
      symbol:   variable VALUE_TRUE
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[17,14] cannot find symbol
      symbol:   variable VALUE_FALSE
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[19,14] cannot find symbol
      symbol:   variable VALUE_NULL
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[21,14] cannot find symbol
      symbol:   variable VALUE_NUMBER_FLOAT
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[23,18] cannot find symbol
      symbol:   variable FLOAT
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[25,18] cannot find symbol
      symbol:   variable DOUBLE
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[26,18] cannot find symbol
      symbol:   variable BIG_DECIMAL
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[30,14] cannot find symbol
      symbol:   variable VALUE_NUMBER_INT
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[32,18] cannot find symbol
      symbol:   variable INT
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[34,18] cannot find symbol
      symbol:   variable BIG_INTEGER
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[35,18] cannot find symbol
      symbol:   variable LONG
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[39,14] cannot find symbol
      symbol:   variable VALUE_STRING
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[41,14] cannot find symbol
      symbol:   variable START_OBJECT
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[43,43] cannot find symbol
      symbol:   class JsonNode
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[46,38] cannot find symbol
      symbol:   class JsonNode
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[52,14] cannot find symbol
      symbol:   variable START_ARRAY
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/deser/AvroFieldDefaulters.java:[55,18] cannot find symbol
      symbol:   class JsonNode
      location: class com.fasterxml.jackson.dataformat.avro.deser.AvroFieldDefaulters
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java:[217,21] cannot access org.codehaus.jackson.JsonParser
      class file for org.codehaus.jackson.JsonParser not found
    [ERROR] /home/sb/workspaces/jackson/jackson-dataformats-binary/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java:[193,39] incompatible types: com.fasterxml.jackson.databind.JsonNode cannot be converted to org.codehaus.jackson.JsonNode
    [INFO] 22 errors 
    

Not sure what to do with this except maybe try to upgrade the avro dependency....? There are two versions that follow the currently used 1.8.2: 1.9.0 and 1.9.1

Edit: I tried avro 1.9.1 but it still required code from org.codehaus.jackson

Edit2: it does look like avro has been changed to use jackson 2.x and the fix version for 2.x var avro 1.9.0
https://issues.apache.org/jira/browse/AVRO-1126
https://issues.apache.org/jira/browse/AVRO-2398

The compilation errors comes from the jackson avro code.

Edit3: I made a new issue for this https://github.com/FasterXML/jackson-databind/issues/2447

@cowtowncoder
Copy link
Member

@steinarb Yes, this is a known issue. Alas, Avro 1.9.x has serious problems from our perspective, so attempts at upgrade where and are unsuccessful. So 2.10 will not upgrade to it, as things are. There is an issue tracking this:

FasterXML/jackson-dataformats-binary#167

and I'll add a note to the new issue.

@steinarb
Copy link
Author

steinarb commented Sep 9, 2019

@cowtowncoder Ok. Three possibilities:

  1. Drop jackson-dataformat-avro from the karaf feature-generation
  2. Embed the jackson 1.9.13 stuff into the jackson-dataformat-avro jar
  3. Add jackson 1.9.13 as a runtime dependency in the feature (should be doable, since: a. the package name is different, and b. even with the same package name, OSGi would have been able to handle it because of package versioning)

I think 3 is the least intrusive (need to exclude the jackson 1.9.13 dependencies from the avro dependency, add the jackson 1.9.13 dependencies directly as provided dependencies (so that stuff still will compile), and then add the jackson 1.9.13 jars as runtime dependencies of the feature), so I will try that (but 2.11 is looking as the most likely target for the PRs...:-) )

@steinarb
Copy link
Author

@cowtowncoder A question: should this issue be split up into one issue per repo, so that the PRs and the commits in the PRs can refer the issues correctly? (ref the dup issue I made about avro)

@cowtowncoder
Copy link
Member

Ok, so, I think I would not want to try (2) since shading can get tricky for transitive deps -- although, come to think of it, maybe shading of Apache Avro lib would make sense... it being intended as private internal thing. Except that it being visible it may not be practical approach.

(3) seems doable, but my main concern would be that whatever changes are made would also work with Java 9 module system. I know choice of dependency can have effect there, even if we are not generating module-info.java.

On issues, yes, I think one per repo makes sense.

steinarb added a commit to steinarb/jackson-databind that referenced this issue Sep 18, 2019
@cowtowncoder
Copy link
Member

@steinarb I created 2.11 branch for jsr353 and json-org. In addition, 2 components that may well be end-of-life'd after 2.x -- datatype-hibernate, module-jsonSchema -- have their master updated for 2.11, so there will not be separate 2.11 unless decision is made to continue their development for Jackson 3.0. I do not think JSON-schema module will be continued in its current form (ideally we'll just deprecate it, let others add support; there are other options already), but Hibernate might continue if an owner is found for it.

Aside from these 4, are there still gaps? Scala module might not yet have 2.11 (cc @pjfanning ).

steinarb added a commit to steinarb/jackson-databind that referenced this issue Oct 18, 2019
@steinarb
Copy link
Author

@cowtowncoder A status update: I have rebased all my fix branches on 2.11 (and master where appropriate, version 2.11.0-SNAPHOT in all cases). I made the changes available for review by the head karaf maintainer: http://mail-archives.apache.org/mod_mbox/karaf-user/201910.mbox/browser

@cowtowncoder
Copy link
Member

@steinarb That sounds good. Thank you for the update!

@splatch
Copy link
Contributor

splatch commented Jan 26, 2020

Hey, I spotted this issue on karaf mailing lists and it would be nice to push this integration out. I've been maintaining a third party repo for that https://github.com/code-house/karaf-jackson for lst couple of years.
Where do you need help?

@steinarb
Copy link
Author

@splatch I'm waiting for the karaf head maintainer to complete his review of my branches (he's a very busy man). And after that I need to rebase the changes on whatever is the current maintenance branch for each module.

@cowtowncoder cowtowncoder added 2.12 and removed 2.10 labels Apr 7, 2020
@guiramos
Copy link

guiramos commented May 3, 2020

What is the current status of this? Is the karaf features ready?

@steinarb
Copy link
Author

steinarb commented May 3, 2020

I'm still waiting for the code review, and had basically forgotten about the whole thing.

I can submit what I have without the code review if it is of interest. I would need to move all of the changes to newer branches.

Main issue with my changes: I have changed many inter-module dependencies from compile to provided, and this has effect for non-OSGi applications as well: maven builds that have relied on transitive dependencies will need to add explicit dependencies to all jackson modules.

It would be good to know if this is a deal breaker before I move the changes to a newer branch.

The reason for the change is to have maven-bundle-plugin and karaf-maven-plugin do the right thing.

@cowtowncoder
Copy link
Member

It'd be good to have an idea of what dependencies were changed, as it is difficult to say much without more details. Some changes could be fine.

Another question I had was this: is there any value in incremental changes? For example, rolling out needed changes to core pieces (streaming (jackson-core), jackson-annotations, jackson-databind) first.

@steinarb
Copy link
Author

steinarb commented May 3, 2020

I have a summary of the changes somewhere and will try to dig it up.

FWIW just doing the three you mention has value for me personally, because those are the ones I personally use and are the ones that Jersey uses (together with perhaps a few others such as extended date parsing).

@steinarb
Copy link
Author

I have a summary of the changes somewhere and will try to dig it up.

Summary of the changes with link to issue, branch and description of the changes below.

FWIW just doing the three you mention has value for me personally, because those are the ones I personally use and are the ones that Jersey uses (together with perhaps a few others such as extended date parsing).

To be concrete, the important ones to me, are:

  • jackson-annotations, jackson-core and jackson-databind
  • jackson-jaxrs-providers
  • jackson-datatype-jsr353 (is this the one that give new date and time types? If so that's the one I want)
  • Other datatypes needed by jersey...?
  • The master karaf feature repository in the BOM needs to be shaved down to what's actually used

To make the changes ready to merge, I

  • Need to move to the branch version where you (@cowtowncoder ) want to have them
  • Need to bump the karaf version to the current stable
  • Should move to the most recent stable maven-bundle-plugin
    (a bit of work so I would like to know if it's wanted, before investing in it...? :-) )

Anyway, here are the summary of changes:

  1. jackson-parent:
    Issue: Add apache karaf features to jackson jackson-parent#11
    git branch: https://github.com/steinarb/jackson-parent/tree/add-apache-karaf-features-to-jackson
    Contains karaf-maven-plugin configuration in pluginManagement:

    • Uses karaf 4.2.6
    • Binds feature-generate-descriptor to the package phase
    • includeTransitiveDependency: false
    • aggregateFeatures: false
    • includeProjectArtifact: true
  2. jackson-bom:
    Issue: Add apache karaf features to jackson jackson-bom#27
    git branch: https://github.com/steinarb/jackson-bom/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Use snapshot versions for everything (without this the branch
      won't build)
    • Add a module that attaches a hand-written master feature
      repository that will load all jersey feature repositories
  3. jackson-annotations
    Issue: Add apache karaf features to jackson jackson-annotations#160
    git branch: https://github.com/steinarb/jackson-annotations/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Use snapshot for the parent version
    • Reference the karaf-maven-plugin in the plugins section
  4. jackson-core
    Issue: Add apache karaf features to jackson jackson-core#560
    git branch: https://github.com/steinarb/jackson-core/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
  5. jackson-databind
    Issue: It would be nice if jackson had native karaf features #2434 (this is also the initial issue I created)
    git branch: https://github.com/steinarb/jackson-databind/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-annotation and jackson-core maven dependencies provided
    • Add a template feature.xml depending on the jackson-annotation and jackson-core features
  6. jackson-modules-base
    Issue: Add apache karaf features to jackson jackson-modules-base#86
    git branch: https://github.com/steinarb/jackson-modules-base/tree/add-apache-karaf-features-to-jackson
    Changes in each of the modules:

    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-annotation and/or jackson-core and/or jackson-databind
      maven dependencies provided
    • Add a template feature.xml depending on the jackson-databind
      feature (or just jackson-core and jackson-annotations for the
      mrbean module)
    • In guice:
      • change config includeTransitiveDependency to true
      • exclude javax.inject to avoid wrapping javax.inject in the
        jackson-module-guice feature (a wrapped javax.inject will break
        jersey)
      • add javax.inject as a provided dependency (so that things will
        compile)
      • depend on the built-in feature transaction-api, to get
        javax.inject from a properly versioned OSGi bundle
  7. jackson-datatypes-collections
    Issue: Add apache karaf features to jackson jackson-datatypes-collections#59
    git branch: https://github.com/steinarb/jackson-datatypes-collections/tree/add-apache-karaf-features-to-jackson
    Changes:

    • In the parent pom, make jackson-annotations, jackson-core and
      jackson-databind be provided dependencies
    • In all modules
      • Reference the karaf-maven-plugin in the plugins section
      • Add a template feature.xml depending on the jackson-databind feature
    • In the pcollections module change packaging from jar to bundle
    • In the eclipse-collections module include eclipse-collections as
      a wrapped module in the template feature.xml (strange that wrap
      was needed for an eclipse file...? The manifest of the
      eclipse-collections jar was weird... possible duplicated line
      breaks)
  8. jackson-dataformats-binary
    Issue: Add apache karaf features to jackson jackson-dataformats-binary#181
    git branch: https://github.com/steinarb/jackson-dataformats-binary/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Make jackson-core provided in the top pom
    • In the submodules:
      • Reference the karaf-maven-plugin in the plugins section
      • Add a template feature.xml pulling in jackson-databind
    • In the avro module
  9. jackson-dataformat-xml
    Issue: Add apache karaf features to jackson jackson-dataformat-xml#361
    git branch: https://github.com/steinarb/jackson-dataformat-xml/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
    • Make jackson-annotation, jackson-core and jackson-databind provided
    • In the template feature.xml:
      • Depend on the jackson-module-jaxb-annotations feature
      • wrap the relaxngDatatype jar and load it as a bundle
  10. jackson-datatype-hibernate
    Issue: Add apache karaf features to jackson jackson-datatype-hibernate#132
    git branch: https://github.com/steinarb/jackson-datatype-hibernate/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Fix some openjdk-11 test startup issues
    • In the parent pom, make jackson-annotations, jackson-core and
      jackson-databind be provided dependencies
    • In the sub-modules:
      • Reference the karaf-maven-plugin in the plugins section
      • Add a template karaf.xml that
        • Reference the jackson-databind feature
        • Reference the built-in hibernate feature
    • (The features all load, but I'm guessing the hibernate5 feature
      will be the only one actually working)
  11. jackson-dataformats-text
    Issue: Add apache karaf features to jackson jackson-dataformats-text#144
    git branch: https://github.com/steinarb/jackson-dataformats-text/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Make jackson-core provided in the parent pom
    • In the modules:
      • Reference the karaf-maven-plugin in the plugins section
      • Add a template feature.xml referencing jackson-databind
  12. jackson-datatype-joda
    Issue: Add apache karaf features to jackson jackson-datatype-joda#107
    git branch: https://github.com/steinarb/jackson-datatype-joda/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
    • Make jackson-annotations, jackson-core and jackson-databind provided
    • Add a template feature.xml referencing jackson-databind
  13. jackson-datatype-json-org
    Issue: Add apache karaf features to jackson jackson-datatype-json-org#16
    git branch: https://github.com/steinarb/jackson-datatype-json-org/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
    • Make jackson-core and jackson-databind provided
    • Add a template feature.xml referencing jackson-databind
  14. jackson-datatype-jsr353
    Issue: https://github.com/FasterXML/jackson-datatype-jsr353/issues/12
    git branch: https://github.com/steinarb/jackson-datatype-jsr353/tree/add-apache-karaf-features-to-jackson
    Changes:

    • Reference the karaf-maven-plugin in the plugins section
    • Make jackson-core and jackson-databind provided
    • Add a template feature.xml referencing jackson-databind
  15. jackson-jaxrs-providers
    Issue: Add apache karaf features to jackson jackson-jaxrs-providers#115
    git branch: https://github.com/steinarb/jackson-jaxrs-providers/tree/add-apache-karaf-features-to-jackson
    Changes

    • non-releated build change: I had to change the port number of the
      tests from 6011 t0 60110 because port 6011 collided with a port
      used by ssh X11 port forwarding (ie. not releated to openjdk-11
      but to my development system)
    • Too many to list (at this time of night), but basically
      • Reference the karaf-maven-plugin in the plugins section
      • Make jackson-* maven dependencies provided
      • Add a template feature.xml referencing the jackson-* features
        matching the maven dependencies made provided
  16. jackson-jr
    Issue: Add apache karaf features to jackson jackson-jr#67
    git branch: https://github.com/steinarb/jackson-jr/tree/add-apache-karaf-features-to-jackson
    Changes

    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-* dependencies provided
    • Reference the features matching the dependencies made provided in
      the template feature.xml
  17. jackson-module-jsonSchema
    Issue: Add apache karaf features to jackson jackson-module-jsonSchema#138
    git branch: https://github.com/steinarb/jackson-module-jsonSchema/tree/add-apache-karaf-features-to-jackson
    Changes

    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-* dependencies provided
    • Reference the features matching the dependencies made provided in
      the template feature.xml
  18. jackson-modules-java8
    Issue: Add apache karaf features to jackson jackson-modules-java8#137
    git branch: https://github.com/steinarb/jackson-modules-java8/tree/add-apache-karaf-features-to-jackson
    Changes

    • Remove the -Werror flag on two projects, because compiling with
      openjdk-11 gave a warning that broke the build
    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-* dependencies provided
    • Reference the features matching the dependencies made provided in
      the template feature.xml
  19. jacskon-module-kotlin
    Issue: Add apache karaf features to jackson jackson-module-kotlin#248
    git branch: https://github.com/steinarb/jackson-module-kotlin/tree/add-apache-karaf-features-to-jackson
    Changes

    • Reference the karaf-maven-plugin in the plugins section
    • Make the jackson-* dependencies provided
    • Reference the features matching the dependencies made provided in
      the template feature.xml
  20. jackson-module-scala
    Issue: Add apache karaf features to jackson jackson-module-scala#427
    (no idea how to do this one, it's not using maven)
    (still no idea how to do this one)

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