@Test public void getDestinationFileNullArgumentTest() throws MojoExecutionException, IOException { expectedException.expect(IllegalArgumentException.class); mojo.getDestinationFile(null); }
protected File getDestinationFile(String targetFolder) throws MojoExecutionException { checkArgument(targetFolder != null, "The target folder must not be null"); Path destinationPath = Paths.get(targetFolder, getFileName()); try { Files.deleteIfExists(destinationPath); } catch (IOException e) { throw new MojoExecutionException(String.format("Exception deleting the file [%s]", destinationPath), e); } return destinationPath.toFile(); }
PackageMojo extends AbstractMuleMojo { protected File getDestinationFile(String targetFolder) throws MojoExecutionException { checkArgument(targetFolder != null, "The target folder must not be null"); Path destinationPath = Paths.get(targetFolder, getFileName()); try { Files.deleteIfExists(destinationPath); } catch (IOException e) { throw new MojoExecutionException(String.format("Exception deleting the file [%s]", destinationPath), e); } return destinationPath.toFile(); } }
PackageMojo extends AbstractMuleMojo { protected File getDestinationFile(String targetFolder) throws MojoExecutionException { checkArgument(targetFolder != null, "The target folder must not be null"); Path destinationPath = Paths.get(targetFolder, getFileName()); try { Files.deleteIfExists(destinationPath); } catch (IOException e) { throw new MojoExecutionException(String.format("Exception deleting the file [%s]", destinationPath), e); } return destinationPath.toFile(); }  }
PackageMojo extends AbstractMuleMojo { protected File getDestinationFile(String targetFolder) throws MojoExecutionException { checkArgument(targetFolder != null, "The target folder must not be null"); Path destinationPath = Paths.get(targetFolder, getFileName()); try { Files.deleteIfExists(destinationPath); } catch (IOException e) { throw new MojoExecutionException(String.format("Exception deleting the file [%s]", destinationPath), e); } return destinationPath.toFile(); }  @Override void doExecute(); @Override String getPreviousRunPlaceholder(); }
PackageMojo extends AbstractMuleMojo { protected File getDestinationFile(String targetFolder) throws MojoExecutionException { checkArgument(targetFolder != null, "The target folder must not be null"); Path destinationPath = Paths.get(targetFolder, getFileName()); try { Files.deleteIfExists(destinationPath); } catch (IOException e) { throw new MojoExecutionException(String.format("Exception deleting the file [%s]", destinationPath), e); } return destinationPath.toFile(); }  @Override void doExecute(); @Override String getPreviousRunPlaceholder();  }