Skip to content

Commit

Permalink
Fix #67
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Mar 6, 2019
1 parent 1bf4ffb commit 374dd71
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 21 deletions.
91 changes: 70 additions & 21 deletions pom.xml
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>aalto-xml</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>1.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<licenses>
<license>
Expand All @@ -32,14 +32,20 @@
</scm>

<properties>
<!--
| Compilation: require JDK 1.6
-->
<javac.src.version>1.6</javac.src.version>
<javac.target.version>1.6</javac.target.version>
<!-- 05-Mar-2019, tatu: We can still produce JDK 1.6 compatible jar, but must
build with JDK 8. This for Aalto 1.2.
Will probably raise minimum JDK to JDK 8 relatively soon.
-->
<java.version>1.6</java.version>

<javac.src.version>${java.version}</javac.src.version>
<javac.target.version>${java.version}</javac.target.version>

<!-- And for Java 9, specify Automatic-Module-Name -->
<jdk.module.name>com.fasterxml.aalto</jdk.module.name>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<!-- 05-Mar-2019, tatu: looks like 3.2.0 ain't enough any more -->
<version.plugin.bundle>4.1.0</version.plugin.bundle>

<!--
| Configuration properties for the OSGi maven-bundle-plugin
Expand Down Expand Up @@ -80,25 +86,15 @@ org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers</osgi.import>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>5.1.0</version>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- base definitions work for OSGi, but also need to add Automatic-Module-Name -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>${jdk.module.name}</Automatic-Module-Name>
</instructions>
</configuration>
</plugin>

<!-- base definitions work for OSGi; no more Automatic Module name for 1.2.0 -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -131,6 +127,59 @@ org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers</osgi.import>
</configuration>
</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>


<!-- 05-Mar-2019, tatu: Uncomment to (re)generate module info: -->
<!--
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-module-info</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-module-info</goal>
</goals>
<configuration>
<modules>
<module>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>1.1.1</version>
</artifact>
</module>
</modules>
</configuration>
</execution>
</executions>
</plugin>
-->

</plugins>
</build>
Expand Down
4 changes: 4 additions & 0 deletions release-notes/VERSION
Expand Up @@ -4,6 +4,10 @@ Project: aalto-xml
= Releases
------------------------------------------------------------------------

1.2.0 (not yet released)

#67: Add Java 9+ module info using Moditect

1.1.1 (19-Sep-2018)

#59: Support Latin-1 (ISO-8859-1) via Async parser
Expand Down
18 changes: 18 additions & 0 deletions src/moditect/module-info.java
@@ -0,0 +1,18 @@
module com.fasterxml.aalto {
requires java.xml;
requires org.codehaus.stax2;
exports com.fasterxml.aalto;
exports com.fasterxml.aalto.async;
exports com.fasterxml.aalto.dom;
exports com.fasterxml.aalto.evt;
// exports com.fasterxml.aalto.impl;
exports com.fasterxml.aalto.in;
exports com.fasterxml.aalto.io;
exports com.fasterxml.aalto.out;
exports com.fasterxml.aalto.sax;
exports com.fasterxml.aalto.stax;
exports com.fasterxml.aalto.util;
provides javax.xml.stream.XMLEventFactory with com.fasterxml.aalto.stax.EventFactoryImpl;
provides javax.xml.stream.XMLInputFactory with com.fasterxml.aalto.stax.InputFactoryImpl;
provides javax.xml.stream.XMLOutputFactory with com.fasterxml.aalto.stax.OutputFactoryImpl;
}

0 comments on commit 374dd71

Please sign in to comment.