eclipsetycho

How to customize the filename of .zip, when build an Eclipse RCP application with Tycho?


I have an Eclipse RCP application with a product configuration file com.aa.bb.product. The uid of this .product is com.aa.bb.product. When I build it with Tycho, the result is com.aa.bb.product-win32.win32.x86_64.zip.

This filename is too long, what should I configure to specify the filename like "MyProduct.zip"? Or "MyProduct-win32.win32.x86_64.zip", it's acceptable to keep the -win32.win32.x86_64 suffix.


Solution

  • In the pom of the "product" eclipse project:

         <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-director-plugin</artifactId>
            <version>${tycho-version}</version>
    
            <configuration>
               <formats>
                  <win32>zip</win32>
                  <linux>tar.gz</linux>
                  <macosx>tar.gz</macosx>
               </formats>
    
               <products>
                  <product>
                     <id>xxxxxx</id>
                     <archiveFileName>xxxxxx</archiveFileName>  <---- the name of the archive
                     <rootFolder>xxxxx</rootFolder>
                  </product>
               </products>
    
            </configuration>
    {...}
    

    As an example, you can check thepom.xml of the"product" project for JMSToolBox:
    https://github.com/jmstoolbox/jmstoolbox/blob/dev/org.titou10.jtb.product/pom.xml

    (I'm the author of JMSToolBox)