2011-12-21 11 views
4

tycho-p2-director-pluginは最終的なZIPファイル名にバージョン番号を追加する方法がないようです。私は最善の方法だ名前を変更tycho-p2-director-pluginによって作成されたZIPファイル

myproduct-1.6.0-win32.zip 
myproduct-1.6.0-linux32.zip 
myproduct-1.6.0-macos.zip 

ものを持っているしたいと思いながら、それは

myproduct-win32.win32.x86.zip 
myproduct-macosx.cocoa.x86.zip 
myproduct-linux.gtk.x86.zip 

を生成しますか?何とかmaven-antrun-pluginと名前を変更しますか? Mavenリソースプラグインの名前を変更しますか?何か?以下は

答えて

1

答えはティコの特定ではありません

 <plugin> 
      <groupId>org.eclipse.tycho</groupId> 
      <artifactId>tycho-p2-director-plugin</artifactId> 
      <version>${tycho-version}</version> 
      <executions> 
       <execution> 
        <id>materialize-products</id> 
        <goals> 
         <goal>materialize-products</goal> 
        </goals> 
        <configuration> 
         <installFeatures>false</installFeatures> 
         <profile>Installer</profile> 
        </configuration> 
       </execution> 
       <execution> 
        <id>archive-products</id> 
        <goals> 
         <goal>archive-products</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <!-- ANT actions --> 
     <plugin> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.6</version> 
      <executions> 
       <!-- Rename the ZIP files --> 
       <execution> 
        <id>update-zip-files</id> 
        <phase>install</phase> 
        <configuration> 
         <target> 
          <!-- Rename the products --> 
          <move verbose="true" todir="${project.build.directory}/products"> 
           <mapper type="regexp" from="^(Installer-)(.*)$$" 
            to="\1N-${maven.build.timestamp}-\2" /> 

           <fileset dir="${project.build.directory}/products"> 
            <include name="*.zip" /> 
           </fileset> 
          </move> 
         </target> 
        </configuration> 
        <goals> 
         <goal>run</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
+1

これは、既知の保留中の拡張要求です。https://bugs.eclipse.org/bugs/show_bug.cgi?id=357503 – jsievers

+0

ありがとう、皆さん!これは助けになりました。私はこのステップを "パッケージ化"ステップに拘束し、現在は正常に動作しています。 – Alex

-1

、私は私のプロジェクトで何をすべきかです:

<build> 
    <finalName>myproduct</finalName> 
</build> 
+0

これは間違っています。 Tychoは、「製品」ビルド用のカスタムパッケージングタイプを提供しています。これらのアーティファクトは、独自の設定が必要なTychoプラグインによって作成されます。 – Gunnar

8

https://bugs.eclipse.org/bugs/show_bug.cgi?id=357503でのバグレポートから、それは彼らがする能力を追加したようですTycho 0.14.0からzipファイルのファイル名を直接変更してください。私は自分のtycho-p2-director-pluginブロックに次のものを使用しています。

<plugins> 
    <plugin> 
    <groupId>org.eclipse.tycho</groupId> 
    <artifactId>tycho-p2-director-plugin</artifactId> 
    <version>0.16.0</version> 
    <executions> 
     <execution> 
     <id>materialize-products</id> 
     <goals> 
      <goal>materialize-products</goal> 
     </goals> 
     </execution> 
     <execution> 
     <id>archive-products</id> 
     <goals> 
      <goal>archive-products</goal> 
     </goals> 
     </execution> 
    </executions> 
    <configuration> 
     <products> 
     <product> 
      <id>MY_PRODUCT_ID</id> 
      <archiveFileName>MyProduct-${project.version}</archiveFileName> 
     </product> 
     </products> 
    </configuration> 
    </plugin> 

キービットは、あなたが<archiveFileName>タグを使用してzipファイルの接頭辞を指定することができます最後に<configuration>セクション、です。ファイルの接尾辞はまだ-<os>.<ws>.<arch>.<archiveExtension>です。

+0

これはTycho 0.16でうまく機能しています! – Gunnar

+0

まだTycho 1.0.0を使用しています。 – kingargyle