【问题标题】:Maven Tycho: is there any way to delete "eclipsec.exe" during build?Maven Tycho:有没有办法在构建过程中删除“eclipsec.exe”?
【发布时间】:2012-12-01 19:58:39
【问题描述】:

在“/products//Win32/{x86 |x86_64}/../”下成功构建窗口环境“eclipsec.exe”后,有什么方法可以在构建过程中删除“eclipsec.exe” ?

【问题讨论】:

标签: maven-3 tycho


【解决方案1】:

目前只有一种解决方法

http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03071.html

它依赖于未指定的 p2 接触点执行顺序。

【讨论】:

    【解决方案2】:

    您可以设置 maven-clean-plugin 在“干净”生命周期中将其清除。但这只会在您运行“mvm clean”时执行:

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>/products//Win32/{x86 |x86_64}/../</directory>
              <includes>
                <include>eclipsec.exe</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    

    http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html

    另一种选择是使用 maven-antrun-plugin:

    <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.7</version>
    <executions>
      <execution>
        <phase>package</phase>
        <configuration>
          <target>
            <delete file="/products//Win32/{x86 |x86_64}/../eclipsec.exe"/>
          </target>
        </configuration>
        <goals>
          <goal>run</goal>
        </goals>
      </execution>
    </executions>
    

    这是附加到“包”阶段,将在项目编译后删除文件。 有关插件使用的更多信息: http://maven.apache.org/plugins/maven-antrun-plugin/usage.html

    【讨论】:

      【解决方案3】:

      为此,我已成功使用 p2.inf 建议文件。我添加了在安装产品时删除不需要的文件的说明。我还没有遇到过这种失败,但是P2没有很好的文档记录,所以如果p2.inf被应用到早期,文件可能仍然会出现......

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-06-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-12-13
        • 2018-02-12
        • 2012-02-07
        相关资源
        最近更新 更多