为什么maven-release-plugin上传构建信息?可以将其删除吗?

时间:2019-04-02 14:46:38

标签: maven maven-release-plugin

使用maven-release-plugin将工件释放到存储库时,将复制整个pom。这包括部分构建和报告。

我可以理解,部署信息是传播的,因为相同创建者对项目的依赖可能会部署在相同的服务器上,但是,对于非pom工件,我不了解拥有构建信息的意义。

是否可以创建剥离了此信息的发行版?

1 个答案:

答案 0 :(得分:0)

使用flatten-maven-plugin

https://www.mojohaus.org/flatten-maven-plugin/

我从上面的网站复制了相关的插件配置。

 <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>flatten-maven-plugin</artifactId>
    <!--<version>1.1.0</version>-->
    <configuration>
    </configuration>
    <executions>
      <!-- enable flattening -->
      <execution>
        <id>flatten</id>
        <phase>process-resources</phase>
        <goals>
          <goal>flatten</goal>
        </goals>
      </execution>
      <!-- ensure proper cleanup -->
      <execution>
        <id>flatten.clean</id>
        <phase>clean</phase>
        <goals>
          <goal>clean</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

我从所有不必要的信息中删除了POM。

相关问题