Kelvin Low
Kelvin Low

Reputation: 400

Unknown lifecycle phase "–-DskipTests=true" for Amazon Device Farm while Maven package

I am trying to package sample-appium-test code from AWS Github. https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app

According to the document of Amazon, I have to package it with this command:

mvn clean package –-DskipTests=true

After that, I'm got this error

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.214 s

[INFO] Finished at: 2016-08-30T09:02:33+08:00

[INFO] Final Memory: 7M/155M

[INFO] ------------------------------------------------------------------------

[ERROR] Unknown lifecycle phase "–-DskipTests=true". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

What should I do to fix this problem? Thanks you

Upvotes: 2

Views: 7604

Answers (2)

Tushar Koley
Tushar Koley

Reputation: 164

I had a similar issue. It works when we use install instead of pkg

mvn clean install -DskipTests

here is the link for your reference. http://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/skipping-test.html

Upvotes: 0

Rohan Deshpande
Rohan Deshpande

Reputation: 3595

Try mvn clean package –DskipTests=true, with a single '-'.

I believe it's a single '-' on OS X and '--' on Linux.

Upvotes: 4

Related Questions