In my project .pom
I set up the maven-clean-plugin
like so:
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/bower_components</directory>
</fileset>
<fileset>
<directory>node_modules</directory>
</fileset>
<fileset>
<directory>node</directory>
</fileset>
</filesets>
</configuration>
</plugin>
The plugin purpose is to remove directories which are created by frontend-maven-plugin
. Anyway the last one works OK.
Problem
Now the issue is that for no reason, one of the above folders is never removed. And it is always the one "in the middle". I added 3 filesets
and always the 2nd one is not removed, see logs:
[INFO] Deleting /src/main/webapp/bower_components (includes = [], excludes = [])
[INFO] Deleting /node_modules (includes = [.bindings], excludes = [])
[INFO] Deleting /node (includes = [], excludes = [])
If I change folders' order:
[INFO] Deleting /src/main/webapp/bower_components (includes = [], excludes = [])
[INFO] Deleting /node (includes = [.bindings], excludes = [])
[INFO] Deleting /node_modules (includes = [], excludes = [])
And also the 2nd option always contains this part: includes = [.bindings]
which I believe results in the folder not being deleted.
Why is that happening, and how to fix it?
EDIT, debug log
mvn -X clean
result, I think this is where it breaks:
After parsing the pom.xml
it reads the configuration with this parameter. However, I did not put it there.