Unify pom.xml

This commit is contained in:
Andrea Cavalli 2021-09-27 19:36:07 +02:00
parent 0905a434a4
commit 6fa734087e
3 changed files with 45 additions and 24 deletions

View File

@ -34,11 +34,11 @@ jobs:
echo "REVISION=$REVISION" >> $GITHUB_ENV echo "REVISION=$REVISION" >> $GITHUB_ENV
echo "IMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" >> $GITHUB_ENV echo "IMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" >> $GITHUB_ENV
- name: Set up JDK 11 - name: Set up JDK 17
if: ${{ startsWith(github.ref, 'refs/tags/v') }} if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 11 java-version: 17
server-id: mchv-release-distribution server-id: mchv-release-distribution
server-username: MAVEN_USERNAME server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD server-password: MAVEN_PASSWORD

View File

@ -99,7 +99,7 @@
</profile> </profile>
</profiles> </profiles>
<build> <build>
<sourceDirectory>../src/main/java</sourceDirectory> <sourceDirectory>${project.basedir}/../src/main/java</sourceDirectory>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-clean-plugin</artifactId> <artifactId>maven-clean-plugin</artifactId>
@ -125,8 +125,13 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version> <version>3.2.0</version>
<configuration> <configuration>
<source>8</source> <source>17</source>
<additionalOptions>-html5</additionalOptions> <additionalOptions>-html5</additionalOptions>
<level>public</level>
<verbose>false</verbose>
<quiet>true</quiet>
<additionalOptions>-Xdoclint:none</additionalOptions>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
@ -166,9 +171,6 @@
<version>3.8.1</version> <version>3.8.1</version>
<configuration> <configuration>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<source>11</source>
<target>11</target>
<useIncrementalCompilation>false</useIncrementalCompilation>
<excludes> <excludes>
<exclude>it/tdlight/tdlight/ClientManager.java</exclude> <exclude>it/tdlight/tdlight/ClientManager.java</exclude>
</excludes> </excludes>
@ -181,6 +183,20 @@
<!-- specify source/target for IDE integration --> <!-- specify source/target for IDE integration -->
<configuration> <configuration>
<release>9</release> <release>9</release>
</configuration>
</execution>
<!-- compile sources with Java 11 -->
<execution>
<id>java-11-module-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/../src/main/java11</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration> </configuration>
</execution> </execution>
<!-- compile sources with Java 9 to generate and validate module-info.java --> <!-- compile sources with Java 9 to generate and validate module-info.java -->
@ -201,8 +217,7 @@
</goals> </goals>
<configuration> <configuration>
<!-- specify JDK 9+ release flag to ensure no classes/methods later than Java 8 are used accidentally --> <!-- specify JDK 9+ release flag to ensure no classes/methods later than Java 8 are used accidentally -->
<source>8</source> <release>8</release>
<target>8</target>
<!-- exclude module-info.java from the compilation, as it is unsupported by Java 8 --> <!-- exclude module-info.java from the compilation, as it is unsupported by Java 8 -->
<excludes> <excludes>
<exclude>it/tdlight/tdlight/ClientManager.java</exclude> <exclude>it/tdlight/tdlight/ClientManager.java</exclude>
@ -212,18 +227,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
@ -249,6 +252,25 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId> <artifactId>templating-maven-plugin</artifactId>

View File

@ -220,14 +220,13 @@
<release>8</release> <release>8</release>
<!-- exclude module-info.java from the compilation, as it is unsupported by Java 8 --> <!-- exclude module-info.java from the compilation, as it is unsupported by Java 8 -->
<excludes> <excludes>
<exclude>it/tdlight/tdlib/ClientManager.java</exclude>
<exclude>module-info.java</exclude> <exclude>module-info.java</exclude>
</excludes> </excludes>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!--
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
@ -252,7 +251,7 @@
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin>--> </plugin>
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version> <version>3.2.0</version>