Skip to content

Commit

Permalink
Tweak warnings in the build
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Aug 29, 2021
1 parent cff665d commit 766446e
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 61 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright (c) 2021 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0,
# or the Eclipse Distribution License v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#

name: EclipseLink PR build

on:
pull_request:
branches: [ main, master ]

jobs:
build:
name: Test on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest

strategy:
matrix:
java_version: [ 17-ea ]

steps:
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Checkout for build
uses: actions/checkout@v2.3.4
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
- name: Verify
run: mvn -B -V -U -C -Pstaging,oss-release clean verify -Dgpg.skip=true -Dwarn.limit=2500 -Dcomp.xlint=-Xlint:all,-rawtypes
1 change: 0 additions & 1 deletion bundles/eclipselink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@
<additionalOptions>
--add-reads eclipselink=ALL-UNNAMED
</additionalOptions>
<doclint>none</doclint>
<detectOfflineLinks>false</detectOfflineLinks>
<use>false</use>
<quiet>true</quiet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<echo message="JDK version detected: '${java.version}'"/>
<fail message="A non-compatible version of JDK was detected! Build won't run properly unless running on at least JDK 1.8!." unless="compat.jdk"/>

<property name="javadoc.additionParams" value="${javadoc.additionParamsCommon} -Xdoclint:none"/>
<property name="javadoc.additionParams" value="${javadoc.additionParamsCommon} -Xdoclint:-missing"/>
<condition property="is.new.jdk" value="true" else="false">
<not><matches pattern='"[1-8]\..*"' string="${java.version}"/></not>
</condition>
Expand Down
1 change: 1 addition & 0 deletions bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<properties>
<eclipselink.unzip.subdir>stage</eclipselink.unzip.subdir>
<jdoc.doclint>-missing</jdoc.doclint>
</properties>

<modules>
Expand Down
24 changes: 9 additions & 15 deletions foundation/org.eclipse.persistence.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<properties>
<!-- Too many to fix -->
<jdoc.doclint>-missing</jdoc.doclint>
</properties>
<dependencies>
<!--Other modules-->
<dependency>
Expand Down Expand Up @@ -99,6 +103,11 @@
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -268,19 +277,4 @@
</plugins>
</build>

<profiles>
<profile>
<id>java11-dependencies</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
29 changes: 5 additions & 24 deletions jpa/eclipselink.jpa.wdf.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
<version>${db.driver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -290,30 +295,6 @@
</build>

<profiles>
<profile>
<id>java11-dependencies</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>derby</id>
<activation>
Expand Down
22 changes: 6 additions & 16 deletions jpa/org.eclipse.persistence.jpa.test.framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand All @@ -80,20 +86,4 @@
</plugins>
</build>

<profiles>
<profile>
<id>java11-dependencies</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-omgapi</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
25 changes: 24 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
<properties>
<!-- TOOL Properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdoc.doclint>all</jdoc.doclint>
<!-- exclude big groups from the Xlint -->
<comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
<warn.limit>150</warn.limit>

<!-- PROJECT Properties -->
<build.type>SNAPSHOT</build.type>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
Expand Down Expand Up @@ -1190,7 +1195,17 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>11</release>>
<release>11</release>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<compilerArgs combine.children="append">
<arg>${comp.xlint}</arg>
<arg>-Xdoclint:-missing</arg>
<arg>-Xmaxwarns</arg>
<arg>${warn.limit}</arg>
<arg>-Xmaxerrs</arg>
<arg>${warn.limit}</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -1467,8 +1482,16 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalOptions combine.children="append">
<additionalOption>-Xmaxwarns</additionalOption>
<additionalOption>${warn.limit}</additionalOption>
<additionalOption>-Xmaxerrs</additionalOption>
<additionalOption>${warn.limit}</additionalOption>
</additionalOptions>
<minmemory>2G</minmemory>
<release>11</release>
<doclint>${jdoc.doclint}</doclint>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 1 addition & 3 deletions sdo/org.eclipse.persistence.sdo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<properties>
<dep.sources>${project.build.directory}/generated-sources/dependencies</dep.sources>
<jdoc.doclint>-missing</jdoc.doclint>

<test-skip-sdo-srg>${skipTests}</test-skip-sdo-srg>
<test-skip-sdo>true</test-skip-sdo>
Expand Down Expand Up @@ -288,9 +289,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<!-- need javadoc even in normal/short build
for inclusion in binary distribution -->
Expand Down

0 comments on commit 766446e

Please sign in to comment.