我有以下 pom.xml ,在我从阶段generated
放置一些*.java
文件后,我想在其中删除目录:generate-sources
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
<build>
<plugins>
<!-- This plugin generates java files in generated directory -->
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
...
</executions>
</plugin>
<!-- To clean the generated directory in service package -->
<plugin>
<groupId>maven</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>/src/main/java/com/acme/Network/service/generated</directory>
<includes>
<include>**/*.java</include>
</includes>
<excludes>
<exclude>**/*.log</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
maven clean
我想从 m2e 中删除生成的整个包。但它只删除目标目录,生成的目录保持不变。
我究竟做错了什么?