Index: src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java =================================================================== --- src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java (revision 634942) +++ src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java (working copy) @@ -254,8 +254,9 @@ private boolean debug; /** - * Sets the path of the Javadoc Tool executable to use. - * + * Sets the path of the Javadoc Tool executable to use. Since version 2.4, a mere directory specification is + * sufficient to have the plugin use "javadoc" or "javadoc.exe" respectively from this directory. + * * @since 2.3 * @parameter expression="${javadocExecutable}" */ @@ -2336,8 +2337,18 @@ { javadocExe = new File( javadocExecutable ); - if ( !javadocExe.exists() || !javadocExe.isFile() ) + if ( javadocExe.isDirectory() ) { + javadocExe = new File( javadocExe, javadocCommand ); + } + + if ( SystemUtils.IS_OS_WINDOWS && javadocExe.getName().indexOf( '.' ) < 0 ) + { + javadocExe = new File( javadocExe.getPath() + ".exe" ); + } + + if ( !javadocExe.isFile() ) + { throw new IOException( "The javadoc executable '" + javadocExe + "' doesn't exist or is not a file. " + "Verify the parameter." ); }