Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown lifecycle phase maven

Tags:

maven-3

I am new to maven and camel.

I tried executing the examples in camel book. And I am getting this error when I run the following command.

Command:

mvn test -Dtest= SpringTransformMethodTest

Error:

[ERROR] Unknown lifecycle phase "SpringTransformMethodTest". You must specify a valid lifecycle phase or a goal in the f
ormat <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle ph
ases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, proce
ss-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, ver
ify, 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.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles.`
like image 927
Ravi Avatar asked Sep 09 '13 11:09

Ravi


People also ask

What are the life cycles in Maven?

There are three built-in build lifecycles: default, clean and site. The default lifecycle handles your project deployment, the clean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project's web site.

Which phases is present in site Maven life cycle?

There are three standard lifecycles in Maven: clean, default (sometimes called build) and site.


2 Answers

you have likely a space between -Dtest= and SpringTransformMethodTest. That's then interpreted as 2 items instead of one.

like image 142
mkleint Avatar answered Sep 17 '22 13:09

mkleint


If the parameter name is not a single 'word' you might also need to enclose it in quotation marks like this:

mvn gatling:test -D"gatling.simulationClass"="my.package.PostmanSimulation"
like image 31
Tarmo Avatar answered Sep 17 '22 13:09

Tarmo