renamedFile = FileUtils.createTempFile( "zip", ".tmp", zipFile.getParentFile() ); renamedFile.deleteOnExit();
public File getWorkingDirectory() { if ( temporayWorkDir == null ) { temporayWorkDir = FileUtils.createTempFile( "ldap-", "-server", workingDirectory ); temporayWorkDir.mkdirs(); } return temporayWorkDir; }
private File getTemporaryFile(File file) { File tmp=FileUtils.createTempFile(file.getName(), Constants.TMP, file.getParentFile()); tmp.deleteOnExit(); return tmp; } }
private File getTemporaryFile( File file ) { File tmp = FileUtils.createTempFile( file.getName(), Constants.TMP, file.getParentFile() ); tmp.deleteOnExit(); return tmp; } }
private void copyTemplateResource(String file, String output, boolean filter) throws MojoExecutionException { try { File target = FileUtils.resolveFile(packageDirectory, output); if( target.isFile() && target.canRead() ) { return; } URL source = getClass().getClassLoader().getResource("project-template/" + file); File tmp = FileUtils.createTempFile("tmp", "txt", new File(project.getBuild().getDirectory())); try { FileUtils.copyURLToFile(source, tmp); FileUtils.copyFile(tmp, target, encoding, filters(filter), true); } finally { tmp.delete(); } } catch (IOException e) { throw new MojoExecutionException("Could not extract template resource: "+file, e); } }
FileUtils.createTempFile( "clirr", ".txt", new File( project.getBuild().getDirectory() ) ); Properties properties = new Properties(); properties.put( "textOutputFile", clirrTextOutputFile.getAbsolutePath() ); File invokerLogFile = FileUtils.createTempFile( "clirr-maven-plugin", ".txt", invokerDir ); new File( project.getBuild().getDirectory(), "invoker-clirr-maven-plugin.txt" ); JavadocUtil.invokeMaven( getLog(), new File( localRepository.getBasedir() ), project.getFile(),
dest = FileUtils.createTempFile( baseRbSwc.getArtifactId(), requestedLocale, getOutputDirectory() ); unzip.extract( "locale/" + baseRbSwc.getClassifier(), dest );
File invokerLogFile = FileUtils.createTempFile( "maven-javadoc-plugin", ".txt", invokerDir ); try
protected File downloadSnapshotArtifact( String repository, Gav gav, File parentDir ) throws IOException { // @see http://issues.sonatype.org/browse/NEXUS-599 // r=<repoId> -- mandatory // g=<groupId> -- mandatory // a=<artifactId> -- mandatory // v=<version> -- mandatory // c=<classifier> -- optional // p=<packaging> -- optional, jar is taken as default // http://localhost:8087/nexus/service/local/artifact/maven/redirect?r=tasks-snapshot-repo&g=nexus&a=artifact& // v=1.0-SNAPSHOT String serviceURI = "service/local/artifact/maven/redirect?r=" + repository + "&g=" + gav.getGroupId() + "&a=" + gav.getArtifactId() + "&v=" + gav.getVersion(); Response response = RequestFacade.doGetRequest( serviceURI ); Status status = response.getStatus(); Assert.assertEquals( "Snapshot download should redirect to a new file\n " + response.getRequest().getResourceRef().toString() + " \n Error: " + status.getDescription(), 301, status.getCode() ); Reference redirectRef = response.getRedirectRef(); Assert.assertNotNull( "Snapshot download should redirect to a new file " + response.getRequest().getResourceRef().toString(), redirectRef ); serviceURI = redirectRef.toString(); File file = FileUtils.createTempFile( gav.getArtifactId(), '.' + gav.getExtension(), parentDir ); RequestFacade.downloadFile( new URL( serviceURI ), file.getAbsolutePath() ); return file; }
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer(); File messageFile = FileUtils.createTempFile("maven-scm-", ".commit", null); try { FileUtils.fileWrite(messageFile.getAbsolutePath(), message);
File messageFile = FileUtils.createTempFile("maven-scm-", ".commit", null);
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
throws ScmException File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
throws ScmException File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );
File messageFile = FileUtils.createTempFile( "maven-scm-", ".commit", null );