Repository: calcite Updated Branches: refs/heads/master 72f36a883 -> 9d6899c91
Fix JavaDoc warnings for Java 9+, and check JavaDoc in Travis CI Travis verifies JavaDocs for Java 8 and 11 only to save build time. Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/9d6899c9 Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/9d6899c9 Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/9d6899c9 Branch: refs/heads/master Commit: 9d6899c919113dc58707b2337297205ed1d7194f Parents: 72f36a8 Author: Vladimir Sitnikov <sitnikov.vladi...@gmail.com> Authored: Mon Sep 24 20:51:31 2018 +0300 Committer: Vladimir Sitnikov <sitnikov.vladi...@gmail.com> Committed: Mon Sep 24 23:51:17 2018 +0300 ---------------------------------------------------------------------- .travis.yml | 7 +-- .../apache/calcite/adapter/Java9Workaround.java | 26 ++++++++++ .../apache/calcite/rel/jdbc/package-info.java | 27 ---------- pom.xml | 52 +++++++++++--------- 4 files changed, 58 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/9d6899c9/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index bd7a59d..b995fd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,10 +20,10 @@ language: java matrix: fast_finish: true include: - - env: IMAGE=maven:3-jdk-11 + - env: IMAGE=maven:3-jdk-11 JDOC=Y - env: IMAGE=maven:3-jdk-10 - env: IMAGE=maven:3-jdk-9 - - env: IMAGE=maven:3-jdk-8 + - env: IMAGE=maven:3-jdk-8 JDOC=Y branches: only: - master @@ -44,7 +44,8 @@ install: script: # Print surefire output to the console instead of files - unset _JAVA_OPTIONS - - $DOCKERRUN $IMAGE mvn -Dcheckstyle.skip -Dsurefire.useFile=false -Dsurefire.threadCount=1 -Dsurefire.perCoreThreadCount=false -Djavax.net.ssl.trustStorePassword=changeit test + - if [ $JDOC = "Y" ]; then export JDOC=javadoc:javadoc; fi + - $DOCKERRUN $IMAGE mvn -Dcheckstyle.skip -Dsurefire.useFile=false -Dsurefire.threadCount=1 -Dsurefire.perCoreThreadCount=false -Djavax.net.ssl.trustStorePassword=changeit test $JDOC git: depth: 10000 sudo: required http://git-wip-us.apache.org/repos/asf/calcite/blob/9d6899c9/core/src/main/java/org/apache/calcite/adapter/Java9Workaround.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/calcite/adapter/Java9Workaround.java b/core/src/main/java/org/apache/calcite/adapter/Java9Workaround.java new file mode 100644 index 0000000..9f45e2e --- /dev/null +++ b/core/src/main/java/org/apache/calcite/adapter/Java9Workaround.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.calcite.adapter; + +/** + * JavaDoc from Java 9 seems to fail when package contents is empty. + * The sole purpose of this class it to make package non empty. + */ +class Java9Workaround { +} + +// End Java9Workaround.java http://git-wip-us.apache.org/repos/asf/calcite/blob/9d6899c9/core/src/main/java/org/apache/calcite/rel/jdbc/package-info.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/calcite/rel/jdbc/package-info.java b/core/src/main/java/org/apache/calcite/rel/jdbc/package-info.java deleted file mode 100644 index 2186666..0000000 --- a/core/src/main/java/org/apache/calcite/rel/jdbc/package-info.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to you under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Contains query transformation rules relating to generating SQL for - * foreign JDBC databases. - */ -@PackageMarker -package org.apache.calcite.rel.jdbc; - -import org.apache.calcite.avatica.util.PackageMarker; - -// End package-info.java http://git-wip-us.apache.org/repos/asf/calcite/blob/9d6899c9/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 5fe887b..30b9363 100644 --- a/pom.xml +++ b/pom.xml @@ -136,6 +136,8 @@ limitations under the License. <fmpp.version>0.9.16</fmpp.version> <!-- Other properties (not version numbers) --> + <!-- Java 1.8 does not support -html5, so override via profile for Java 1.8 --> + <maven-javadoc-html5>-html5</maven-javadoc-html5> <maven-javadoc-plugin.excludePackageNames> org.apache.calcite.benchmarks.generated, org.apache.calcite.sql.parser.babel, @@ -737,24 +739,8 @@ limitations under the License. <artifactId>maven-enforcer-plugin</artifactId> </plugin> <plugin> - <!-- This is the configuration used by "mvn javadoc:javadoc". It is - configured strict, so that it shows errors such as broken links in - javadoc on private methods. The configuration for "mvn site" is - under "reporting", and is more lenient. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <additionalparam>-html5</additionalparam> - <doclint>all,-missing</doclint> - <failOnWarnings>true</failOnWarnings> - <links> - <link>${maven-javadoc-plugin.link}</link> - </links> - <notimestamp>true</notimestamp> - <excludePackageNames>${maven-javadoc-plugin.excludePackageNames}</excludePackageNames> - <quiet>true</quiet> - <show>private</show> - </configuration> </plugin> <plugin> <!-- Override apache parent POM's definition of release @@ -916,6 +902,23 @@ limitations under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + <!-- This is the configuration used by "mvn javadoc:javadoc". It is + configured strict, so that it shows errors such as broken links in + javadoc on private methods. The configuration for "mvn site" is + under "reporting", and is more lenient. --> + <configuration> + <additionalOptions>${maven-javadoc-html5}</additionalOptions> + <doclint>all,-missing</doclint> + <failOnWarnings>true</failOnWarnings> + <links> + <link>${maven-javadoc-plugin.link}</link> + </links> + <notimestamp>true</notimestamp> + <excludePackageNames>${maven-javadoc-plugin.excludePackageNames}</excludePackageNames> + <quiet>true</quiet> + <show>private</show> + <windowtitle>Apache Calcite API</windowtitle> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -984,14 +987,6 @@ limitations under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <links> - <link>${maven-javadoc-plugin.link}</link> - </links> - <excludePackageNames>${maven-javadoc-plugin.excludePackageNames}</excludePackageNames> - <notimestamp>true</notimestamp> - <windowtitle>Apache Calcite API</windowtitle> - </configuration> </plugin> </plugins> </reporting> @@ -1199,5 +1194,14 @@ limitations under the License. </plugins> </build> </profile> + <profile> + <id>java8</id> + <activation> + <jdk>1.8</jdk> + </activation> + <properties> + <maven-javadoc-html5/> + </properties> + </profile> </profiles> </project>