thisisshantzz thisisshantzz - 4 months ago 23
Java Question

Maven javadoc.skip=true throws an error

I am trying to build a project of mine using the javadoc.skip parameter

mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Pbpfle

But I keep getting an error saying

Unknown life cycle phase ".javadoc.skip=true". You must specify a valid lifecycle phase or a goal in the format

I am using Java (JDK) 8 with Maven 3.3.3

Is it an issue with Java because it used to work when I used to work with JDK 7 (and the same version of Maven)? I am running the command in Windows PowerShell.


The problem is actually related to how you are launching the Maven command. In Windows Powershell, the dot . has a special meaning, so it gets interpreted, just like the dash -.

You will need to escape all those characters using a backtick `, like so:

mvn clean install `-Dmaven`.javadoc`.skip=true `-Dmaven`.test`.skip=true `-Pbpfle