You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2009/07/23 14:30:43 UTC
svn commit: r797039 [1/2] - in /maven/plugins/trunk/maven-javadoc-plugin/src:
main/java/org/apache/maven/plugin/javadoc/
test/java/org/apache/maven/plugin/javadoc/
test/java/org/apache/maven/plugin/javadoc/stubs/
test/resources/unit/fix-jdk5-test/ test...
Author: vsiveton
Date: Thu Jul 23 12:30:42 2009
New Revision: 797039
URL: http://svn.apache.org/viewvc?rev=797039&view=rev
Log:
o updated code for generic (QDOX-150) since qdox 1.9.2 (r793326)
o added workaround for QDOX-173
o added more tests
Added:
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-test/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-test/1.0/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-test/1.0/fix-test-1.0.jar (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-test/1.0/fix-test-1.0.pom (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-test/maven-metadata-local.xml (with props)
Modified:
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java
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/JavadocUtil.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk5MavenProjectStub.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk6MavenProjectStub.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixMavenProjectStub.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/src/main/java/fix/test/ClassWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/src/main/java/fix/test/ClassWithNoJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/src/main/java/fix/test/InterfaceWithJavadoc.java
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java Thu Jul 23 12:30:42 2009
@@ -28,7 +28,6 @@
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
-import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
@@ -49,6 +48,7 @@
import org.apache.commons.lang.ClassUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
@@ -71,6 +71,7 @@
import com.thoughtworks.qdox.model.JavaMethod;
import com.thoughtworks.qdox.model.JavaParameter;
import com.thoughtworks.qdox.model.Type;
+import com.thoughtworks.qdox.model.TypeVariable;
import com.thoughtworks.qdox.parser.ParseException;
/**
@@ -295,6 +296,13 @@
private String level;
/**
+ * The local repository where the artifacts are located, used by the tests.
+ *
+ * @parameter expression="${localRepository}"
+ */
+ private ArtifactRepository localRepository;
+
+ /**
* Output directory where Java classes will be rewrited.
*
* @parameter expression="${outputDirectory}" default-value="${project.build.sourceDirectory}"
@@ -594,8 +602,8 @@
properties.put( "failOnError", "false" );
File invokerLogFile = new File( project.getBuild().getDirectory(), "invoker-clirr-maven-plugin.txt" );
- JavadocUtil.invokeMaven( getLog(), project.getFile(), Collections.singletonList( clirrGoal ), properties,
- invokerLogFile );
+ JavadocUtil.invokeMaven( getLog(), new File( localRepository.getBasedir() ), project.getFile(),
+ Collections.singletonList( clirrGoal ), properties, invokerLogFile );
try
{
@@ -1344,13 +1352,26 @@
sb.append( EOL );
boolean separatorAdded = false;
- if ( fixTag( PARAM_TAG ) && javaMethod.getParameters() != null )
+ if ( fixTag( PARAM_TAG ) )
{
- for ( int i = 0; i < javaMethod.getParameters().length; i++ )
+ if ( javaMethod.getParameters() != null )
+ {
+ for ( int i = 0; i < javaMethod.getParameters().length; i++ )
+ {
+ JavaParameter javaParameter = javaMethod.getParameters()[i];
+
+ separatorAdded = appendDefaultParamTag( sb, indent, separatorAdded, javaParameter );
+ }
+ }
+ // is generic?
+ if ( javaMethod.getTypeParameters() != null )
{
- JavaParameter javaParameter = javaMethod.getParameters()[i];
+ for ( int i = 0; i < javaMethod.getTypeParameters().length; i++ )
+ {
+ TypeVariable typeParam = javaMethod.getTypeParameters()[i];
- separatorAdded = appendDefaultParamTag( sb, indent, separatorAdded, javaParameter );
+ separatorAdded = appendDefaultParamTag( sb, indent, separatorAdded, typeParam );
+ }
}
}
if ( fixTag( RETURN_TAG ) && javaMethod.getReturns() != null && !javaMethod.getReturns().isVoid() )
@@ -1663,13 +1684,10 @@
continue;
}
+ params = fixQdox173( params );
String paramName = params[0];
if ( docletTag.getName().equals( PARAM_TAG ) )
{
- if ( paramName.equals( "<" ) )
- {
- paramName = params[1];
- }
javaEntityTags.putJavadocParamTag( paramName, originalJavadocTag );
}
else if ( docletTag.getName().equals( RETURN_TAG ) )
@@ -1776,14 +1794,9 @@
private void writeParamTag( final StringBuffer sb, final JavaMethod javaMethod,
final JavaEntityTags javaEntityTags, String[] params )
{
- String paramName = params[0];
+ params = fixQdox173( params );
- boolean genericParam = false;
- if ( paramName.equals( "<" ) )
- {
- paramName = params[1];
- genericParam = true;
- }
+ String paramName = params[0];
if ( !fixTag( PARAM_TAG ) )
{
@@ -1796,33 +1809,40 @@
return;
}
+ boolean found = false;
JavaParameter javaParam = javaMethod.getParameterByName( paramName );
if ( javaParam == null )
{
- if ( genericParam )
+ // is generic?
+ TypeVariable[] typeParams = javaMethod.getTypeParameters();
+ for ( int i = 0; i < typeParams.length; i++ )
{
- String originalJavadocTag = javaEntityTags.getJavadocParamTag( paramName );
- if ( originalJavadocTag != null )
+ if ( typeParams[i].getGenericValue().equals( paramName ) )
{
- sb.append( originalJavadocTag );
+ found = true;
}
}
- else
+ }
+ else
+ {
+ found = true;
+ }
+
+ if ( !found )
+ {
+ if ( getLog().isWarnEnabled() )
{
- if ( getLog().isWarnEnabled() )
- {
- StringBuffer warn = new StringBuffer();
+ StringBuffer warn = new StringBuffer();
- warn.append( "Fixed unknown param '" ).append( paramName ).append( "' defined in " );
- warn.append( getJavaMethodAsString( javaMethod ) );
+ warn.append( "Fixed unknown param '" ).append( paramName ).append( "' defined in " );
+ warn.append( getJavaMethodAsString( javaMethod ) );
- getLog().warn( warn.toString() );
- }
+ getLog().warn( warn.toString() );
+ }
- if ( sb.toString().endsWith( EOL ) )
- {
- sb.delete( sb.toString().lastIndexOf( EOL ), sb.toString().length() );
- }
+ if ( sb.toString().endsWith( EOL ) )
+ {
+ sb.delete( sb.toString().lastIndexOf( EOL ), sb.toString().length() );
}
}
else
@@ -1960,15 +1980,31 @@
{
JavaMethod javaMethod = (JavaMethod) entity;
- if ( fixTag( PARAM_TAG ) && javaMethod.getParameters() != null )
+ if ( fixTag( PARAM_TAG ) )
{
- for ( int i = 0; i < javaMethod.getParameters().length; i++ )
+ if ( javaMethod.getParameters() != null )
{
- JavaParameter javaParameter = javaMethod.getParameters()[i];
+ for ( int i = 0; i < javaMethod.getParameters().length; i++ )
+ {
+ JavaParameter javaParameter = javaMethod.getParameters()[i];
- if ( javaEntityTags.getJavadocParamTag( javaParameter.getName(), true ) == null )
+ if ( javaEntityTags.getJavadocParamTag( javaParameter.getName(), true ) == null )
+ {
+ appendDefaultParamTag( sb, indent, javaParameter );
+ }
+ }
+ }
+ // is generic?
+ if ( javaMethod.getTypeParameters() != null )
+ {
+ for ( int i = 0; i < javaMethod.getTypeParameters().length; i++ )
{
- appendDefaultParamTag( sb, indent, javaParameter );
+ TypeVariable typeParam = javaMethod.getTypeParameters()[i];
+
+ if ( javaEntityTags.getJavadocParamTag( "<" + typeParam.getName() + ">", true ) == null )
+ {
+ appendDefaultParamTag( sb, indent, typeParam );
+ }
}
}
}
@@ -2278,6 +2314,31 @@
/**
* @param sb not null
* @param indent not null
+ * @param separatorAdded
+ * @param typeParameter not null
+ * @return true if separator has been added.
+ */
+ private boolean appendDefaultParamTag( final StringBuffer sb, final String indent, boolean separatorAdded,
+ final TypeVariable typeParameter )
+ {
+ if ( !fixTag( PARAM_TAG ) )
+ {
+ return separatorAdded;
+ }
+
+ if ( !separatorAdded )
+ {
+ appendSeparator( sb, indent );
+ separatorAdded = true;
+ }
+
+ appendDefaultParamTag( sb, indent, typeParameter );
+ return separatorAdded;
+ }
+
+ /**
+ * @param sb not null
+ * @param indent not null
* @param javaParameter not null
*/
private void appendDefaultParamTag( final StringBuffer sb, final String indent,
@@ -2298,6 +2359,26 @@
/**
* @param sb not null
* @param indent not null
+ * @param typeParameter not null
+ */
+ private void appendDefaultParamTag( final StringBuffer sb, final String indent,
+ final TypeVariable typeParameter )
+ {
+ if ( !fixTag( PARAM_TAG ) )
+ {
+ return;
+ }
+
+ sb.append( indent ).append( " * @" ).append( PARAM_TAG ).append( " " );
+ sb.append( "<" + typeParameter.getName() + ">");
+ sb.append( " " );
+ sb.append( getDefaultJavadocForType( typeParameter ) );
+ sb.append( EOL );
+ }
+
+ /**
+ * @param sb not null
+ * @param indent not null
* @param separatorAdded
* @param javaMethod not null
* @return true if separator has been added.
@@ -2391,13 +2472,12 @@
}
/**
- * Verify if a method has <code>@Override</code> annotation or if it is an inherited method from an interface
- * or a super class. The goal is to handle <code>{@inheritDoc}</code> tag.
+ * Verify if a method has <code>@java.lang.Override()</code> annotation or if it is an inherited method
+ * from an interface or a super class. The goal is to handle <code>{@inheritDoc}</code> tag.
*
* @param javaMethod not null
- * @return <code>true</code> if the method is inherited.
+ * @return <code>true</code> if the method is inherited, <code>false</code> otherwise.
* @throws MojoExecutionException if any
- * @throws SecurityException if any
*/
private boolean isInherited( JavaMethod javaMethod )
throws MojoExecutionException, SecurityException
@@ -2422,12 +2502,9 @@
{
Class intface = (Class) it.next();
- if ( intface.getDeclaredMethods() != null )
+ if ( isInherited( intface, javaMethod ) )
{
- if ( isInherited( intface.getDeclaredMethods(), javaMethod ) )
- {
- return true;
- }
+ return true;
}
}
@@ -2436,12 +2513,9 @@
{
Class superClass = (Class) it.next();
- if ( superClass.getDeclaredMethods() != null )
+ if ( isInherited( superClass, javaMethod ) )
{
- if ( isInherited( superClass.getDeclaredMethods(), javaMethod ) )
- {
- return true;
- }
+ return true;
}
}
@@ -2449,74 +2523,43 @@
}
/**
- * @param methods not null
- * @param javaMethod not null
- * @return <code>true</code> if the javaMethod exists in methods.
+ * @param clazz the Java class object, not null
+ * @param javaMethod the QDox JavaMethod object not null
+ * @return <code>true</code> if <code>javaMethod</code> exists in the given <code>clazz</code>,
+ * <code>false</code> otherwise.
* @see #isInherited(JavaMethod)
*/
- private boolean isInherited( Method[] methods, JavaMethod javaMethod )
+ private boolean isInherited( Class clazz, JavaMethod javaMethod )
{
- AccessibleObject.setAccessible( methods, true );
+ Method[] methods = clazz.getDeclaredMethods();
for ( int i = 0; i < methods.length; i++ )
{
- Method method = methods[i];
-
- if ( !method.getName().equals( javaMethod.getName() ) )
+ if ( !methods[i].getName().equals( javaMethod.getName() ) )
{
continue;
}
- // TODO review generic for changes in QDOX 1.9.1
- if ( javaMethod.getParameters() != null )
+ if ( methods[i].getParameterTypes().length != javaMethod.getParameters().length )
{
- boolean isMaybeGeneric = false;
- List javaMethodParams = new LinkedList();
+ continue;
+ }
- for ( int j = 0; j < javaMethod.getParameters().length; j++ )
+ boolean found = false;
+ for ( int j = 0; j < methods[i].getParameterTypes().length; j++ )
+ {
+ String name1 = methods[i].getParameterTypes()[j].getName();
+ String name2 = javaMethod.getParameters()[j].getType().getFullQualifiedName();
+ if ( name1.equals( name2 ) )
{
- Type type = javaMethod.getParameters()[j].getType();
-
- // workaround for generics i.e. type.getValue() = E instead of real class
- try
- {
- getClass( type.getJavaClass().getFullyQualifiedName() );
- if ( type.isArray() )
- {
- javaMethodParams.add( type.getValue() + "[]" );
- }
- else
- {
- javaMethodParams.add( type.getValue() );
- }
- }
- catch ( MojoExecutionException e )
- {
- isMaybeGeneric = true;
- break;
- }
+ found = true;
}
- if ( !isMaybeGeneric )
+ else
{
- List methodParams = new LinkedList();
- for ( int j = 0; j < method.getParameterTypes().length; j++ )
- {
- if ( method.getParameterTypes()[j].isArray() )
- {
- methodParams.add( method.getParameterTypes()[j].getComponentType().getName() + "[]" );
- }
- else
- {
- methodParams.add( method.getParameterTypes()[j].getName() );
- }
- }
- if ( !methodParams.equals( javaMethodParams ) )
- {
- continue;
- }
+ found = found && false;
}
}
- return true;
+ return found;
}
return false;
@@ -2530,7 +2573,7 @@
{
StringBuffer sb = new StringBuffer();
- if ( type.isPrimitive() )
+ if ( !TypeVariable.class.isAssignableFrom( type.getClass() ) && type.isPrimitive() )
{
if ( type.isArray() )
{
@@ -2589,12 +2632,7 @@
return false;
}
- if ( clirrNewClasses.contains( javaClass.getFullyQualifiedName() ) )
- {
- return true;
- }
-
- return false;
+ return clirrNewClasses.contains( javaClass.getFullyQualifiedName() );
}
/**
@@ -2621,72 +2659,30 @@
for ( Iterator it = clirrMethods.iterator(); it.hasNext(); )
{
- String clirrMethod = (String) it.next(); // see java.lang.reflect.Method#toString()
+ // see net.sf.clirr.core.internal.checks.MethodSetCheck#getMethodId(JavaType clazz, Method method)
+ String clirrMethod = (String) it.next();
- String javaMethodSignature = javaMethod.getDeclarationSignature( false );
- if ( clirrMethod.indexOf( javaMethodSignature ) != -1 )
- {
- return true;
- }
-
- String smallSignature = javaMethod.getName();
+ String retrn = "";
if ( javaMethod.getReturns() != null )
{
- smallSignature = javaMethod.getReturns().getValue() + " " + javaMethod.getName();
+ retrn = javaMethod.getReturns().getFullQualifiedName();
}
- if ( clirrMethod.indexOf( smallSignature ) == -1 )
+ StringBuffer params = new StringBuffer();
+ JavaParameter[] parameters = javaMethod.getParameters();
+ for ( int i = 0; i < parameters.length; i++ )
{
- continue;
- }
- // Workaround to take care of generics
- if ( javaMethod.getParameters() != null )
- {
- boolean isMaybeGeneric = false;
- List javaMethodParams = new LinkedList();
- for ( int i = 0; i < javaMethod.getParameters().length; i++ )
- {
- Type type = javaMethod.getParameters()[i].getType();
-
- // QDOX-150: type.getValue() = E instead of real class...
- try
- {
- getClass( type.getJavaClass().getFullyQualifiedName() );
- if ( type.isArray() )
- {
- javaMethodParams.add( type.getValue() + "[]" );
- }
- else
- {
- javaMethodParams.add( type.getValue() );
- }
- }
- catch ( MojoExecutionException e )
- {
- isMaybeGeneric = true;
- break;
- }
- }
- if ( !isMaybeGeneric )
+ params.append( parameters[i].getResolvedValue() );
+ if ( i < parameters.length - 1 )
{
- if ( clirrMethod.indexOf( "(" + StringUtils.join( javaMethodParams.iterator(), ", " ) + ")" ) != -1 )
- {
- return true;
- }
- }
- else
- {
- if ( getLog().isWarnEnabled() )
- {
- StringBuffer warn = new StringBuffer();
- warn.append( "Not sure if " );
- warn.append( getJavaMethodAsString( javaMethod ) );
- warn.append( " is newer or not, it is maybe due to generics. " );
- warn.append( "You need to manually review it." );
-
- getLog().warn( warn.toString() );
- }
+ params.append( ", " );
}
}
+ if ( ( clirrMethod.indexOf( retrn + " " ) != -1 )
+ && ( clirrMethod.indexOf( javaMethod.getName() + "(" ) != -1 )
+ && ( clirrMethod.indexOf( "(" + params.toString() + ")" ) != -1 ) )
+ {
+ return true;
+ }
}
return false;
@@ -3069,12 +3065,8 @@
String originalJavadoc = extractOriginalJavadocContent( javaClassContent, entity );
- String paramValue = docletTag.getParameters()[0];
- if ( docletTag.getParameters().length > 3 && docletTag.getParameters()[0].trim().equals( "<" )
- && docletTag.getParameters()[2].trim().equals( ">" ) )
- {
- paramValue = "<" + docletTag.getParameters()[1] + ">";
- }
+ String[] params = fixQdox173( docletTag.getParameters() );
+ String paramValue = params[0];
StringBuffer sb = new StringBuffer();
BufferedReader lr = new BufferedReader( new StringReader( originalJavadoc ) );
@@ -3393,6 +3385,37 @@
}
/**
+ * Workaroung for QDOX-173 about generic.
+ *
+ * @param params not null
+ * @return the wanted params.
+ */
+ private static String[] fixQdox173( String[] params )
+ {
+ if ( params == null || params.length == 0 )
+ {
+ return params;
+ }
+ if ( params.length < 3 )
+ {
+ return params;
+ }
+
+ if ( params[0].trim().equals( "<" ) && params[2].trim().equals( ">" ) )
+ {
+ String param = params[1];
+ List l = new ArrayList( Arrays.asList( params ) );
+ l.set( 1, "<" + param + ">" );
+ l.remove( 0 );
+ l.remove( 1 );
+
+ return (String[]) l.toArray( new String[0] );
+ }
+
+ return params;
+ }
+
+ /**
* Wrapper class for the entity's tags.
*/
private class JavaEntityTags
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=797039&r1=797038&r2=797039&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 Thu Jul 23 12:30:42 2009
@@ -4487,8 +4487,8 @@
File invokerLogFile =
new File( project.getBuild().getDirectory(), "invoker-maven-javadoc-plugin-" + i + ".txt" );
- JavadocUtil.invokeMaven( getLog(), p.getFile(), Collections.singletonList( javadocGoal ),
- null, invokerLogFile );
+ JavadocUtil.invokeMaven( getLog(), new File( localRepository.getBasedir() ), p.getFile(),
+ Collections.singletonList( javadocGoal ), null, invokerLogFile );
}
if ( location.exists() )
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java Thu Jul 23 12:30:42 2009
@@ -955,14 +955,15 @@
* <code>M2_HOME</code> system env variables.
*
* @param log a logger could be null.
+ * @param localRepositoryDir the localRepository not null.
* @param project a not null project file.
* @param goals a not null goals list.
* @param properties the properties for the goals, could be null.
* @param invokerLog the log file where the invoker will be written, if null using <code>System.out</code>.
* @since 2.6
*/
- protected static void invokeMaven( Log log, File projectFile, List goals, Properties properties,
- File invokerLog )
+ protected static void invokeMaven( Log log, File localRepositoryDir, File projectFile, List goals,
+ Properties properties, File invokerLog )
{
if ( projectFile == null )
{
@@ -976,6 +977,11 @@
{
throw new IllegalArgumentException( "goals should be not empty." );
}
+ if ( localRepositoryDir == null || !localRepositoryDir.isDirectory() )
+ {
+ throw new IllegalArgumentException( "localRepositoryDir '" + localRepositoryDir
+ + "' should be a directory." );
+ }
String mavenHome = getMavenHome( log );
if ( StringUtils.isEmpty( mavenHome ) )
@@ -996,11 +1002,11 @@
Invoker invoker = new DefaultInvoker();
invoker.setMavenHome( new File( mavenHome ) );
+ invoker.setLocalRepositoryDirectory( localRepositoryDir );
InvocationRequest request = new DefaultInvocationRequest();
request.setBaseDirectory( projectFile.getParentFile() );
request.setPomFile( projectFile );
-
if ( log != null )
{
request.setDebug( log.isDebugEnabled() );
@@ -1014,6 +1020,11 @@
{
request.setProperties( properties );
}
+ File javaHome = getJavaHome( log );
+ if ( javaHome != null )
+ {
+ request.setJavaHome( javaHome );
+ }
InvocationResult result;
try
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java Thu Jul 23 12:30:42 2009
@@ -54,6 +54,79 @@
/** The vm line separator */
private static final String EOL = System.getProperty( "line.separator" );
+ /** flag to copy repo only one time */
+ private static boolean TEST_REPO_CREATED = false;
+
+ /** {@inheritDoc} */
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+
+ createTestRepo();
+ }
+
+ /**
+ * Create test repository in target directory.
+ *
+ * @throws IOException if any
+ */
+ private void createTestRepo()
+ throws IOException
+ {
+ if ( TEST_REPO_CREATED )
+ {
+ return;
+ }
+
+ File localRepo = new File( getBasedir(), "target/local-repo/" );
+ localRepo.mkdirs();
+
+ // ----------------------------------------------------------------------
+ // fix-test-1.0.jar
+ // ----------------------------------------------------------------------
+
+ File sourceDir = new File( getBasedir(), "src/test/resources/unit/fix-test/repo/" );
+ assertTrue( sourceDir.exists() );
+ FileUtils.copyDirectoryStructure( sourceDir, localRepo );
+
+ // ----------------------------------------------------------------------
+ // fix-jdk5-test-1.0.jar
+ // ----------------------------------------------------------------------
+
+ sourceDir = new File( getBasedir(), "src/test/resources/unit/fix-jdk5-test/repo/" );
+ assertTrue( sourceDir.exists() );
+ FileUtils.copyDirectoryStructure( sourceDir, localRepo );
+
+ // ----------------------------------------------------------------------
+ // fix-jdk6-test-1.0.jar
+ // ----------------------------------------------------------------------
+
+ sourceDir = new File( getBasedir(), "src/test/resources/unit/fix-jdk6-test/repo/" );
+ assertTrue( sourceDir.exists() );
+ FileUtils.copyDirectoryStructure( sourceDir, localRepo );
+
+ // Remove SCM files
+ List files =
+ FileUtils.getFileAndDirectoryNames( localRepo, FileUtils.getDefaultExcludesAsString(), null, true,
+ true, true, true );
+ for ( Iterator it = files.iterator(); it.hasNext(); )
+ {
+ File file = new File( it.next().toString() );
+
+ if ( file.isDirectory() )
+ {
+ FileUtils.deleteDirectory( file );
+ }
+ else
+ {
+ file.delete();
+ }
+ }
+
+ TEST_REPO_CREATED = true;
+ }
+
/**
* @throws Exception if any
*/
@@ -548,7 +621,8 @@
goals.add( "compile" );
File invokerLogFile = new File( getBasedir(), "target/invoker-FixJavadocMojoTest.txt" );
- JavadocUtil.invokeMaven( log, testPom, goals, null, invokerLogFile );
+ JavadocUtil.invokeMaven( log, new File( getBasedir(), "target/local-repo" ), testPom, goals, null,
+ invokerLogFile );
}
// ----------------------------------------------------------------------
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java Thu Jul 23 12:30:42 2009
@@ -46,24 +46,16 @@
{
private static final String LINE_SEPARATOR = " ";
- /**
- * @see junit.framework.TestCase#setUp()
- */
+ /** flag to copy repo only one time */
+ private static boolean TEST_REPO_CREATED = false;
+
+ /** {@inheritDoc} */
protected void setUp()
throws Exception
{
- // required for mojo lookups to work
super.setUp();
- createTestRepo();
- }
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown()
- throws Exception
- {
- super.tearDown();
+ createTestRepo();
}
/**
@@ -74,12 +66,12 @@
private void createTestRepo()
throws IOException
{
- File localRepo = new File( getBasedir(), "target/local-repo/" );
- if ( localRepo.exists() )
+ if ( TEST_REPO_CREATED )
{
return;
}
+ File localRepo = new File( getBasedir(), "target/local-repo/" );
localRepo.mkdirs();
// ----------------------------------------------------------------------
@@ -140,6 +132,8 @@
file.delete();
}
}
+
+ TEST_REPO_CREATED = true;
}
/**
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk5MavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk5MavenProjectStub.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk5MavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk5MavenProjectStub.java Thu Jul 23 12:30:42 2009
@@ -91,4 +91,10 @@
// Using unit test dir
return new File( super.getBasedir() + "/target/test/unit/fix-jdk5-test/" );
}
+
+ /** {@inheritDoc} */
+ public File getFile()
+ {
+ return new File( getBasedir(), "pom.xml" );
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk6MavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk6MavenProjectStub.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk6MavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixJdk6MavenProjectStub.java Thu Jul 23 12:30:42 2009
@@ -91,4 +91,10 @@
// Using unit test dir
return new File( super.getBasedir() + "/target/test/unit/fix-jdk6-test/" );
}
+
+ /** {@inheritDoc} */
+ public File getFile()
+ {
+ return new File( getBasedir(), "pom.xml" );
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixMavenProjectStub.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixMavenProjectStub.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/FixMavenProjectStub.java Thu Jul 23 12:30:42 2009
@@ -91,4 +91,10 @@
// Using unit test dir
return new File( super.getBasedir() + "/target/test/unit/fix-test/" );
}
+
+ /** {@inheritDoc} */
+ public File getFile()
+ {
+ return new File( getBasedir(), "pom.xml" );
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -27,7 +27,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class ClassWithJavadoc
implements InterfaceWithJavadoc
@@ -61,15 +60,47 @@
return null;
}
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
/**
- * Dummy method.
+ * Correct generic doclets.
*
* @param <K> The Key type for the method
* @param <V> The Value type for the method
* @param name The name.
* @return A map configured.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> withGenericDoclet( String name )
+ {
+ return null;
+ }
+
+ /**
+ * Wrong generic doclets.
+ *
+ * @param name The name.
+ * @return A map configured.
+ * @param <K> a K object.
+ * @param <V> a V object.
+ * @since 1.1
*/
- public <K, V> java.util.Map<K, V> dummyMethod( String name )
+ public <K, V> Map<K, V> withGenericDoclet2( String name )
+ {
+ return null;
+ }
+
+ /**
+ * New class method to be found by Clirr.
+ *
+ * @param aList a {@link java.util.List} object.
+ * @param aMap a {@link java.util.Map} object.
+ * @return a {@link java.util.Map} object.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> newClassMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
return null;
}
@@ -82,4 +113,10 @@
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
}
+
+ /** {@inheritDoc} */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java Thu Jul 23 12:30:42 2009
@@ -27,7 +27,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class ClassWithNoJavadoc
implements InterfaceWithNoJavadoc
@@ -53,6 +52,7 @@
* <p>withGenericParameter</p>
*
* @param request a T object.
+ * @param <T> a T object.
* @return a {@link java.util.List} object.
* @throws java.lang.Exception if any.
*/
@@ -63,6 +63,39 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * <p>withGenericParameter2</p>
+ *
+ * @param name a {@link java.lang.String} object.
+ * @param <K> a K object.
+ * @param <V> a V object.
+ * @return a {@link java.util.Map} object.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> withGenericParameter2( String name )
+ {
+ return null;
+ }
+
+ /**
+ * <p>newClassMethod</p>
+ *
+ * @param aList a {@link java.util.List} object.
+ * @param aMap a {@link java.util.Map} object.
+ * @param <K> a K object.
+ * @param <V> a V object.
+ * @return a {@link java.util.Map} object.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> newClassMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
@@ -70,4 +103,10 @@
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
}
+
+ /** {@inheritDoc} */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -28,7 +28,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public interface InterfaceWithJavadoc
{
@@ -42,4 +41,18 @@
* @param aMap a {@link java.util.Map} object.
*/
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New interface method to be found by Clirr.
+ *
+ * @param aList a {@link java.util.List} object.
+ * @param aMap a {@link java.util.Map} object.
+ * @return a {@link java.util.Map} object.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java Thu Jul 23 12:30:42 2009
@@ -28,7 +28,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public interface InterfaceWithNoJavadoc
{
@@ -45,4 +44,20 @@
* @param aMap a {@link java.util.Map} object.
*/
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * <p>newInterfaceMethod</p>
+ *
+ * @param aList a {@link java.util.List} object.
+ * @param aMap a {@link java.util.Map} object.
+ * @param <K> a K object.
+ * @param <V> a V object.
+ * @return a {@link java.util.Map} object.
+ * @since 1.1
+ */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -27,7 +27,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class SubClassWithJavadoc
extends ClassWithJavadoc
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/pom.xml?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/pom.xml Thu Jul 23 12:30:42 2009
@@ -22,7 +22,7 @@
<groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
<artifactId>fix-jdk5-test</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.1-SNAPSHOT</version>
<name>Javadoc Test Project</name>
<packaging>jar</packaging>
@@ -42,15 +42,17 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugin.javadoc.stubs.FixJdk5MavenProjectStub"/>
+ <localRepository>${localRepository}</localRepository>
<outputDirectory>${basedir}/target/test/unit/fix-jdk5-test/target/generated</outputDirectory>
- <defaultSince>1.0-SNAPSHOT</defaultSince>
+ <defaultSince>1.1-SNAPSHOT</defaultSince>
<encoding>UTF-8</encoding>
<fixTags>all</fixTags>
<fixClassComment>true</fixClassComment>
<fixFieldComment>true</fixFieldComment>
<fixMethodComment>true</fixMethodComment>
<force>true</force>
- <ignoreClirr>true</ignoreClirr>
+ <ignoreClirr>false</ignoreClirr>
+ <comparisonVersion>1.0</comparisonVersion>
<includes>**/*.java</includes>
<level>protected</level>
<defaultAuthor><![CDATA[<a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>]]></defaultAuthor>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar?rev=797039&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom?rev=797039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom Thu Jul 23 12:30:42 2009
@@ -0,0 +1,61 @@
+<?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.maven-javadoc-plugin.unit</groupId>
+ <artifactId>fix-jdk5-test</artifactId>
+ <version>1.0</version>
+ <name>Javadoc Test Project</name>
+ <packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.javadoc.stubs.FixJdk5MavenProjectStub"/>
+ <outputDirectory>${basedir}/target/test/unit/fix-jdk5-test/target/generated</outputDirectory>
+ <defaultSince>1.0-SNAPSHOT</defaultSince>
+ <encoding>UTF-8</encoding>
+ <fixTags>all</fixTags>
+ <fixClassComment>true</fixClassComment>
+ <fixFieldComment>true</fixFieldComment>
+ <fixMethodComment>true</fixMethodComment>
+ <force>true</force>
+ <ignoreClirr>true</ignoreClirr>
+ <includes>**/*.java</includes>
+ <level>protected</level>
+ <defaultAuthor><![CDATA[<a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>]]></defaultAuthor>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml?rev=797039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml Thu Jul 23 12:30:42 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+ <artifactId>fix-jdk5-test</artifactId>
+ <version>1.0</version>
+ <versioning>
+ <versions>
+ <version>1.0</version>
+ </versions>
+ <lastUpdated>20090723104459</lastUpdated>
+ </versioning>
+</metadata>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -51,15 +51,40 @@
return null;
}
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
/**
- * Dummy method.
+ * Correct generic doclets.
*
* @param <K> The Key type for the method
* @param <V> The Value type for the method
* @param name The name.
* @return A map configured.
*/
- public <K, V> java.util.Map<K, V> dummyMethod( String name )
+ public <K, V> Map<K, V> withGenericDoclet( String name )
+ {
+ return null;
+ }
+
+ /**
+ * Wrong generic doclets.
+ *
+ * @param <T> The Key type for the method
+ * @param <U> The Value type for the method
+ * @param name The name.
+ * @return A map configured.
+ */
+ public <K, V> Map<K, V> withGenericDoclet2( String name )
+ {
+ return null;
+ }
+
+ /**
+ * New class method to be found by Clirr.
+ */
+ public <K, V> Map<K, V> newClassMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
return null;
}
@@ -72,4 +97,10 @@
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
}
+
+ /** {@inheritDoc} */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java Thu Jul 23 12:30:42 2009
@@ -41,11 +41,29 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ public <K, V> Map<K, V> withGenericParameter2( String name )
+ {
+ return null;
+ }
+
+ public <K, V> Map<K, V> newClassMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
- /** {@inheritDoc} */
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
{
}
+
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -35,4 +35,13 @@
* To add default method tags.
*/
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New interface method to be found by Clirr.
+ */
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java Thu Jul 23 12:30:42 2009
@@ -30,4 +30,10 @@
Map<String, String> MY_MAP_CONSTANT = Collections.singletonMap( "key", "value" );
public void withGenericParameters( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ public <K, V> Map<K, V> newInterfaceMethod( List<String> aList, Map<Map<String, List<String>>, List<String>> aMap );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -26,7 +26,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class ClassWithJavadoc
implements InterfaceWithJavadoc
@@ -41,6 +40,22 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New class method to be found by Clirr.
+ *
+ * @param aString a {@link java.lang.String} object.
+ * @return a {@link java.lang.String} object.
+ * @since 1.1
+ */
+ public String newClassMethod( String aString )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
@@ -54,4 +69,11 @@
public void withGenericParameters2( List<String> aList )
{
}
+
+ /** {@inheritDoc} */
+ @Override
+ public String newInterfaceMethod( String aString )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -26,7 +26,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public interface InterfaceWithJavadoc
{
@@ -43,4 +42,17 @@
* @param aList a {@link java.util.List} object.
*/
void withGenericParameters2( List<String> aList );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New interface method to be found by Clirr.
+ *
+ * @param aString a {@link java.lang.String} object.
+ * @return a {@link java.lang.String} object.
+ * @since 1.1
+ */
+ public String newInterfaceMethod( String aString );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/pom.xml?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/pom.xml Thu Jul 23 12:30:42 2009
@@ -22,7 +22,7 @@
<groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
<artifactId>fix-jdk6-test</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.1-SNAPSHOT</version>
<name>Javadoc Test Project</name>
<packaging>jar</packaging>
@@ -42,15 +42,17 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<project implementation="org.apache.maven.plugin.javadoc.stubs.FixJdk6MavenProjectStub"/>
+ <localRepository>${localRepository}</localRepository>
<outputDirectory>${basedir}/target/test/unit/fix-jdk6-test/target/generated</outputDirectory>
- <defaultSince>1.0-SNAPSHOT</defaultSince>
+ <defaultSince>1.1-SNAPSHOT</defaultSince>
<encoding>UTF-8</encoding>
<fixTags>all</fixTags>
<fixClassComment>true</fixClassComment>
<fixFieldComment>true</fixFieldComment>
<fixMethodComment>true</fixMethodComment>
<force>true</force>
- <ignoreClirr>true</ignoreClirr>
+ <ignoreClirr>false</ignoreClirr>
+ <comparisonVersion>1.0</comparisonVersion>
<includes>**/*.java</includes>
<level>protected</level>
<defaultAuthor><![CDATA[<a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>]]></defaultAuthor>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar?rev=797039&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom?rev=797039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom Thu Jul 23 12:30:42 2009
@@ -0,0 +1,61 @@
+<?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.maven-javadoc-plugin.unit</groupId>
+ <artifactId>fix-jdk6-test</artifactId>
+ <version>1.0</version>
+ <name>Javadoc Test Project</name>
+ <packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.javadoc.stubs.FixJdk6MavenProjectStub"/>
+ <outputDirectory>${basedir}/target/test/unit/fix-jdk6-test/target/generated</outputDirectory>
+ <defaultSince>1.0-SNAPSHOT</defaultSince>
+ <encoding>UTF-8</encoding>
+ <fixTags>all</fixTags>
+ <fixClassComment>true</fixClassComment>
+ <fixFieldComment>true</fixFieldComment>
+ <fixMethodComment>true</fixMethodComment>
+ <force>true</force>
+ <ignoreClirr>true</ignoreClirr>
+ <includes>**/*.java</includes>
+ <level>protected</level>
+ <defaultAuthor><![CDATA[<a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>]]></defaultAuthor>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml?rev=797039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml Thu Jul 23 12:30:42 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+ <artifactId>fix-jdk6-test</artifactId>
+ <version>1.0</version>
+ <versioning>
+ <versions>
+ <version>1.0</version>
+ </versions>
+ <lastUpdated>20090723104555</lastUpdated>
+ </versioning>
+</metadata>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -35,6 +35,18 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New class method to be found by Clirr.
+ */
+ public String newClassMethod( String aString )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
@@ -49,4 +61,10 @@
public void withGenericParameters2( List<String> aList )
{
}
+
+ @Override
+ public String newInterfaceMethod( String aString )
+ {
+ return null;
+ }
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -35,4 +35,13 @@
* To take care of identifier.
*/
void withGenericParameters2( List<String> aList );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New interface method to be found by Clirr.
+ */
+ public String newInterfaceMethod( String aString );
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -24,7 +24,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class ClassWithJavadoc
implements InterfaceWithJavadoc
@@ -206,6 +205,22 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New class method to be found by Clirr.
+ *
+ * @param aString a {@link java.lang.String} object.
+ * @return a {@link java.lang.String} object.
+ * @since 1.1
+ */
+ public String newClassMethod( String aString )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
@@ -245,6 +260,16 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ *
+ * New interface method to be found by Clirr.
+ */
+ public String newInterfaceMethod( String aString )
+ {
+ return null;
+ }
+
// ----------------------------------------------------------------------
// Inner classes
// ----------------------------------------------------------------------
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java Thu Jul 23 12:30:42 2009
@@ -26,7 +26,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public class ClassWithNoJavadoc
implements InterfaceWithNoJavadoc
@@ -104,6 +103,22 @@
}
// ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * <p>newClassMethod</p>
+ *
+ * @param aString a {@link java.lang.String} object.
+ * @return a {@link java.lang.String} object.
+ * @since 1.1
+ */
+ public String newClassMethod( String aString )
+ {
+ return null;
+ }
+
+ // ----------------------------------------------------------------------
// Inheritance
// ----------------------------------------------------------------------
@@ -118,6 +133,12 @@
{
}
+ /** {@inheritDoc} */
+ public String newInterfaceMethod( String aString )
+ {
+ return null;
+ }
+
// ----------------------------------------------------------------------
// Inner classes
// ----------------------------------------------------------------------
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java?rev=797039&r1=797038&r2=797039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java Thu Jul 23 12:30:42 2009
@@ -24,7 +24,6 @@
*
* @author <a href="mailto:vsiveton@apache.org">vsiveton@apache.org</a>
* @version $Id: $
- * @since 1.0
*/
public interface InterfaceWithJavadoc
{
@@ -70,4 +69,17 @@
* @return a {@link java.lang.String} object.
*/
public String method5( String aString );
+
+ // ----------------------------------------------------------------------
+ // New methods to be found by Clirr.
+ // ----------------------------------------------------------------------
+
+ /**
+ * New interface method to be found by Clirr.
+ *
+ * @param aString a {@link java.lang.String} object.
+ * @return a {@link java.lang.String} object.
+ * @since 1.1
+ */
+ public String newInterfaceMethod( String aString );
}