Skip to content

Commit 3a90de5

Browse files
laurentgomichael-o
authored andcommitted
[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
1 parent 373172d commit 3a90de5

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.toolchain.jdk.version = 1.8

src/it/projects/MJAVADOC-787/pom.xml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing,
14+
~ software distributed under the License is distributed on an
15+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
~ KIND, either express or implied. See the License for the
17+
~ specific language governing permissions and limitations
18+
~ under the License.
19+
-->
20+
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<groupId>org.apache.maven.plugins.javadoc.it</groupId>
27+
<artifactId>mjavadoc787</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
30+
<url>https://issues.apache.org/jira/browse/MJAVADOC-787</url>
31+
32+
<properties>
33+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34+
</properties>
35+
36+
<dependencies>
37+
<dependency>
38+
<groupId>org.apache.commons</groupId>
39+
<artifactId>commons-lang3</artifactId>
40+
<version>3.6</version>
41+
</dependency>
42+
</dependencies>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>org.apache.maven.plugins</groupId>
48+
<artifactId>maven-compiler-plugin</artifactId>
49+
<version>@compilerPluginVersion@</version>
50+
<configuration>
51+
<release>8</release>
52+
<jdkToolchain>
53+
<version>1.8</version>
54+
</jdkToolchain>
55+
</configuration>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-javadoc-plugin</artifactId>
60+
<version>@project.version@</version>
61+
<executions>
62+
<execution>
63+
<goals>
64+
<goal>jar</goal>
65+
</goals>
66+
</execution>
67+
</executions>
68+
<configuration>
69+
<release>8</release>
70+
<jdkToolchain>
71+
<version>1.8</version>
72+
</jdkToolchain>
73+
</configuration>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
78+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.foo;
2+
3+
/*
4+
* Licensed to the Apache Software Foundation (ASF) under one
5+
* or more contributor license agreements. See the NOTICE file
6+
* distributed with this work for additional information
7+
* regarding copyright ownership. The ASF licenses this file
8+
* to you under the Apache License, Version 2.0 (the
9+
* "License"); you may not use this file except in compliance
10+
* with the License. You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
22+
public class MyClass
23+
{
24+
25+
}

0 commit comments

Comments
 (0)