You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2020/02/14 08:30:03 UTC
[maven-javadoc-plugin] branch master updated: [MJAVADOC-636]
exclude some modules from aggregated javadoc
This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 7bfa76d [MJAVADOC-636] exclude some modules from aggregated javadoc
7bfa76d is described below
commit 7bfa76d3b9bdf61cb78152292420843a15b7bd76
Author: olivier lamy <ol...@apache.org>
AuthorDate: Fri Feb 14 13:44:46 2020 +1000
[MJAVADOC-636] exclude some modules from aggregated javadoc
Signed-off-by: olivier lamy <ol...@apache.org>
---
.../b/c/d1/pom.xml | 33 ++++++++
.../b/c/d1/src/main/java/a/b/c/d/D1.java | 25 ++++++
.../b/c/d2/pom.xml | 33 ++++++++
.../b/c/d2/src/main/java/a/b/c/d/D2.java | 25 ++++++
.../b/c/pom.xml | 39 ++++++++++
.../b/e/pom.xml | 33 ++++++++
.../b/e/src/main/java/a/b/e/E.java | 25 ++++++
.../b/pom.xml | 39 ++++++++++
.../f/pom.xml | 33 ++++++++
.../f/src/main/java/a/f/F.java | 24 ++++++
.../invoker.properties | 19 +++++
.../MJAVADOC-636-aggregate_module_skipped/pom.xml | 89 ++++++++++++++++++++++
.../verify.groovy | 38 +++++++++
.../maven/plugins/javadoc/AbstractJavadocMojo.java | 36 ++++++++-
14 files changed, 490 insertions(+), 1 deletion(-)
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/pom.xml
new file mode 100644
index 0000000..643a6aa
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636c</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636d1</artifactId>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/src/main/java/a/b/c/d/D1.java b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/src/main/java/a/b/c/d/D1.java
new file mode 100644
index 0000000..3688552
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d1/src/main/java/a/b/c/d/D1.java
@@ -0,0 +1,25 @@
+package a.b.c.d;
+
+/*
+ * 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 D1
+{
+
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/pom.xml
new file mode 100644
index 0000000..e770e53
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636c</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636d2</artifactId>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/src/main/java/a/b/c/d/D2.java b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/src/main/java/a/b/c/d/D2.java
new file mode 100644
index 0000000..d588de3
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/d2/src/main/java/a/b/c/d/D2.java
@@ -0,0 +1,25 @@
+package a.b.c.d;
+
+/*
+ * 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 D2
+{
+
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/pom.xml
new file mode 100644
index 0000000..1af9c3a
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/c/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636b</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636c</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>d1</module>
+ <module>d2</module>
+ </modules>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/pom.xml
new file mode 100644
index 0000000..8c50b2a
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636b</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636e</artifactId>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/src/main/java/a/b/e/E.java b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/src/main/java/a/b/e/E.java
new file mode 100644
index 0000000..9b8dcb7
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/e/src/main/java/a/b/e/E.java
@@ -0,0 +1,25 @@
+package a.b.e;
+
+/*
+ * 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 E
+{
+
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/pom.xml
new file mode 100644
index 0000000..f463f5a
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/b/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636b</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>c</module>
+ <module>e</module>
+ </modules>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/pom.xml
new file mode 100644
index 0000000..a1c798a
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>mjavadoc636f</artifactId>
+
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/src/main/java/a/f/F.java b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/src/main/java/a/f/F.java
new file mode 100644
index 0000000..1f72633
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/f/src/main/java/a/f/F.java
@@ -0,0 +1,24 @@
+package a.f;
+
+/*
+ * 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 F
+{
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/invoker.properties b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/invoker.properties
new file mode 100644
index 0000000..233d924
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/invoker.properties
@@ -0,0 +1,19 @@
+# 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.goals = javadoc:jar javadoc:aggregate-jar
+invoker.goals = clean package javadoc:jar javadoc:aggregate-jar install
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/pom.xml b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/pom.xml
new file mode 100644
index 0000000..2573892
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+ <artifactId>mjavadoc636</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <url>https://issues.apache.org/jira/browse/MJAVADOC-134</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <modules>
+ <module>b</module>
+ <module>f</module>
+ </modules>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <skippedModules>mjavadoc636e,mjavadoc636d1</skippedModules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>aggregate</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.9</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
diff --git a/src/it/projects/MJAVADOC-636-aggregate_module_skipped/verify.groovy b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/verify.groovy
new file mode 100644
index 0000000..d7aaec7
--- /dev/null
+++ b/src/it/projects/MJAVADOC-636-aggregate_module_skipped/verify.groovy
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+import java.util.jar.*
+
+def aggregatedJavadoc = new File( basedir, 'target/mjavadoc636-1.0-SNAPSHOT-javadoc.jar');
+
+assert aggregatedJavadoc.exists()
+
+def jar = new JarFile(aggregatedJavadoc)
+
+def files = new ArrayList()
+
+for (JarEntry file in jar.entries()){
+ files.add(file.getName())
+}
+
+assert !files.contains("a/b/e/E.html")
+assert !files.contains("a/b/c/d/D1.html")
+assert files.contains("a/b/c/d/D2.html")
+assert files.contains("a/f/F.html")
+
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index c04c1f9..ee29c6a 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -1749,6 +1749,17 @@ public abstract class AbstractJavadocMojo
defaultValue = "${project.build.directory}/maven-javadoc-plugin-stale-data.txt" )
private File staleDataPath;
+
+ /**
+ * <p>
+ * Comma separated list of modules (artifactId) to not add in aggregated javadoc
+ * </p>
+ *
+ * @since 3.2.0
+ */
+ @Parameter( property = "maven.javadoc.skippedModules" )
+ private String skippedModules;
+
// ----------------------------------------------------------------------
// protected methods
// ----------------------------------------------------------------------
@@ -6806,6 +6817,10 @@ public abstract class AbstractJavadocMojo
}
+ /**
+ *
+ * @return List of projects to be part of aggregated javadoc
+ */
private List<MavenProject> getAggregatedProjects()
{
if ( this.reactorProjects == null )
@@ -6815,7 +6830,8 @@ public abstract class AbstractJavadocMojo
Map<Path, MavenProject> reactorProjectsMap = new HashMap<>();
for ( MavenProject reactorProject : this.reactorProjects )
{
- if ( !isSkippedJavadoc( reactorProject ) )
+ if ( !isSkippedJavadoc( reactorProject ) && //
+ !isSkippedModule( reactorProject ) )
{
reactorProjectsMap.put( reactorProject.getBasedir().toPath(), reactorProject );
}
@@ -6824,6 +6840,24 @@ public abstract class AbstractJavadocMojo
return new ArrayList<>( modulesForAggregatedProject( project, reactorProjectsMap ) );
}
+ /**
+ *
+ * @return <code>true</code> if the module need to be skipped from aggregate generation
+ */
+ protected boolean isSkippedModule( MavenProject mavenProject )
+ {
+ if ( StringUtils.isEmpty( this.skippedModules ) )
+ {
+ return false;
+ }
+ List<String> modulesToSkip = Arrays.asList( StringUtils.split( this.skippedModules, ',' ) );
+ return modulesToSkip.contains( mavenProject.getArtifactId() );
+ }
+
+ /**
+ *
+ * @return <code>true</code> if the pom configuration skip javadoc generation for the project
+ */
protected boolean isSkippedJavadoc( MavenProject mavenProject )
{
String property = mavenProject.getProperties().getProperty( "maven.javadoc.skip" );