Skip to content

Commit

Permalink
Merge pull request #25 from jakartaredhat/root-mi
Browse files Browse the repository at this point in the history
An alternate way to build Java 8 source/target jar with Java 8 module…
  • Loading branch information
starksm64 committed Oct 16, 2021
2 parents fced20c + 75d0db9 commit 7c66336
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 39 deletions.
92 changes: 53 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
<version>1.0.6</version>
<relativePath />
<relativePath/>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -74,8 +75,6 @@
<properties>
<packages.export>jakarta.inject.*</packages.export>
<spec_version>2.0</spec_version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<build>
Expand All @@ -94,10 +93,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<description>Jakarta Dependency Injection API</description>
Expand All @@ -122,49 +123,62 @@ Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<configuration>
<instructions>
<Implementation-Version>${spec_version}</Implementation-Version>
</instructions>
</configuration>
<executions>
<execution>
<id>osgi-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<configuration>
<instructions>
<Implementation-Version>${spec_version}</Implementation-Version>
</instructions>
</configuration>
<executions>
<execution>
<id>osgi-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Use the JDK 9+ compiler but with -source 1.8 for all
but the module-info.java file.
-->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.RC1</version>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<!-- This is the common/default-compile execution configuration -->
<configuration>
<release>9</release>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
<executions>
<!-- This runs after the default-compile execution to rebuild with 8 -->
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<id>base-compile</id>
<goals>
<goal>add-module-info</goal>
<goal>compile</goal>
</goals>
<configuration>
<jvmVersion>9</jvmVersion>
<module>
<moduleInfoFile>src/main/java9/module-info.java</moduleInfoFile>
</module>
<release>8</release>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
Expand Down
File renamed without changes.

0 comments on commit 7c66336

Please sign in to comment.