delete file if exist to prevent build failure for non clean build #2650 (#2651)

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2018-06-12 17:23:39 +10:00 committed by Jan Bartel
parent 83b2abebb7
commit 71dc6d9ceb
1 changed files with 1 additions and 0 deletions

View File

@ -197,6 +197,7 @@ public class MavenLocalRepoFileInitializerTest
is("https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.4.10.v20180503/jetty-http-9.4.10.v20180503-tests.jar"));
Path destination = Paths.get(System.getProperty( "java.io.tmpdir" ), "jetty-http-9.4.10.v20180503-tests.jar");
Files.deleteIfExists( destination );
repo.download( coords.toCentralURI(), destination);
assertThat( Files.exists(destination), is( true ));
assertThat( destination.toFile().length(), is(962621L));