Maven: невозможно удалить отфильтрованные ресурсы
В моем pom.xml
Я фильтрую некоторые ресурсы и устанавливаю выходной каталог ("asciidoc-Filter") в папку внутри моего /target
папка: /target/asciidoc-filtered
,
После некоторых этапов сборки я хочу удалить эту папку с фильтром "asciidoc" maven-clean-plugin
, Я в основном могу обработать плагин и удалить некоторые другие вещи, но я почему-то не могу удалить папку "asciidoc-Filter".
Вот выдержка из POM:
...
<build>
<resources>
<resource>
<directory>src/main/asciidoc</directory>
<targetPath>${project.build.directory}/asciidoc-filtered</targetPath>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.6</version>
<executions>
<execution>
<id>generate-html</id>
<phase>prepare-package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/asciidoc-filtered</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
<backend>html5</backend>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/main/resources/assembly.xml</descriptor>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>*.jar</exclude>
<exclude>*.zip</exclude>
<exclude>*.html</exclude>
</excludes>
</fileset>
</filesets>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
Так что без maven-clean-plugin
мой /target
выглядит примерно так:
И с maven-clean-plugin
мой /target
выглядит примерно так:
То, чего я хочу достичь, выглядит примерно так:
Есть какие-нибудь идеи, почему это не работает? Или какие-то решения, как заставить это работать?
Заранее большое спасибо;-)