File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/gr/gousiosg/javacg/stat/support Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1616import java .util .List ;
1717import java .util .Map ;
1818import java .util .Optional ;
19+ import java .time .LocalDateTime ;
20+ import java .time .format .DateTimeFormatter ;
1921
2022public class RepoTool {
2123
@@ -145,10 +147,14 @@ private void moveJars() throws IOException{
145147 }
146148
147149 private void moveJacoco (String property , long timeElapsed ) throws IOException {
150+ String timeStamp = String .valueOf (java .time .LocalDateTime .now ());
151+ String directoryPath = System .getProperty ("user.dir" ) + "/artifacts/results/" + this .name + timeStamp ;
148152 String jacocoPath = System .getProperty ("user.dir" ) + "/" + this .name + "/target/site/jacoco/jacoco.xml" ;
149- String jacocoTargetPath = System . getProperty ( "user.dir" ) + "/artifacts/results/" + this . name + "/" + property + ".xml" ;
153+ String jacocoTargetPath = directoryPath + "/" + property + ".xml" ;
150154 String statisticsPath = System .getProperty ("user.dir" ) + "/" + this .name + "/target/site/jacoco/index.html" ;
151- String statisticsTargetPath = System .getProperty ("user.dir" ) + "/artifacts/results/" + this .name + "/" + property + ".html" ;
155+ String statisticsTargetPath = directoryPath + "/" + property + ".html" ;
156+ File directory = new File (directoryPath );
157+ directory .mkdir ();
152158 Path jacoco = Files .move (
153159 Paths .get (jacocoPath ),
154160 Paths .get (jacocoTargetPath ),
You can’t perform that action at this time.
0 commit comments