2

I need to skip generating javadoc while making a release with -Dmaven.javadoc.skip=true but this does not make skipping javadocs for submodules. Is there a way to skip javadoc for all modules ? Note that I can't update the pom file (not my right). Is there a way to do it with the command line ?

codeGeass
  • 810
  • 11
  • 19

1 Answers1

1

It is not possible as you could see in the source code. The best thing that you can do is either ask the owner to introduce a maven profile for that and for you or you can do it in the dirty way: copy the pom.xml to somewhere, edit it and call the maven with

mvn -f [other pom file]

Update: Maybe I was wrong. Please check How can I disable the Maven Javadoc plugin from the command line?

m4gic
  • 1,339
  • 8
  • 16
  • As you can see as comment in the right answer : Not working for child modules. And I said that I'm already using -Dmaven.javadoc.skip=true – codeGeass May 31 '18 at 13:01
  • On the link there was a (n in theory) working answer: mvn release:perform -Darguments="-Dmaven.javadoc.skip=true" – m4gic May 31 '18 at 13:29
  • In this case, I would do it the quick and dirty way as I wrote. – m4gic Jun 07 '18 at 12:09