1

I am using openjdk 17.6(temurin 17) and maven 3.9.3 to run my karate framework and I am getting following error while executing men command

Unknown lifecycle phase .env. You must specify valid lifecycle phase

Maven command Mvn clean test -Dkarate.env=“qa” -Dkarate.options=“—-tags@sampletest”

Not sure why mvn command is failing.please help

Adding additional detials

following changes have been made to pom file

<maven.compiler.version>3.10.1</maven.compiler.version>
<maven.surefire.plugin>3.1.0</maven.surefire.plugin>
<karate.version>1.4.1RC2</karate.version>
<aspectj.version>1.8.10</aspectj.version>

getting following issue Failed to execute goal org.apache.maven.plugin:3.10.1:testCompile Fatal error compiling: Invalid target release 17

satishsrip
  • 125
  • 3
  • 12

2 Answers2

2

Replace -Dkarate.en=“qa” to -Dkarate.env=“qa”

Shreyansh Jain
  • 498
  • 4
  • 7
0

Try:

-Dkarate.options="—t @sampletest"
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • I did tried as you suggested. But still I see the same issue. In intellij IDE terminal, when executed with command it says unknown lifecycle phase".env" made changes to pom file with latest version as described in additional detials. still I am facing the same issue. I tried running the same command in command prompt and it shows fatal error compiling invalid target release : 17 – satishsrip Jul 14 '23 at 15:02
  • @satishsrip sorry I give up. follow this process: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue – Peter Thomas Jul 14 '23 at 15:18