Jenkins and Maven Integration: Environment Variables are NULL -


i trying inject environment variable in maven build process can use them in test scripts various purposes.

below maven dependency:

<dependency>     <groupid>org.seleniumhq.selenium</groupid>     <artifactid>selenium-firefox-driver</artifactid>     <version>2.46.0</version> </dependency> </dependencies>  <build> <plugins> <plugin>    <groupid>org.apache.maven.plugins</groupid>    <artifactid>maven-surefire-plugin</artifactid>    <configuration>        <environmentvariables>            <jenkins.package>${env.v_package}</jenkins.package>            <jenkins.release>${env.v_release}</jenkins.release>        </environmentvariables>    </configuration> </plugin> </plugins> </build> 

with in test scripts trying read these build parameters getting null values, can please me how fixed?

in test scripts

string vansah_package=system.getproperty("jenkins.package"); string vansah_release=system.getproperty("jenkins.release"); system.out.println(" v_package :" + v_package); system.out.println(" v_release :" + v_release); 

my jenkins string parameters

v_package v_release 

afaik should using http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#systempropertyvariables instead


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -