Reputation: 1097
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
<plugin-prefix>:<goal>
or<plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
.
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.
Upvotes: 6
Views: 3637
Reputation: 1097
It seems to work when I replace the
-Dmaven.javadoc.skip=true
with -D maven.javadoc.skip=true
Basically adding a whitespace between the -D and maven. But I thought it wasn't required.
EDIT : This issue was coming up in the Windows powershell only. Adding the whitespaces in the powershell seems to make the command work. In the traditional command prompt, no whitespaces are required and the command works they way I was trying it initially.
Upvotes: 3
Reputation: 137064
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
Upvotes: 4