From f99796ee684a7779e8d3152d7e69d5322200791d Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Wed, 27 Sep 2017 01:12:06 +0000 Subject: [PATCH] add Java 8 specific source code to check that compiler is configured with source/target 1.8 git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1809797 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/coreit/TestInterface.java | 30 +++++++++++++++++++ .../src/main/java/fr/ca/TestInterface.java | 3 ++ 2 files changed, 33 insertions(+) create mode 100644 maven-plugin-plugin/src/it/java-basic-annotations-jdk8/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java new file mode 100644 index 0000000..16ee6d5 --- /dev/null +++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java @@ -0,0 +1,30 @@ +package fr.ca; + +/* + * 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 interface TestInterface { + + /** + * Java 8 required to support such default method implementation + */ + public default void foo(){ + + } +} diff --git a/maven-plugin-plugin/src/it/mplugin-272_java8/src/main/java/fr/ca/TestInterface.java b/maven-plugin-plugin/src/it/mplugin-272_java8/src/main/java/fr/ca/TestInterface.java index 1f32023..16ee6d5 100644 --- a/maven-plugin-plugin/src/it/mplugin-272_java8/src/main/java/fr/ca/TestInterface.java +++ b/maven-plugin-plugin/src/it/mplugin-272_java8/src/main/java/fr/ca/TestInterface.java @@ -21,6 +21,9 @@ package fr.ca; public interface TestInterface { + /** + * Java 8 required to support such default method implementation + */ public default void foo(){ }