Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: java
# 08-Dec-2018, tatu: While it should be possible to run core streaming on Java 6,
# build won't work with anything below Java 8 now
- openjdk8
- oraclejdk11

# Below this line is configuration for deploying to the Sonatype OSS repo
# http://blog.xeiam.com/2013/05/configure-travis-ci-to-deploy-snapshots.html
Expand Down
37 changes: 31 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
</scm>

<properties>
<!-- 16-Sep-2016, tatu: Retain Java6/JDK1.6 compatibility for streaming for Jackson 2.x -->
<!-- 04-Mar-2019, tatu: Retain Java6/JDK1.6 compatibility for annotations for Jackson 2.x,
but use Moditect to get JDK9+ module info support; need newer bundle plugin as well
-->
<javac.src.version>1.6</javac.src.version>
<javac.target.version>1.6</javac.target.version>

<!-- 04-May-2016, tatu: Bundle-plugin 3.x seems to require Java 7, so to
build for Java 6 need to downgrade here to last working 2.x version
(2.5.4 had some issues wrt shading)
-->
<version.plugin.bundle>2.5.3</version.plugin.bundle>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>

<version.plugin.bundle>3.2.0</version.plugin.bundle>

<osgi.export>com.fasterxml.jackson.core;version=${project.version},
com.fasterxml.jackson.core.*;version=${project.version}
Expand Down Expand Up @@ -95,6 +96,30 @@ com.fasterxml.jackson.core.*;version=${project.version}
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
</plugin>

<!-- 04-Mar-2019, tatu: Add rudimentary JDK9+ module info. To build with JDK 8
will have to use `moduleInfoFile` which is crappy but anything else requires
JDK 9+. With Jackson 3.0 will upgrade.
-->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfoFile>src/moditect/module-info.java</moduleInfoFile>
</module>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
19 changes: 19 additions & 0 deletions src/moditect/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module com.fasterxml.jackson.core {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel your pain. Note ModiTect would allow you to use wildcards (com.fasterxml.jackson.core.*) if you were to use it on JDK 9 or later. It will then generate the actual descriptor exporting all packages matching the wildcard.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that is good to know going forward. While Jackson 2.x will probably not go beyond JDK 8, 3.x will at some point so that's good info.

// 04-Mar-2019, tatu: Ugh. Can not use wildcards, stupid ass JDK 9+ module system...
// So, for 2.x core need to make sure we manually include everything.
// Worse, there is only syntactic validation, not contents, so we can both miss
// AND add bogus packages.
// However: at least syntax is verified; and this works with JKD8
exports com.fasterxml.jackson.core;
exports com.fasterxml.jackson.core.async;
exports com.fasterxml.jackson.core.base;
exports com.fasterxml.jackson.core.exc;
exports com.fasterxml.jackson.core.filter;
exports com.fasterxml.jackson.core.format;
exports com.fasterxml.jackson.core.io;
exports com.fasterxml.jackson.core.json;
exports com.fasterxml.jackson.core.json.async;
exports com.fasterxml.jackson.core.sym;
exports com.fasterxml.jackson.core.type;
exports com.fasterxml.jackson.core.util;
}