Repository navigation
can't clean project #961
Description
Activity
This is only annoying when eclipse is open, and one executes
mvn clean, it cannot run, because eclipse does not let go androidannotations.log. @DayS do you have any suggestion for this?That's weird. I don't know why Eclipse would like to prevent you from removing this file (Especially as it's a generated file in the generated folder)...
However, I do know that Windows sometimes keep reference in some files and lead to this kind of issues. Are you working on an Unix based computer or a Windows ?Windows... I know, a Unix-based platform would make things easier, but it is a pain in the ass to switch a full built dev environment to Unix.
However, i can test this thing on Ubuntu, if you think this is interesting.I might be the problem... Or not.
Did you manage to replicate this issue every time ? If so, could you try again on Ubuntu ? Just to check if this comes from the OS or notYes, i can reproduce every time on Windows. It is strange that all .java files can be deleted but not androidannotations.log. :S On Ubuntu eclipse does not produces this issue.
I also discovered if i just open my workspace and not modify any files (so processing is not starting), i can executemvn clean.Maybe we have an unclosed stream somewhere... We should take a closer look on this
Yeah, it does not related to maven. Simply the .log file cannot be deleted on Windows, if the Annotation Processor was invoked.
That's weird because all logger appenders are closed at the end of annotation processing.
Yeah, i investigated the code yesterday. Maybe an eclipse indexer or something else holds on the file? Is there any way to see what handler/process/etc uses a file on Windows?
This is a very annoying issue. If i want to call
maven clean, i have to close Eclipse. Any progress here?I can't reproduce this issue on my own environment so it's hard to say..
Happen to me sometime and now it happened.
I need to reopen Eclipse.I can reproduce it everytime on Eclipse 3.8 (without maven or m2clipse).
A workaround I found is to set the aa log to
%TEMP%\aa.log, using the logFile configuration.Thanks @PerfectCarl, nice workaround. BTW i think you meant the
logFileproperty.The problem with this method that it is polluting my maven build log with the
FileNotFoundExceptionstacktrace. @DayS can we add a log level which does not opens the appenders at all?@WonderCsabo indeed. Corrected.
I played around with Process Explorer, and it seems indeed the eclipse process is holding on the file.
@DayS what about my suggestion in my previous comment?
We CAN disable logging but the idea of the logging system was to make things easier when people have issues. So I'm not really sure if it's a good idea to allow users to do disable it. We better should fix this issue
I do not think we can fix this in our side, i think everything is properly closed.
I just had this issue with Android Studio 1.0RC1 on Windows 8.1 x64 with Java 1.8.0_25 x64. Java.exe was locked onto the file in project\build\generated\source\apt\androidannotations.log even after I exited Android Studio. The process was stuck and not even reporting an open file handle with Process Explorer. Anyways, this causes the build to fail. I've had it happen occasionally in the past, but I always thought it was an Eclipse problem.
can confirm that issue for Android Studio 1.0RC1. Also Windows 8.1 but Java7_71 x64.
Thanks guys. Can you confirm that Ubuntu/Mac does not produce this?
Also what happens if you just ran gradle from the command line on Windows?
command line works fine, at least if the java process die not lock the androidannotations.log. same issue as for maven.
Fixed by #1110.
when i clean project,eclipse always alert errors:
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'FrogCare'.
Problems encountered while deleting resources.
Could not delete 'E:\Graduation-Design\FrogCare\bin\androidannotations.log'.
Problems encountered while deleting files.
Could not delete: E:\Graduation-Design\FrogCare\bin\androidannotations.log.
Problems encountered while deleting resources.
Could not delete 'E:\Graduation-Design\FrogCare\bin\androidannotations.log'.
Problems encountered while deleting files.
Could not delete: E:\Graduation-Design\FrogCare\bin\androidannotations.log.