【问题标题】:Maven maven-exec-plugin execution before zip packaging压缩打包前的Maven maven-exec-plugin执行
【发布时间】:2012-10-25 18:13:10
【问题描述】:

我正在构建一个 Maven+Tycho Eclipse RCP 应用程序,我想在产品被压缩为 zip 之前以及在二进制文件被压缩以在存储库/二进制文件中分发之前在 OS X 上运行我的 codesign maven-exec-plugin .

所以我认为这一步应该介于编译和打包之间,但我很难通过反复试验。 它应该绑定到哪个生命周期构建阶段?

我的 maven-exec-plugin 目前看起来像这样(应用程序被代码签名但在 zip 已经创建之后):

                <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                  <execution>
            <id>exec</id>
            <phase>package</phase>
                    <goals>
                      <goal>exec</goal>
                    </goals>
                  </execution>
                </executions>
                <configuration>
                  <executable>codesign</executable>
                  <workingDirectory>/tmp</workingDirectory>
                  <arguments>
                    <argument>-s</argument>
                    <argument>"My Developer ID"</argument>
                    <argument>-vvv</argument>
                    <argument>${project.build.directory}/products/${product-id}/macosx/cocoa/x86/MyApp/MyApp.app"</argument>
                  </arguments>
                </configuration>
              </plugin>

【问题讨论】:

    标签: eclipse maven rcp tycho exec-maven-plugin


    【解决方案1】:

    在执行块中使用准备包生命周期阶段,而不是包生命周期阶段。

    【讨论】:

    • 我刚试过,但由于 MyApp.app 文件尚不存在而失败
    猜你喜欢
    • 2012-03-13
    • 2014-04-23
    • 2017-05-06
    • 2011-01-12
    • 1970-01-01
    • 1970-01-01
    • 2014-07-04
    • 2012-11-13
    • 1970-01-01
    相关资源
    最近更新 更多