Kelvin Low Kelvin Low - 1 year ago 238
Android Question

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

I am trying to package sample-appium-test code from AWS Github.

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] ------------------------------------------------------------------------

[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] 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

Answer Source

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

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download