From 3a90de597adff7c8f8c4a420400f24c7386e9880 Mon Sep 17 00:00:00 2001 From: Laurent Goujon Date: Wed, 9 Oct 2024 11:56:17 -0600 Subject: [PATCH] [MJAVADOC-787] Automatic detection of release option for JDK < 9 Similar to MCOMPILER-582, automatically disregard the `--release` flag for javadoc version < 9. This closes #326 --- .../projects/MJAVADOC-787/invoker.properties | 18 +++++ src/it/projects/MJAVADOC-787/pom.xml | 78 +++++++++++++++++++ .../src/main/java/com/foo/MyClass.java | 25 ++++++ 3 files changed, 121 insertions(+) create mode 100644 src/it/projects/MJAVADOC-787/invoker.properties create mode 100644 src/it/projects/MJAVADOC-787/pom.xml create mode 100644 src/it/projects/MJAVADOC-787/src/main/java/com/foo/MyClass.java diff --git a/src/it/projects/MJAVADOC-787/invoker.properties b/src/it/projects/MJAVADOC-787/invoker.properties new file mode 100644 index 000000000..965ea1bf1 --- /dev/null +++ b/src/it/projects/MJAVADOC-787/invoker.properties @@ -0,0 +1,18 @@ +# 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. + +invoker.toolchain.jdk.version = 1.8 diff --git a/src/it/projects/MJAVADOC-787/pom.xml b/src/it/projects/MJAVADOC-787/pom.xml new file mode 100644 index 000000000..df18867c6 --- /dev/null +++ b/src/it/projects/MJAVADOC-787/pom.xml @@ -0,0 +1,78 @@ + + + + + 4.0.0 + + org.apache.maven.plugins.javadoc.it + mjavadoc787 + 1.0-SNAPSHOT + + https://issues.apache.org/jira/browse/MJAVADOC-787 + + + UTF-8 + + + + + org.apache.commons + commons-lang3 + 3.6 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + @compilerPluginVersion@ + + 8 + + 1.8 + + + + + org.apache.maven.plugins + maven-javadoc-plugin + @project.version@ + + + + jar + + + + + 8 + + 1.8 + + + + + + + diff --git a/src/it/projects/MJAVADOC-787/src/main/java/com/foo/MyClass.java b/src/it/projects/MJAVADOC-787/src/main/java/com/foo/MyClass.java new file mode 100644 index 000000000..7370ac086 --- /dev/null +++ b/src/it/projects/MJAVADOC-787/src/main/java/com/foo/MyClass.java @@ -0,0 +1,25 @@ +package com.foo; + +/* + * 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. + */ + +public class MyClass +{ + +}