Maven程序集插件在编译阶段不会覆盖文件

| 我已经定义了maven程序集插件,并设置了pom在\“ compile \”阶段执行plugin(assembly.xml)。 assembly.xml-它使用\“ dependencySet \”获取jar /文件,并且我使用\“ fileSet \”用本地设置替换了一些文件。 使用Maven程序集插件2.2 beta 2,它将替换文件。 对于版本2.2或2.2.1的程序集插件, a)它说“已添加,正在跳过”,并且不会覆盖。 b)如果我在pom中将阶段修改为\“ generate-resources \”而不是\“ compile \”,它会显示“已添加,跳过”消息,并且无论如何会替换/覆盖文件。 想知道版本之间发生了什么变化,以及为什么相位变化会使它起作用。如果有人可以解释在“编译”阶段确切发生了什么(不会覆盖),这也将很有帮助。 我的问题有解决方法吗? 在此先感谢您的帮助! 包含的代码段:
`<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-assembly-plugin</artifactId>
  <version>2.2</version>
  <executions>
    <execution>
      <id>create-install-image-layout</id>
      <phase>compile</phase>
      <goals>
        <goal>directory-single</goal>
      </goals>
      <configuration>
        <descriptors>
           <descriptor>src/main/assembly/assembly.xml</descriptor>                                              
        </descriptors>                                     
        <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
      </configuration>
    </execution>
  </executions>
 </plugin>`
    
已邀请:
目标目录(单个)标记为已弃用。此外,maven-assembly-plugin的最新版本是2.2.2而不是2.2。此外,要出于任何目的创建存档,正确的阶段将是打包阶段,而不是将完成源代码编译的编译器阶段。     
您执行什么目标?你先执行干净吗?由于代码已经编译,因此可能会跳过编译阶段。     

要回复问题请先登录注册