Skip to content

Commit

Permalink
Fix temp dir for project
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Aug 29, 2024
1 parent 642e4c8 commit 0354f8e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public Response extensionsList() {
);
}

private File initConfigWorker() {
private File initConfigWorker( String base ) {
String tempDir = System.getProperty("java.io.tmpdir");
File outputFolder = new File( tempDir, "init_"+ UUID.randomUUID().toString() );
File outputFolder = new File( tempDir, base+"_"+ System.currentTimeMillis() );
outputFolder.mkdir();
log.info( "tempDir : {}, outputFolder : {}", tempDir, outputFolder);
return outputFolder;
Expand All @@ -57,7 +57,7 @@ public Response init( ProjectInitInput input) {
long time = System.currentTimeMillis();
ProjectInitOutput output = new ProjectInitOutput();
try ( ByteArrayOutputStream buffer = new ByteArrayOutputStream() ) {
File projectDir = this.initConfigWorker();
File projectDir = this.initConfigWorker( input.getArtifactId() );
File realDir = new File( projectDir, input.getArtifactId() );
log.info( "project init folder : {}", realDir.getAbsolutePath() );
MojoInit mojoInit = new MojoInit() {
Expand Down

0 comments on commit 0354f8e

Please sign in to comment.