I am using jenkins with hudson cli through java. I want clean a particular directory before each build. Any idea ? I have provided the maven command clean package which clean target folder for each build. What i want is i want to clean some other directory before each build. How to do this ?
In jenkins i specified URL of maven project , Which ll download files to workspace when building. When i give clean package command, it clears target folder every time when building. There is another folder parallel to target folder. i want to clear that folder which is inside maven project.
In pom.xml add the profile tag like below
While executing commad just execute the maven command
mvn -Pci clean.Which uses the maven clean plugin to clear a particular directory, before each build starts.
We can package like
mvn -Pci clean package.After cleaning the directory , package phase is executed.