diff --git a/pom.xml b/pom.xml index 492caf90..e390a11e 100644 --- a/pom.xml +++ b/pom.xml @@ -492,6 +492,7 @@ under the License. org.apache.maven.plugins maven-invoker-plugin + 3.6.0 ${project.build.directory}/local-repo src/it/projects diff --git a/src/it/projects/MJAVADOC-538/pom.xml b/src/it/projects/MJAVADOC-538/pom.xml index ecac9181..8d9de8ca 100644 --- a/src/it/projects/MJAVADOC-538/pom.xml +++ b/src/it/projects/MJAVADOC-538/pom.xml @@ -48,6 +48,7 @@ + java10+ 10 diff --git a/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java b/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java index 60b458b0..86364fd6 100644 --- a/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java +++ b/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java @@ -1,26 +1,34 @@ -package foo.bar; - -/* - * 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. - */ -/** - * App class - */ -public class MyClass -{ -} +package foo.bar; + +/* + * 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. + */ + +/** + * App class + * + */ +public class MyClass +{ + /** + * Constructor + */ + MyClass() + { + } +} diff --git a/src/it/projects/MJAVADOC-592_detectApiLink/pom.xml b/src/it/projects/MJAVADOC-592_detectApiLink/pom.xml index 78ecd47d..1f821d99 100644 --- a/src/it/projects/MJAVADOC-592_detectApiLink/pom.xml +++ b/src/it/projects/MJAVADOC-592_detectApiLink/pom.xml @@ -25,13 +25,13 @@ org.apache.maven.plugins.javadoc.it mjavadoc592 1.0-SNAPSHOT - + https://issues.apache.org/jira/browse/MJAVADOC-592 UTF-8 - 7 - 7 + @maven.compiler.source@ + @maven.compiler.target@ diff --git a/src/it/projects/MJAVADOC-592_detectApiLink/verify.groovy b/src/it/projects/MJAVADOC-592_detectApiLink/verify.groovy index 674ad5c2..bed3fca1 100644 --- a/src/it/projects/MJAVADOC-592_detectApiLink/verify.groovy +++ b/src/it/projects/MJAVADOC-592_detectApiLink/verify.groovy @@ -16,6 +16,6 @@ * specific language governing permissions and limitations * under the License. */ - + def options = new File(basedir,'target/site/apidocs/options') -assert options.readLines().dropWhile{it!='-linkoffline'}.get(1).startsWith("'https://docs.oracle.com/javase/7/docs/api'") +assert options.readLines().dropWhile{it!='-linkoffline'}.get(1).startsWith("'https://docs.oracle.com/javase/8/docs/api") diff --git a/src/it/projects/MJAVADOC-599/pom.xml b/src/it/projects/MJAVADOC-599/pom.xml index 3a5c6e6f..9f664973 100644 --- a/src/it/projects/MJAVADOC-599/pom.xml +++ b/src/it/projects/MJAVADOC-599/pom.xml @@ -35,8 +35,8 @@ UTF-8 - 1.8 - 1.8 + @maven.compiler.source@ + @maven.compiler.target@ diff --git a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java index 4a00d9f3..84cd03e3 100644 --- a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java @@ -37,7 +37,6 @@ import org.apache.maven.plugin.testing.stubs.MavenProjectStub; import org.apache.maven.plugins.javadoc.AbstractFixJavadocMojo.JavaEntityTags; import org.apache.maven.shared.invoker.MavenInvocationException; -import org.codehaus.plexus.languages.java.version.JavaVersion; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; @@ -536,20 +535,6 @@ private void invokeCompileGoal(File testPom, File globalSettingsFile, Log log) t Properties properties = new Properties(); - if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("12")) { - properties.put("maven.compiler.source", "1.7"); - properties.put("maven.compiler.target", "1.7"); - } else if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("9")) { - properties.put("maven.compiler.source", "1.6"); - properties.put("maven.compiler.target", "1.6"); - } - - // @todo unittests shouldn't need to go remote - if (JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("8")) { - // ensure that Java7 picks up TLSv1.2 when connecting with Central - properties.put("https.protocols", "TLSv1.2"); - } - JavadocUtil.invokeMaven( log, new File(getBasedir(), "target/local-repo"), diff --git a/src/test/resources/unit/fix-test/pom.xml b/src/test/resources/unit/fix-test/pom.xml index cb297750..ba027357 100644 --- a/src/test/resources/unit/fix-test/pom.xml +++ b/src/test/resources/unit/fix-test/pom.xml @@ -25,10 +25,10 @@ 1.1-SNAPSHOT Javadoc Test Project jar - + - 1.5 - 1.5 + 8 + 8