You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mf...@apache.org on 2014/03/18 23:20:50 UTC
svn commit: r1579076 - in /maven/plugins/trunk/maven-javadoc-plugin: ./
src/it/MJAVADOC-369/ src/it/MJAVADOC-369/src/ src/it/MJAVADOC-369/src/main/
src/it/MJAVADOC-369/src/main/java/ src/it/MJAVADOC-369/src/main/java/com/
src/it/MJAVADOC-369/src/main/j...
Author: mfriedenhagen
Date: Tue Mar 18 22:20:49 2014
New Revision: 1579076
URL: http://svn.apache.org/r1579076
Log:
[MJAVADOC-369]: New goals javadoc-no-fork and test-javadoc-no-fork which will not invoke generate-*-sources.
Added:
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/invoker.properties
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/App.java
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/myapp/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/myapp/AppTest.java
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/verify.bsh
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocNoForkReport.java
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocNoForkReport.java
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=1579076&r1=1579075&r2=1579076&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/pom.xml Tue Mar 18 22:20:49 2014
@@ -405,6 +405,7 @@ under the License.
<pomInclude>site-failOnError/pom.xml</pomInclude>
<pomInclude>MJAVADOC-320/pom.xml</pomInclude>
<pomInclude>MJAVADOC-325/pom.xml</pomInclude>
+ <pomInclude>MJAVADOC-369/pom.xml</pomInclude>
</pomIncludes>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
</configuration>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/invoker.properties?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/invoker.properties (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/invoker.properties Tue Mar 18 22:20:49 2014
@@ -0,0 +1 @@
+invoker.goals=clean verify site
\ No newline at end of file
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/pom.xml?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/pom.xml Tue Mar 18 22:20:49 2014
@@ -0,0 +1,102 @@
+<?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>mjavadoc-369</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>myapp</name>
+ <url>http://maven.apache.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.3.1</version>
+ <executions>
+ <execution>
+ <id>default-enforce</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <alwaysPass/>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <reporting>
+ <excludeDefaults>true</excludeDefaults>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@pom.version@</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>javadoc-no-fork</report>
+ <report>test-javadoc-no-fork</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/App.java?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/main/java/com/mycompany/myapp/App.java Tue Mar 18 22:20:49 2014
@@ -0,0 +1,12 @@
+package com.mycompany.myapp;
+
+/**
+ * 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-369/src/test/java/com/mycompany/myapp/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/myapp/AppTest.java?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/myapp/AppTest.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/src/test/java/com/mycompany/myapp/AppTest.java Tue Mar 18 22:20:49 2014
@@ -0,0 +1,38 @@
+package com.mycompany.myapp;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/verify.bsh?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/verify.bsh (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-369/verify.bsh Tue Mar 18 22:20:49 2014
@@ -0,0 +1,40 @@
+
+/*
+ * 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.*;
+import org.codehaus.plexus.util.*;
+
+File indexFile = new File( basedir, "target/site/apidocs/index.html" );
+
+if ( !indexFile.exists() )
+{
+ System.err.println( indexFile.getAbsolutePath() + " is missing." );
+ return false;
+}
+
+File buildLog = new File( basedir, "build.log" );
+String content = IOUtil.toString( new FileInputStream( buildLog ) );
+String needle = ">>> maven-javadoc-plugin";
+if ( content.contains( needle ) )
+{
+ System.err.println( "build.log contains '" + needle + "'" );
+ return false;
+}
+return true;
\ No newline at end of file
Added: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocNoForkReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocNoForkReport.java?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocNoForkReport.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocNoForkReport.java Tue Mar 18 22:20:49 2014
@@ -0,0 +1,43 @@
+package org.apache.maven.plugin.javadoc;
+
+/*
+ * 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.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+/**
+ * Generates documentation for the <code>Java code</code> in an <b>NON aggregator</b> project using the standard
+ * <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>. Note that this
+ * goal does require generation of sources before site generation, e.g. by invoking <tt>mvn clean deploy site</tt>.
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 2.10
+ * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
+ * @see <a href="http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#options">Javadoc Options</a>
+ */
+@Mojo( name = "javadoc-no-fork", requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true )
+@Execute( phase = LifecyclePhase.NONE )
+public class JavadocNoForkReport
+ extends JavadocReport {
+}
Added: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocNoForkReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocNoForkReport.java?rev=1579076&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocNoForkReport.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocNoForkReport.java Tue Mar 18 22:20:49 2014
@@ -0,0 +1,44 @@
+package org.apache.maven.plugin.javadoc;
+
+/*
+ * 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.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+/**
+ * Generates documentation for the <code>Java Test code</code> in an <b>NON aggregator</b> project using the standard
+ * <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>. Note that this
+ * goal does require generation of test sources before site generation, e.g. by invoking
+ * <tt>mvn clean deploy site</tt>.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 2.10
+ * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
+ * @see <a href="http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#options">Javadoc Options </a>
+ */
+@Mojo( name = "test-javadoc-no-fork", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+@Execute( phase = LifecyclePhase.NONE )
+public class TestJavadocNoForkReport
+ extends TestJavadocReport
+{
+}