Cannot delete target directory after removing Maven nature of project
eclipse, java, maven
Solution
To disable & remove Maven target directory
- Right click on the project -select `Maven->Disable Dependency Management.`
- Right click on project - select `Build Path-> Configure Build Path -> Source Tab`. Untick "Allow output folder for source folders"
- Now type "Your Project Name"/bin eg. TestProject/bin, in the Default Output Folder field to point to default.
- Now click ok and delete the target directory.
Problem
I decided not to use maven in my project. So, I right-clicked it in Eclipse and then "Remove maven nature". Everything seems to be ok, but I cannot remove the target directory. If I delete it from within Eclipse it's just created again, if I delete it from Explorer the result is the same, as soon as I clean my project from Eclipse it's just created again. Where am I wrong? Thanks in advance.