You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ws...@apache.org on 2008/03/03 01:16:32 UTC

svn commit: r632888 - in /maven/plugins/trunk/maven-javadoc-plugin: ./ src/it/MJAVADOC-137/ src/it/MJAVADOC-137/test1/ src/it/MJAVADOC-137/test1/src/ src/it/MJAVADOC-137/test1/src/main/ src/it/MJAVADOC-137/test1/src/main/java/ src/it/MJAVADOC-137/test1...

Author: wsmoak
Date: Sun Mar  2 16:16:31 2008
New Revision: 632888

URL: http://svn.apache.org/viewvc?rev=632888&view=rev
Log:
Adding a test for MJAVADOC-137, which really should fail, but doesn't.
mvn javadoc:jar at the command line does not produce the javadoc jars in the sub-modules, but the same config in the parent pom does. 

Added:
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/App.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/App.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/verify.bsh
Modified:
    maven/plugins/trunk/maven-javadoc-plugin/pom.xml

Modified: maven/plugins/trunk/maven-javadoc-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/pom.xml?rev=632888&r1=632887&r2=632888&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/pom.xml Sun Mar  2 16:16:31 2008
@@ -260,6 +260,7 @@
               <projectsDirectory>src/it</projectsDirectory>
               <pomIncludes>
                 <pomInclude>**/MJAVADOC-110/pom.xml</pomInclude>
+                <pomInclude>**/MJAVADOC-137/pom.xml</pomInclude>
                 <pomInclude>**/MJAVADOC-172/pom.xml</pomInclude>
               </pomIncludes>
               <postBuildHookScript>verify.bsh</postBuildHookScript>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/pom.xml?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/pom.xml Sun Mar  2 16:16:31 2008
@@ -0,0 +1,43 @@
+<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>com.example</groupId>
+  <artifactId>test-parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>test-parent</name>
+  <url>http://maven.apache.org</url>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.4-SNAPSHOT</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <modules>
+    <module>test1</module>
+    <module>test2</module>
+  </modules>
+
+</project>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/pom.xml?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/pom.xml Sun Mar  2 16:16:31 2008
@@ -0,0 +1,12 @@
+<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>com.example</groupId>
+    <artifactId>test-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>test1</artifactId>
+  <packaging>jar</packaging>
+  <name>test1</name>
+</project>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/App.java?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test1/src/main/java/com/example/App.java Sun Mar  2 16:16:31 2008
@@ -0,0 +1,13 @@
+package com.example;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/pom.xml?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/pom.xml Sun Mar  2 16:16:31 2008
@@ -0,0 +1,12 @@
+<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>com.example</groupId>
+    <artifactId>test-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>test2</artifactId>
+  <packaging>jar</packaging>
+  <name>test2</name>
+</project>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/App.java?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/test2/src/main/java/com/example/App.java Sun Mar  2 16:16:31 2008
@@ -0,0 +1,13 @@
+package com.example;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/verify.bsh?rev=632888&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/verify.bsh (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/verify.bsh Sun Mar  2 16:16:31 2008
@@ -0,0 +1,50 @@
+
+/*
+ * 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;
+
+// This test should fail -- mvn javadoc:jar at the command line does *not* produce the jars.
+// However, with the same config in the parent pom, it works.
+
+try
+{
+    File target = new File( basedir, "test1/target/test1-1.0-SNAPSHOT-javadoc.jar" );
+    if ( !target.exists() )
+    {
+        System.err.println( "Javadoc jar for module test1 is missing." );
+        return false;
+    }
+
+    File target = new File( basedir, "test2/target/test2-1.0-SNAPSHOT-javadoc.jar" );
+    if ( !target.exists() )
+    {
+        System.err.println( "Javadoc jar for module test2 is missing." );
+        return false;
+    }
+}
+catch( IOException e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;