Skip to content

Commit

Permalink
Specify release flag to build on newer JDKs
Browse files Browse the repository at this point in the history
* Add maven.compiler.release option to force correct cross-compilation
  to Java 11 when building with a JDK newer than 11, such as JDK 17
* Remove unnecessary java source, target, and encoding config from
  plugins when those are already specified by properties
* Fix submodule for core/in-memory-accumulo to point to
  in-memory-accumulo's main branch instead of the one being developed
  for the accumulo4 branch
* Also fix the license name for Apache-2.0 (the recommended name is the
  SPDX name) and drop .txt from the license URL
  • Loading branch information
ctubbsii committed Oct 12, 2024
1 parent 439dbef commit e7a0a59
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
9 changes: 3 additions & 6 deletions microservices/configcheck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</repository>
</distributionManagement>
<properties>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spotbugs.excludes.file />
Expand Down Expand Up @@ -209,9 +209,6 @@
<configuration>
<configFile>eclipse/Eclipse-Datawave-Codestyle.xml</configFile>
<lineEnding>LF</lineEnding>
<compilerSource>${maven.compiler.source}</compilerSource>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
<compilerTargetPlatform>${maven.compiler.target}</compilerTargetPlatform>
</configuration>
</plugin>
<plugin>
Expand Down
21 changes: 5 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<url>https://code.nsa.gov/datawave</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<modules>
Expand All @@ -34,8 +34,9 @@
</repository>
</distributionManagement>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<surefire.forkCount>1C</surefire.forkCount>
<version.accumulo>2.1.2</version.accumulo>
Expand Down Expand Up @@ -1371,9 +1372,6 @@
<removeTrailingWhitespace>true</removeTrailingWhitespace>
<configFile>eclipse/Eclipse-Datawave-Codestyle.xml</configFile>
<lineEnding>LF</lineEnding>
<compilerSource>${maven.compiler.source}</compilerSource>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
<compilerTargetPlatform>${maven.compiler.target}</compilerTargetPlatform>
</configuration>
<dependencies>
<dependency>
Expand Down Expand Up @@ -1483,11 +1481,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:-processing</arg>
Expand Down Expand Up @@ -1671,7 +1666,6 @@
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<encoding>UTF-8</encoding>
<escapeString>\</escapeString>
</configuration>
<dependencies>
Expand Down Expand Up @@ -1814,10 +1808,6 @@
<artifactId>read-properties</artifactId>
</plugin>
<?SORTPOM RESUME?>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
Expand Down Expand Up @@ -1937,7 +1927,6 @@
</goals>
<phase>package</phase>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
<additionalJOption>-J-Xmx768m</additionalJOption>
<tags>
Expand Down
5 changes: 3 additions & 2 deletions warehouse/ingest-ssdeep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
</parent>
<artifactId>datawave-ingest-ssdeep</artifactId>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
5 changes: 3 additions & 2 deletions warehouse/ssdeep-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
</parent>
<artifactId>datawave-ssdeep-common</artifactId>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down

0 comments on commit e7a0a59

Please sign in to comment.