You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2011/07/08 14:57:29 UTC
svn commit: r1144300 - in /maven/plugins/trunk/maven-javadoc-plugin: ./
src/it/MJAVADOC-320/ src/it/MJAVADOC-320/module1/
src/it/MJAVADOC-320/module1/src/ src/it/MJAVADOC-320/module1/src/main/
src/it/MJAVADOC-320/module1/src/main/java/ src/it/MJAVADOC-...
Author: struberg
Date: Fri Jul 8 12:57:27 2011
New Revision: 1144300
URL: http://svn.apache.org/viewvc?rev=1144300&view=rev
Log:
MJAVADOC-320 fix includeTransitiveDependencySources.
thanks to Jakob Korherr (apacheId: jakobk)!
Added:
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java (with props)
Modified:
maven/plugins/trunk/maven-javadoc-plugin/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java
Modified: maven/plugins/trunk/maven-javadoc-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/pom.xml?rev=1144300&r1=1144299&r2=1144300&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/pom.xml Fri Jul 8 12:57:27 2011
@@ -387,6 +387,7 @@ under the License.
<pomInclude>MJAVADOC-275/pom.xml</pomInclude>
<pomInclude>MJAVADOC-280-*/pom.xml</pomInclude>
<pomInclude>site-failOnError/pom.xml</pomInclude>
+ <pomInclude>MJAVADOC-320/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt Fri Jul 8 12:57:27 2011
@@ -0,0 +1 @@
+clean install
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml Fri Jul 8 12:57:27 2011
@@ -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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module1</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Maven Javadoc Test for MJAVADOC-320 - Module1</name>
+
+ <!-- no explicit javadoc generation here -->
+
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java Fri Jul 8 12:57:27 2011
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugin.javadoc.it;
+
+public class Module1Class
+{
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml Fri Jul 8 12:57:27 2011
@@ -0,0 +1,92 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module2</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Maven Javadoc Test for MJAVADOC-320 - Module2</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <includeDependencySources>true</includeDependencySources>
+
+ <dependencySourceIncludes>
+ <!-- internal module include -->
+ <dependencySourceInclude>org.apache.maven.plugins.maven-javadoc-plugin.it:module3</dependencySourceInclude>
+
+ <!-- external module include -->
+ <dependencySourceInclude>org.apache.geronimo.specs:geronimo-el_2.2_spec</dependencySourceInclude>
+ </dependencySourceIncludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <!-- internal module dependencies -->
+ <dependency>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>module1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>module3</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- external dependencies -->
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-el_2.2_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_2.5_spec</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java Fri Jul 8 12:57:27 2011
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugin.javadoc.it;
+
+public class Module2Class
+{
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml Fri Jul 8 12:57:27 2011
@@ -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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>module3</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Maven Javadoc Test for MJAVADOC-320 - Module3</name>
+
+ <!-- no explicit javadoc generation here -->
+
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java Fri Jul 8 12:57:27 2011
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugin.javadoc.it;
+
+public class Module3Class
+{
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml Fri Jul 8 12:57:27 2011
@@ -0,0 +1,54 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Javadoc Test for MJAVADOC-320</name>
+
+ <modules>
+ <module>module1</module>
+ <module>module2</module>
+ <module>module3</module>
+ </modules>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh Fri Jul 8 12:57:27 2011
@@ -0,0 +1,80 @@
+
+/*
+ * 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.io.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "module2/target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "module2/target file is missing or not a directory." );
+ return false;
+ }
+
+ File apidocs = new File( target, "apidocs" );
+ if ( !apidocs.exists() || !apidocs.isDirectory() )
+ {
+ System.err.println( "module2/target/apidocs file is missing or not a directory." );
+ return false;
+ }
+
+ // module3 must be included
+ File module3File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module3Class.html" );
+ if ( !module3File.isFile() )
+ {
+ System.err.println( "module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module3Class.html file is missing or not a file." );
+ return false;
+ }
+
+ // el-api must be included
+ File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" );
+ if ( !elApiFile.isFile() )
+ {
+ System.err.println( "module2/target/apidocs/javax/el/ValueExpression.html file is missing or not a file." );
+ return false;
+ }
+
+ // module1 must NOT be included
+ File module1File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module1Class.html" );
+ if ( module1File.isFile() )
+ {
+ System.err.println( "module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module1Class.html file exists, but should not." );
+ return false;
+ }
+
+ // servlet-api must NOT be included
+ File servletSpecFile = new File( apidocs, "javax/servlet/ServletContext.html" );
+ if ( servletSpecFile.isFile() )
+ {
+ System.err.println( "module2/target/apidocs/javax/servlet/ServletContext.html file exists, but should not." );
+ return false;
+ }
+
+}
+catch( IOException e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java?rev=1144300&r1=1144299&r2=1144300&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java Fri Jul 8 12:57:27 2011
@@ -65,6 +65,8 @@ import org.apache.maven.artifact.resolve
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException;
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.IncludesArtifactFilter;
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.execution.MavenSession;
@@ -2156,18 +2158,22 @@ public abstract class AbstractJavadocMoj
final List<String> dependencyIncludes = dependencySourceIncludes;
final List<String> dependencyExcludes = dependencySourceExcludes;
- if ( isNotEmpty( dependencyIncludes ) || isNotEmpty( dependencyExcludes ) )
+ if ( !includeTransitiveDependencySources
+ || isNotEmpty( dependencyIncludes ) || isNotEmpty( dependencyExcludes ) )
{
+ if ( !includeTransitiveDependencySources )
+ {
+ andFilter.add( createDependencyArtifactFilter() );
+ }
+
if ( isNotEmpty( dependencyIncludes ) )
{
- andFilter.add( new PatternIncludesArtifactFilter( dependencyIncludes,
- !includeTransitiveDependencySources ) );
+ andFilter.add( new PatternIncludesArtifactFilter( dependencyIncludes, false ) );
}
if ( isNotEmpty( dependencyExcludes ) )
{
- andFilter.add( new PatternExcludesArtifactFilter( dependencyExcludes,
- !includeTransitiveDependencySources ) );
+ andFilter.add( new PatternExcludesArtifactFilter( dependencyExcludes, false ) );
}
config.withFilter( andFilter );
@@ -2190,6 +2196,25 @@ public abstract class AbstractJavadocMoj
}
/**
+ * Returns a ArtifactFilter that only includes direct dependencies of this project
+ * (verified via groupId and artifactId).
+ *
+ * @return
+ */
+ private ArtifactFilter createDependencyArtifactFilter()
+ {
+ Set<Artifact> dependencyArtifacts = project.getDependencyArtifacts();
+
+ List<String> artifactPatterns = new ArrayList<String>(dependencyArtifacts.size());
+ for (Artifact artifact : dependencyArtifacts)
+ {
+ artifactPatterns.add(artifact.getGroupId() + ":" + artifact.getArtifactId());
+ }
+
+ return new IncludesArtifactFilter(artifactPatterns);
+ }
+
+ /**
* Construct a SourceResolverConfig for resolving dependency sources and resources in a consistent
* way, so it can be reused for both source and resource resolution.
*
@@ -2733,9 +2758,8 @@ public abstract class AbstractJavadocMoj
if ( StringUtils.isEmpty( path.toString() ) && getLog().isWarnEnabled() )
{
- getLog().warn(
- "No docletpath option was found. Please review <docletpath/> or <docletArtifact/>"
- + " or <doclets/>." );
+ getLog().warn( "No docletpath option was found. Please review <docletpath/> or <docletArtifact/>"
+ + " or <doclets/>." );
}
return path.toString();
Added: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java?rev=1144300&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java Fri Jul 8 12:57:27 2011
@@ -0,0 +1,64 @@
+package org.apache.maven.plugin.javadoc.resolver;
+
+/*
+ * 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 org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+
+/**
+ * ArtifactFilter implementation which returns true for the given pomArtifact
+ * and offers the opportunity to delegate to another filter, if the given
+ * artifact is not the pomArtifact.
+ */
+public class ProjectArtifactFilter implements ArtifactFilter
+{
+
+ private Artifact pomArtifact;
+ private ArtifactFilter childFilter;
+
+ public ProjectArtifactFilter(Artifact pomArtifact)
+ {
+ this(pomArtifact, null);
+ }
+
+ public ProjectArtifactFilter(Artifact pomArtifact, ArtifactFilter childFilter)
+ {
+ this.pomArtifact = pomArtifact;
+ this.childFilter = childFilter;
+ }
+
+ public boolean include(Artifact artifact)
+ {
+ // always include the pom artifact
+ if ( pomArtifact.equals(artifact) )
+ {
+ return true;
+ }
+
+ // delegate to given filter, if available
+ if ( childFilter != null )
+ {
+ return childFilter.include(artifact);
+ }
+
+ // given artifact does not match any rule
+ return false;
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java?rev=1144300&r1=1144299&r2=1144300&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java Fri Jul 8 12:57:27 2011
@@ -329,12 +329,22 @@ public final class ResourceResolver
final ArtifactRepository localRepo = config.localRepository();
final List<ArtifactRepository> remoteRepos = config.project().getRemoteArtifactRepositories();
final ArtifactMetadataSource metadataSource = config.artifactMetadataSource();
+
final ArtifactFilter filter = config.filter();
+ ArtifactFilter resolutionFilter = null;
+ if ( filter != null )
+ {
+ // Wrap the filter in a ProjectArtifactFilter in order to always include the pomArtifact for resolution.
+ // NOTE that this is necessary, b/c the -sources artifacts are added dynamically to the pomArtifact
+ // and the resolver also checks the dependency trail with the given filter, thus the pomArtifact has
+ // to be explicitly included by the filter, otherwise the -sources artifacts won't be resolved.
+ resolutionFilter = new ProjectArtifactFilter(pomArtifact, filter);
+ }
final ArtifactResolver resolver = config.artifactResolver();
- final ArtifactResolutionResult resolutionResult =
- resolver.resolveTransitively( artifactSet, pomArtifact, localRepo, remoteRepos, metadataSource, filter );
+ final ArtifactResolutionResult resolutionResult = resolver.resolveTransitively(
+ artifactSet, pomArtifact, localRepo, remoteRepos, metadataSource, resolutionFilter );
final List<String> result = new ArrayList<String>( artifacts.size() );
for ( final Artifact a : (Collection<Artifact>) resolutionResult.getArtifacts() )
@@ -389,21 +399,24 @@ public final class ResourceResolver
{
final List<String> dirs = new ArrayList<String>();
- if ( config.includeCompileSources() )
+ if ( config.filter() == null || config.filter().include( artifact ) )
{
- final List<String> srcRoots = reactorProject.getCompileSourceRoots();
- for ( final String root : srcRoots )
+ if ( config.includeCompileSources() )
{
- dirs.add( root );
+ final List<String> srcRoots = reactorProject.getCompileSourceRoots();
+ for ( final String root : srcRoots )
+ {
+ dirs.add( root );
+ }
}
- }
- if ( config.includeTestSources() )
- {
- final List<String> srcRoots = reactorProject.getTestCompileSourceRoots();
- for ( final String root : srcRoots )
+ if ( config.includeTestSources() )
{
- dirs.add( root );
+ final List<String> srcRoots = reactorProject.getTestCompileSourceRoots();
+ for ( final String root : srcRoots )
+ {
+ dirs.add( root );
+ }
}
}
Re: svn commit: r1144300 - in /maven/plugins/trunk/maven-javadoc-plugin:
./ src/it/MJAVADOC-320/ src/it/MJAVADOC-320/module1/ src/it/MJAVADOC-320/module1/src/
src/it/MJAVADOC-320/module1/src/main/ src/it/MJAVADOC-320/module1/src/main/java/
src/it/MJAVADOC-...
Posted by Lukas Theussl <lt...@apache.org>.
Hi Mark,
Please use the Maven SVN Conventions for commit messages:
http://maven.apache.org/developers/conventions/svn.html
Thanks!
-Lukas
struberg@apache.org wrote:
> Author: struberg
> Date: Fri Jul 8 12:57:27 2011
> New Revision: 1144300
>
> URL: http://svn.apache.org/viewvc?rev=1144300&view=rev
> Log:
> MJAVADOC-320 fix includeTransitiveDependencySources.
>
> thanks to Jakob Korherr (apacheId: jakobk)!
>
> Added:
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/goals.txt (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/pom.xml (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module1/src/main/java/org/apache/maven/plugin/javadoc/it/Module1Class.java (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/pom.xml (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module2/src/main/java/org/apache/maven/plugin/javadoc/it/Module2Class.java (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/pom.xml (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/module3/src/main/java/org/apache/maven/plugin/javadoc/it/Module3Class.java (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/pom.xml (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-320/verify.bsh (with props)
> maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ProjectArtifactFilter.java (with props)
> Modified:
> maven/plugins/trunk/maven-javadoc-plugin/pom.xml
> maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
> maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/resolver/ResourceResolver.java
>
[snip]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org