I have tried reinstalling Java and Maven, as well as using Maven 2.1.0, JDK 1.6.0_11, and even JDK 1.5.0_11. I have compared my setup to a coworker who has practically the same environment but no problems. It used to work about a month ago, and no, I don't know what's changed on my system since then. I first encountered it with JDK 1.6.0_11. This happens on every project I've tried in our repository, and my coworkers have no problems with the same projects. So I'm pretty sure it's just my environment and not the projects themselves.

2 Answers
2

Uninstalling every JDK and JRE on my system, and then reinstalling Java to a path with no spaces

Removing every environment variable I wasn't using, and cleaning up my PATH

Relocating Maven and my local repo to directories with no spaces

Rebooting (you never know, it's Windows)

Today I tried to run a batch file which didn't execute properly, and I quickly realized that when I double clicked on it, it was executing the file but not in the directory where it lived. And then it hit me.

A few weeks ago I got fed up with our IT guys forcing our cmd window to open at H: and so I Googled and used this page to "fix it". It seemed to work; I didn't have any problems for a few weeks and I had already forgotten that my cmd windows all used to open to some H: drive. But every single cmd window opened to a directory I specified--whether I ran "cmd" or clicked a batch file or if Maven opened a new cmd window...

I guess when Maven runs it shells out to execute the javadoc command. And so the javadoc part was working, but it couldn't find the options file it writes out because the working directory was wrong.

So, now I'm back on H: until I can figure that out. And then I'll screw something else up. But hopefully, if nothing else, this will help someone else...

+1 Tx, had exactly the same issue because of the same cause
–
Stijn GeukensApr 19 '12 at 12:01

1

Thank you! I had modified my HKEY_CURRENT_USER\Software\Microsoft\Command Processor\Autorun key so I didn't have to go to my work directory every time I opened a command prompt, and that was causing this problem in my case.
–
SirsAug 20 '13 at 8:33

I believe the problem is that the javadoc command is being run without any parameters. I ran into this in one of my multi-module projects where it was trying to javadoc a non-java module. (The javadoc was being requested by the parent, pom.)

Does the module in question have javadocs to be made? We finally moved to maven 2.1.0 and I haven't seen the problem reoccur.

It happens both on multi-module and single module projects. On the multi-module project, it correctly skips over the parent project that contains no Java files and fails on the first module that contains Java files. Everyone else on the team is using 2.0.8, because when we set this up there was a problem with the release plugin in Maven 2.0.9. And I have tried installing 2.1.0 but I get the same error anyway.
–
dave4351Jun 23 '09 at 18:28