Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Mac OS X .app product packaging documentation removed

H Tobias,

On 2014-03-06 15:45:37 +0000, Oberlies, Tobias said:
So, if anyone of you has got this working and wants to share this knowledge, I’d propose to go for a blog first (which obviously could be linked from the documentation). If the approach described in the blog shows to be working for several users, we could consider adding it to the official documentation later.

I'm not sure I understand the issues raised. From a Mac product building point of view, the feature works as expected. I can imagine that the IUs are causing issues with p2 mirroring. But I'm not sure if that's Tycho's fault ot p2. :)

FWIW, building Mac apps is pretty easy with Tycho. Here is my pom.xml snippet:

<build>
 <plugins>
   <plugin>
     <groupId>org.eclipse.tycho</groupId>
     <artifactId>tycho-p2-director-plugin</artifactId>
     <executions>
       <execution>
         <!-- install products using p2 director -->
         <id>materialize-products</id>
         <goals>
           <goal>materialize-products</goal>
         </goals>
       </execution>
       <execution>
         <!-- create product archives -->
         <id>archive-products</id>
         <!-- move this to the pre-integration-test for signing to work -->
         <phase>pre-integration-test</phase>
         <goals>
           <goal>archive-products</goal>
         </goals>
       </execution>
     </executions>
     <configuration>
       <profile>GyrexServerProfile</profile>
       <products>
         <product>
           <id>org.eclipse.gyrex.products.server</id>
           <archiveFileName>gyrex-${buildId}</archiveFileName>
           <rootFolder>gyrex</rootFolder>
           <!-- note: this doesn't work properly with Mac signing -->
           <rootFolders>
             <macosx>Gyrex.app</macosx>
           </rootFolders>
         </product>
       </products>
       <formats>
         <linux>tar.gz</linux>
         <macosx>tar.gz</macosx>
       </formats>
     </configuration>
   </plugin>
 </plugins>
</build>

As you can see from the comments, the tricky part /was/ getting it to work with the Eclipse.org signing service. But with the help of Than and some updates to the signing service, I was able to get it working with the following profile:

<profile>
 <!-- participate in signing so that the executables are signed -->
 <id>eclipse-sign-executables-mac</id>
 <build>
   <plugins>
     <plugin>
       <!-- copy CodeResources for Mac signing -->
       <artifactId>maven-resources-plugin</artifactId>
       <version>2.6</version>
       <executions>
         <execution>
           <id>copy-macos-app-resources</id>
           <goals>
             <goal>copy-resources</goal>
           </goals>
           <phase>package</phase>
           <configuration>
<outputDirectory>${project.build.directory}/products/org.eclipse.gyrex.products.server/macosx/cocoa/x86_64/Gyrex.app/Contents</outputDirectory>
             <resources>
               <resource>
                 <directory>MacOS/Contents</directory>
               </resource>
             </resources>
           </configuration>
         </execution>
       </executions>
     </plugin>
     <plugin>
       <groupId>org.eclipse.cbi.maven.plugins</groupId>
       <artifactId>eclipse-macsigner-plugin</artifactId>
       <version>${cbi-plugins.version}</version>
       <executions>
         <execution>
           <goals>
             <goal>sign</goal>
           </goals>
           <phase>package</phase>
           <configuration>
             <signFiles>
<signFile>${project.build.directory}/products/org.eclipse.gyrex.products.server/macosx/cocoa/x86_64/Gyrex.app</signFile>
             </signFiles>
           </configuration>
         </execution>
       </executions>
     </plugin>
   </plugins>
 </build>
</profile>


HTH,
Gunnar


--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx




Back to the top