xml - How to change maven outputdir value during run time? -
my maven pom.xml file looks below,
<configuration> <!-- output directory testng xslt report --> <outputdir>\target\testng-xslt-resultsreports</outputdir> <sorttestcaselinks>true</sorttestcaselinks> <testdetailsfilter>fail,skip,pass,conf,by_class</testdetailsfilter> <showruntimetotals>true</showruntimetotals> </configuration>
my question is, during every run create folder , need update path "outputdir" ? can done?
use maven property (with default value) , pass command line.
in pom.xml:
<properties> <customoutput>\target\testng-xslt-resultsreports</customoutput> </properties> ... <configuration> <outputdir>${customoutput}</outputdir> ....
now simpley run maven command parameter override default value of customoutput:
mvn install -dcustomoutput=\target\newoutputdir
i hope helps
Comments
Post a Comment