Unknown lifecycle phase maven

前端 未结 5 2140
小蘑菇
小蘑菇 2020-12-09 04:08

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:

相关标签:
5条回答
  • 2020-12-09 04:34

    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"
    
    0 讨论(0)
  • 2020-12-09 04:37

    This error has happened to me as well. I was running this command which hasn't spaces between the parameters of mvn install its values.

    With this command:

    > mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file 
    -Dfile=C:\Users\arcones\Desktop\ojdbc7.jar 
    -DgroupId=com.oracle 
    -DartifactId=ojdbc7 
    -Dversion=12.1.0.1 
    -Dpackaging=jar 
    -DlocalRepositoryPath=lib
    

    I got this error:

    [ERROR] Unknown lifecycle phase ".oracle". 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, genera te-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-class es, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, depl oy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

    The problem got resolved by adding double quotes to each value:

    > mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file 
    -Dfile="C:\Users\arcones\Desktop\ojdbc7.jar" 
    -DgroupId="com.oracle"
    -DartifactId="ojdbc7"
    -Dversion="12.1.0.1"
    -Dpackaging="jar" 
    -DlocalRepositoryPath="lib"
    

    [INFO] BUILD SUCCESS

    0 讨论(0)
  • 2020-12-09 04:37

    Accidentially typing:

    mvn packgage

    Instead of:

    mvn package

    Yeilds/Results In:

    [ERROR] Unknown lifecycle phase "packgage". [ ...etc...]

    Stack: GitBash+Windows10+Maven3.5.4

    0 讨论(0)
  • 2020-12-09 04:38

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

    0 讨论(0)
  • 2020-12-09 04:48

    I got the error also

    [ERROR] Unknown lifecycle phase "pacakge". 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>. 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]
    

    you may type wrong command change 'pacakge' to 'package'

    0 讨论(0)
提交回复
热议问题