File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/main/java/gr/gousiosg/javacg/stat/support Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ private File getJarFile(String jarPath) {
132132
133133 // Return a (path, file) pair
134134 private Pair <String , File > pathAndJarFile (String jarPath ) {
135+ jarPath = System .getProperty ("user.dir" ) + jarPath ;
135136 validateJarSuffix (jarPath );
136137 File file = getJarFile (jarPath );
137138 return new Pair <>(jarPath , file );
Original file line number Diff line number Diff line change @@ -147,10 +147,14 @@ private void moveJars() throws IOException{
147147 }
148148
149149 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 ;
150152 String jacocoPath = System .getProperty ("user.dir" ) + "/" + this .name + "/target/site/jacoco/jacoco.xml" ;
151- String jacocoTargetPath = System . getProperty ( "user.dir" ) + "/artifacts/results/" + this . name + java . time . LocalDateTime . now () + "/" + property + ".xml" ;
153+ String jacocoTargetPath = directoryPath + "/" + property + ".xml" ;
152154 String statisticsPath = System .getProperty ("user.dir" ) + "/" + this .name + "/target/site/jacoco/index.html" ;
153- String statisticsTargetPath = System .getProperty ("user.dir" ) + "/artifacts/results/" + this .name + java .time .LocalDateTime .now () + "/" + property + ".html" ;
155+ String statisticsTargetPath = directoryPath + "/" + property + ".html" ;
156+ File directory = new File (directoryPath );
157+ directory .mkdir ();
154158 Path jacoco = Files .move (
155159 Paths .get (jacocoPath ),
156160 Paths .get (jacocoTargetPath ),
You can’t perform that action at this time.
0 commit comments