Creating temporary library JAR directory fails if it already exists
See original GitHub issueHi,
I’m using the plugin with the
<putLibraryJarsInTempDir>true</putLibraryJarsInTempDir>
option because of a large classpath. When running mvn proguard:proguard and when not having run mvn clean beforehand the temporary library directory (‘tempLibraryjars’) may already exist. If that’s the case then the following call to mkdir() will return false and the proguard plugin will throw an exception:
Can you please ignore the return value of mkdir() and instead check for the existence of the directory after the call to mkdir(), followed by cleaning it?
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to create a temporary directory/folder in Java?
If you are using JDK 7 use the new Files.createTempDirectory class to create the temporary directory. Path tempDirWithPrefix = Files.
Read more >How to create directory in Java
In Java, we can use the NIO `Files.createDirectories` to create a directory including all nonexistent parent directories.
Read more >FIO03-J. Remove temporary files before termination
There is no surefire method that can guarantee the removal of orphaned files in the case of abnormal termination, even in the presence...
Read more >Files (Java Platform SE 8 )
Creates a new and empty file, failing if the file already exists. ... Creates a new directory in the default temporary-file directory, using...
Read more >What is a "failed to create a symbolic link: file exists" error?
Fool-proof way to create symbolic links. First go into the directory where you want to create the link cd ~/Documents/saga. Then create the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/FibreFoX/proguard-maven-plugin/commit/9df7725b1141475bc21e32291d9ced8e42b3c76a
Will make another commit for deleting the contents first 😃 there should be some PR tomorrow
Thanks, but I can’t do it from my work place and I don’t have maven/git set up at home. The change is trivial and looks like this:
Replace lines 580-582 in
ProGuardMojo
:by: