0

I have clean integration-test -DclassId=appas a maven goal in a Jenkins Maven Job.

How can I retrieve this in Java using System.getenv();? When I do this I am only seeing null.

Pramod Setlur
  • 745
  • 1
  • 14
  • 26

1 Answers1

1

For command line options you have to use System.getProperty() instead of System.getenv():

String id = System.getProperty("classId");

Find more details here.

Community
  • 1
  • 1
Vitalii Elenhaupt
  • 6,666
  • 3
  • 23
  • 39