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

问题描述 投票:1回答:1

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

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

是否有可能创建一个剥离此信息的版本?

maven maven-release-plugin
1个回答
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。

© www.soinside.com 2019 - 2024. All rights reserved.