Skip to content

Commit f27c99d

Browse files
committed
[MJAVADOC-590] Setting nooverview option always causes a build failure
1 parent d5b80c0 commit f27c99d

File tree

5 files changed

+110
-1
lines changed

5 files changed

+110
-1
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.goals=compile javadoc:javadoc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
4+
license agreements. See the NOTICE file distributed with this work for additional
5+
information regarding copyright ownership. The ASF licenses this file to
6+
you under the Apache License, Version 2.0 (the "License"); you may not use
7+
this file except in compliance with the License. You may obtain a copy of
8+
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
9+
by applicable law or agreed to in writing, software distributed under the
10+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
11+
OF ANY KIND, either express or implied. See the License for the specific
12+
language governing permissions and limitations under the License. -->
13+
14+
<project xmlns="http://maven.apache.org/POM/4.0.0"
15+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
17+
<modelVersion>4.0.0</modelVersion>
18+
<groupId>org.apache.maven.plugins.javadoc.it</groupId>
19+
<artifactId>mjavadoc-590</artifactId>
20+
<version>1.0.0-SNAPSHOT</version>
21+
22+
<url>https://issues.apache.org/jira/browse/MJAVADOC-590</url>
23+
24+
<build>
25+
<plugins>
26+
<plugin>
27+
<groupId>org.apache.maven.plugins</groupId>
28+
<artifactId>maven-javadoc-plugin</artifactId>
29+
<version>@project.version@</version>
30+
<configuration>
31+
<nooverview>true</nooverview>
32+
</configuration>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
37+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.example;
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+
/**
23+
* Verify nooverview value
24+
*
25+
* @since 3.3.0
26+
*/
27+
public class MJavaDoc590
28+
{
29+
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
def file = new File( basedir, 'target/site/apidocs/com/example/MJavaDoc590.html' );
21+
assert file.exists()
22+
23+
def overview = new File( basedir, 'target/site/apidocs/overview.html' );
24+
assert !overview.exists()

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -5030,7 +5030,7 @@ private void validateStandardDocletOptions()
50305030
}
50315031

50325032
// overview
5033-
if ( ( getOverview() != null ) && nooverview )
5033+
if ( getOverview() != null && getOverview().exists() && nooverview )
50345034
{
50355035
throw new MavenReportException( "Option <nooverview/> conflicts with <overview/>" );
50365036
}

0 commit comments

Comments
 (0)