diff --git a/src/it/projects/javadoc-fix/verify.bsh b/src/it/projects/javadoc-fix/verify.bsh index d2147bbed..526d0346a 100644 --- a/src/it/projects/javadoc-fix/verify.bsh +++ b/src/it/projects/javadoc-fix/verify.bsh @@ -60,13 +60,13 @@ try content = FileUtils.fileRead( javaFile, "UTF-8" ); assertContains( content, " *
ClassWithNoJavadoc class.
" ); - assertContains( content, " * @version $Id: $" ); assertContains( content, " * @since 1.0" ); assertContains( content, " *main.
" ); assertContains( content, " * @param args an array of {@link java.lang.String} objects" ); // private sampleMethod assertNotContains( content, " *sampleMethod.
" ); assertNotContains( content, " * @param str a {@link java.lang.String} object" ); + assertNotContains( content, " * @version " ); javaFile = new File( basedir, "/src/main/java/fix/test/ClassWithJavadoc.java" ); content = FileUtils.fileRead( javaFile, "UTF-8" ); @@ -93,21 +93,21 @@ try content = FileUtils.fileRead( javaFile, "UTF-8" ); assertContains( content, " *InterfaceWithNoJavadoc interface.
" ); - assertContains( content, " * @version $Id: $" ); assertContains( content, " * @since 1.0" ); assertContains( content, " /** ConstantMY_STRING_CONSTANT=\"value\"
*/" );
assertContains( content, " * method.
" ); assertContains( content, " * @param aString a {@link java.lang.String} object" ); + assertNotContains( content, " * @version " ); javaFile = new File( basedir, "/src/main/java/fix/test/InterfaceWithJavadoc.java" ); content = FileUtils.fileRead( javaFile, "UTF-8" ); assertContains( content, " * Some Javadoc." ); - assertContains( content, " * @version $Id: $" ); assertContains( content, " * @since 1.0" ); assertContains( content, " /** comment */" ); assertContains( content, " * My method" ); assertContains( content, " * @param aString a {@link java.lang.String} object" ); + assertNotContains( content, " * @version " ); } catch( Throwable e ) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java index c560e1f28..d3fa10727 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java @@ -207,11 +207,6 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo { */ public static final String JAVA_FILES = "**\\/*.java"; - /** - * Default version value. - */ - public static final String DEFAULT_VERSION_VALUE = "\u0024Id: \u0024Id"; - // ---------------------------------------------------------------------- // Mojo components // ---------------------------------------------------------------------- @@ -251,13 +246,9 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo { /** * Default value for the Javadoc tag@version
.
- * $Id:$
, corresponding to a
- * SVN keyword.
- * Refer to your SCM to use an other SCM keyword.
*/
- @Parameter(property = "defaultVersion", defaultValue = DEFAULT_VERSION_VALUE)
- private String defaultVersion = "\u0024Id: \u0024"; // can't use default-value="\u0024Id: \u0024"
+ @Parameter(property = "defaultVersion")
+ private String defaultVersion;
/**
* The file encoding to use when reading the source files. If the property
@@ -286,7 +277,7 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo {
* ClassWithNoJavadoc class.
* * @author vsiveton@apache.org - * @version $Id: $ */ @SuppressWarnings("SameReturnValue") public class ClassWithNoJavadoc diff --git a/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java b/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java index 89bdf0653..55ce1be4a 100644 --- a/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java +++ b/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java @@ -23,7 +23,6 @@ * To add default interface tags. * * @author vsiveton@apache.org - * @version $Id: $ */ public interface InterfaceWithJavadoc { diff --git a/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java b/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java index 0ec11c0af..6f25c7053 100644 --- a/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java +++ b/src/test/resources/unit/fix-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java @@ -23,7 +23,6 @@ *InterfaceWithNoJavadoc interface.
* * @author vsiveton@apache.org - * @version $Id: $ */ public interface InterfaceWithNoJavadoc {