Sergey Kolos avatar Sergey Kolos committed ac91a2e

Added deploy phase to remote server.

Comments (0)

Files changed (4)

com.tea.parent/pom.xml

             <format>xml</format>
             <failOnViolation>false</failOnViolation>
           </configuration>
-      </plugin> 
+      </plugin>
+      <plugin>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.7</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      
     </plugins>
   </build>
   

com.tea.repo/pom.xml

 		    <executions>
 	        <execution>
 	          <id>deploy-artifacts</id>
-            <phase>install</phase>
+            <phase>deploy</phase>
             <goals>
                <goal>exec</goal>
             </goals>
 	        </execution>
           <execution>
             <id>deploy-metadata</id>
-            <phase>install</phase>
+            <phase>deploy</phase>
             <goals>
                <goal>exec</goal>
             </goals>
           </execution>
           <execution>
             <id>deploy-to-remote</id>
-            <phase>install</phase>
+            <phase>deploy</phase>
             <goals>
                <goal>exec</goal>
             </goals>

com.tea.wiki/build.html

-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><p>In this post I am going to describe how I set up an environment for agile development of Eclipse RCP&#8217;s. By &#8220;agile&#8221; development I mean the process where I can concentrate on writing code, implementing features, and fixing bugs without worrying about broken builds, delivery of changes to customers, archiving previous releases, etc.<br/>Since the setup is changing, the post will evolve with it. It is not completely clean yet, but it contains all information to get started.<br/>Warning: it is very long<br/>The goal was to collect information from many sources in one place.</p><p>Check the project&#8217;s <a href="https://bitbucket.org/skolos/tea">repository</a></p><h1 id="Tea">Tea</h1><p>Tycho exampe application.</p><ol class="toc" style="list-style: none;"><li><a href="#Tea">Tea</a><ol class="toc" style="list-style: none;"><li><a href="#Eclipse">Eclipse</a></li><li><a href="#ParentProject">Parent Project</a></li><li><a href="#BasicApplication">Basic Application</a></li><li><a href="#TargetPlatform">Target Platform</a></li><li><a href="#PluginwithUIcontributions">Plug-in with UI contributions</a></li><li><a href="#JUinttestofthepluginusingJUint3">JUint test of the plug-in (using JUint3)</a></li><li><a href="#MavenTychoBuild">Maven Tycho Build</a></li><li><a href="#ApplicationFeature">Application Feature</a></li><li><a href="#Repository">Repository</a></li><li><a href="#Pomstobuildproduct">Poms to build product</a></li><li><a href="#RunUIUnitTestInsideProductinsteadofWorkbench">Run UI Unit Test Inside Product instead of Workbench</a></li><li><a href="#UIFunctionalTestswithWindowTester">UI Functional Tests with WindowTester</a><ol class="toc" style="list-style: none;"><li><a href="#InstallWindowTester">Install WindowTester</a></li><li><a href="#AdjustTarget">Adjust Target</a></li><li><a href="#Createatest">Create a test</a></li><li><a href="#RunningFunctionalTestsusingTycho">Running Functional Tests using Tycho</a></li></ol></li><li><a href="#HeadlessUnitTests">Headless Unit Tests</a><ol class="toc" style="list-style: none;"><li><a href="#.coreproject">.core project</a></li><li><a href="#.core.testsfragment">.core.tests fragment</a></li><li><a href="#RunningtestsinEclipse">Running tests in Eclipse</a></li><li><a href="#AddingthepluginandteststotheTychobuild">Adding the plugin and tests to the Tycho build</a></li></ol></li><li><a href="#ApplicationUpdating">Application Updating</a></li><li><a href="#UpdateSitePublishing">Update Site Publishing</a><ol class="toc" style="list-style: none;"><li><a href="#Refreshinglocalupdatesitemirror">Refreshing local update site mirror</a></li><li><a href="#Refreshingremoteupdatesite">Refreshing remote update site</a></li></ol></li><li><a href="#PluginSigning">Plugin Signing</a></li><li><a href="#SourceControlMercurial">Source Control (Mercurial)</a></li><li><a href="#Jenkins">Jenkins</a></li><li><a href="#FindBugsandPMD">FindBugs and PMD</a></li><li><a href="#BitBucketandCIbuildserver">BitBucket and CI build server</a></li><li><a href="#CodeCoverage">Code Coverage</a></li><li><a href="#Scala">Scala</a></li><li><a href="#EclipsePlugins">Eclipse Plugins</a></li></ol></li></ol><p>References:</p><ol><li><a href="http://wiki.eclipse.org/Minerva#Documentation">Minerva</a></li><li><a href="http://wiki.eclipse.org/Tycho/Reference_Card">Tycho Reference Card</a></li><li><a href="https://github.com/mattiasholmqvist/tychoexamples">Tycho Examples</a></li><li><a href="http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application">RCP application demo</a></li><li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=348303">Ignore Test errors</a></li><li><a href="http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/">Tycho tutorial</a></li><li><a href="http://www.michel-kraemer.de/build-scala-projects-with-eclipse-buckminster">Buckminster &#8211; alternative</a></li><li><a href="http://eclipsesource.com/blogs/2011/07/13/building-osgi-applications-that-use-aspectj-with-tycho-maven-3/">AspectJ</a></li><li><a href="http://code.google.com/p/daisy-pipeline/wiki/BuildSystem">daisy-pipeline</a></li><li><a href="https://max-server.myftp.org/trac/mp3m/browser/MP3M/trunk/MP3M">RCP &#8211; mp3</a></li></ol><h2 id="Eclipse">Eclipse</h2><p>Install Eclipse classic (currently 3.7).</p><h2 id="ParentProject">Parent Project</h2><p>Create parent project <code>com.tea.parent</code> to hold parent <code>pom.xml</code>: <br/><img border="0" src="images/parent-proj.png"/></p><h2 id="BasicApplication">Basic Application</h2><p>Create Plug-in project for RCP application <code>com.tea.app</code><br/><img border="0" src="images/app-proj-1.png"/><br/><img border="0" src="images/app-proj-2.png"/><br/>Select Hello RCP template:<br/><img border="0" src="images/app-proj-3.png"/></p><h2 id="TargetPlatform">Target Platform</h2><p>Create new project to hold target platform definition:<br/><img border="0" src="images/new-project.png"/><br/><img border="0" src="images/target-proj.png"/><br/>Create new target:<br/><img border="0" src="images/new-target.png"/><br/><img border="0" src="images/new-target-1.png"/><br/>Add locations to the target:<br/><img border="0" src="images/target-definition-1.png"/><br/><img border="0" src="images/target-definition-2.png"/><br/><img border="0" src="images/target-definition-3.png"/><br/><img border="0" src="images/target-definition-4.png"/><br/>Wait for content of the repository to be fetched. Next uncheck Group by Category:<br/><img border="0" src="images/target-definition-5.png"/><br/>Select &#8220;Eclipse SDK&#8221; and Finish:<br/><img border="0" src="images/target-definition-6.png"/><br/>Save <code>indigo.target</code> file and click on &#8220;Set as Target Platform&#8221; link on the top right corner:<br/><img border="0" src="images/target-definition-7.png"/><br/>Test application by clicking Launch an Eclipse application on Overview tab of <code>plugin.xml</code> of <code>com.tea.app project</code>:<br/><img border="0" src="images/app-test-run.png"/><br/><img border="0" src="images/app-1.png"/></p><h2 id="PluginwithUIcontributions">Plug-in with UI contributions</h2><p>Create new Plugin project:<br/><img border="0" src="images/new-plugin.png"/><br/><img border="0" src="images/com-tea-ui-1.png"/><br/><img border="0" src="images/com-tea-ui-2.png"/><br/><img border="0" src="images/com-tea-ui-3.png"/><br/>Export actions package:<br/><img border="0" src="images/com-tea-ui-4.png"/><br/><img border="0" src="images/com-tea-ui-5.png"/><br/><img border="0" src="images/com-tea-ui-6.png"/></p><h2 id="JUinttestofthepluginusingJUint3">JUint test of the plug-in (using JUint3)</h2><p>Note: If you want to use JUnit4, the instruction bellow require minor modifications.</p><p>Create new Plugin project:<br/><img border="0" src="images/new-plugin.png"/><br/><img border="0" src="images/com-tea-ui-tests-1.png"/><br/>Don&#8217;t generate activator:<br/><img border="0" src="images/com-tea-ui-tests-2.png"/><br/>Add plugins:<br/><img border="0" src="images/com-tea-ui-tests-3.png"/><br/><img border="0" src="images/com-tea-ui-tests-4.png"/><br/>Create Test Case:<br/><img border="0" src="images/com-tea-ui-tests-5.png"/><br/><img border="0" src="images/com-tea-ui-tests-6.png"/><br/>Add code to the testing class:</p><pre>package com.tea.ui.tests;
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><p>In this post I am going to describe how I set up an environment for agile development of Eclipse RCP&#8217;s. By &#8220;agile&#8221; development I mean the process where I can concentrate on writing code, implementing features, and fixing bugs without worrying about broken builds, delivery of changes to customers, archiving previous releases, etc.<br/>Since the setup is changing, the post will evolve with it. It is not completely clean yet, but it contains all information to get started.<br/>Warning: it is very long<br/>The goal was to collect information from many sources in one place.</p><p>Check the project&#8217;s <a href="https://bitbucket.org/skolos/tea">repository</a></p><h1 id="Tea">Tea</h1><p>Tycho exampe application.</p><ol class="toc" style="list-style: none;"><li><a href="#Tea">Tea</a><ol class="toc" style="list-style: none;"><li><a href="#Eclipse">Eclipse</a></li><li><a href="#ParentProject">Parent Project</a></li><li><a href="#BasicApplication">Basic Application</a></li><li><a href="#TargetPlatform">Target Platform</a></li><li><a href="#PluginwithUIcontributions">Plug-in with UI contributions</a></li><li><a href="#JUinttestofthepluginusingJUint3">JUint test of the plug-in (using JUint3)</a></li><li><a href="#MavenTychoBuild">Maven Tycho Build</a></li><li><a href="#ApplicationFeature">Application Feature</a></li><li><a href="#Repository">Repository</a></li><li><a href="#Pomstobuildproduct">Poms to build product</a></li><li><a href="#RunUIUnitTestInsideProductinsteadofWorkbench">Run UI Unit Test Inside Product instead of Workbench</a></li><li><a href="#UIFunctionalTestswithWindowTester">UI Functional Tests with WindowTester</a><ol class="toc" style="list-style: none;"><li><a href="#InstallWindowTester">Install WindowTester</a></li><li><a href="#AdjustTarget">Adjust Target</a></li><li><a href="#Createatest">Create a test</a></li><li><a href="#RunningFunctionalTestsusingTycho">Running Functional Tests using Tycho</a></li></ol></li><li><a href="#HeadlessUnitTests">Headless Unit Tests</a><ol class="toc" style="list-style: none;"><li><a href="#.coreproject">.core project</a></li><li><a href="#.core.testsfragment">.core.tests fragment</a></li><li><a href="#RunningtestsinEclipse">Running tests in Eclipse</a></li><li><a href="#AddingthepluginandteststotheTychobuild">Adding the plugin and tests to the Tycho build</a></li></ol></li><li><a href="#ApplicationUpdating">Application Updating</a></li><li><a href="#Branding">Branding</a><ol class="toc" style="list-style: none;"><li><a href="#Customicons">Custom icons</a></li><li><a href="#ChangeLaunchername">Change Launcher name</a></li></ol></li><li><a href="#UpdateSitePublishing">Update Site Publishing</a><ol class="toc" style="list-style: none;"><li><a href="#Refreshinglocalupdatesitemirror">Refreshing local update site mirror</a></li><li><a href="#Refreshingremoteupdatesite">Refreshing remote update site</a></li></ol></li><li><a href="#PluginSigning">Plugin Signing</a></li><li><a href="#SourceControlMercurial">Source Control (Mercurial)</a></li><li><a href="#Jenkins">Jenkins</a></li><li><a href="#FindBugsandPMD">FindBugs and PMD</a></li><li><a href="#BitBucketandCIbuildserver">BitBucket and CI build server</a></li><li><a href="#CodeCoverage">Code Coverage</a></li><li><a href="#Scala">Scala</a></li><li><a href="#EclipsePlugins">Eclipse Plugins</a></li></ol></li></ol><p>References:</p><ol><li><a href="http://wiki.eclipse.org/Minerva#Documentation">Minerva</a></li><li><a href="http://wiki.eclipse.org/Tycho/Reference_Card">Tycho Reference Card</a></li><li><a href="https://github.com/mattiasholmqvist/tychoexamples">Tycho Examples</a></li><li><a href="http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application">RCP application demo</a></li><li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=348303">Ignore Test errors</a></li><li><a href="http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/">Tycho tutorial</a></li><li><a href="http://www.michel-kraemer.de/build-scala-projects-with-eclipse-buckminster">Buckminster &#8211; alternative</a></li><li><a href="http://eclipsesource.com/blogs/2011/07/13/building-osgi-applications-that-use-aspectj-with-tycho-maven-3/">AspectJ</a></li><li><a href="http://code.google.com/p/daisy-pipeline/wiki/BuildSystem">daisy-pipeline</a></li><li><a href="https://max-server.myftp.org/trac/mp3m/browser/MP3M/trunk/MP3M">RCP &#8211; mp3</a></li></ol><h2 id="Eclipse">Eclipse</h2><p>Install Eclipse classic (currently 3.7).</p><h2 id="ParentProject">Parent Project</h2><p>Create parent project <code>com.tea.parent</code> to hold parent <code>pom.xml</code>: <br/><img border="0" src="images/parent-proj.png"/></p><h2 id="BasicApplication">Basic Application</h2><p>Create Plug-in project for RCP application <code>com.tea.app</code><br/><img border="0" src="images/app-proj-1.png"/><br/><img border="0" src="images/app-proj-2.png"/><br/>Select Hello RCP template:<br/><img border="0" src="images/app-proj-3.png"/></p><h2 id="TargetPlatform">Target Platform</h2><p>Create new project to hold target platform definition:<br/><img border="0" src="images/new-project.png"/><br/><img border="0" src="images/target-proj.png"/><br/>Create new target:<br/><img border="0" src="images/new-target.png"/><br/><img border="0" src="images/new-target-1.png"/><br/>Add locations to the target:<br/><img border="0" src="images/target-definition-1.png"/><br/><img border="0" src="images/target-definition-2.png"/><br/><img border="0" src="images/target-definition-3.png"/><br/><img border="0" src="images/target-definition-4.png"/><br/>Wait for content of the repository to be fetched. Next uncheck Group by Category:<br/><img border="0" src="images/target-definition-5.png"/><br/>Select &#8220;Eclipse SDK&#8221; and Finish:<br/><img border="0" src="images/target-definition-6.png"/><br/>Save <code>indigo.target</code> file and click on &#8220;Set as Target Platform&#8221; link on the top right corner:<br/><img border="0" src="images/target-definition-7.png"/><br/>Test application by clicking Launch an Eclipse application on Overview tab of <code>plugin.xml</code> of <code>com.tea.app project</code>:<br/><img border="0" src="images/app-test-run.png"/><br/><img border="0" src="images/app-1.png"/></p><h2 id="PluginwithUIcontributions">Plug-in with UI contributions</h2><p>Create new Plugin project:<br/><img border="0" src="images/new-plugin.png"/><br/><img border="0" src="images/com-tea-ui-1.png"/><br/><img border="0" src="images/com-tea-ui-2.png"/><br/><img border="0" src="images/com-tea-ui-3.png"/><br/>Export actions package:<br/><img border="0" src="images/com-tea-ui-4.png"/><br/><img border="0" src="images/com-tea-ui-5.png"/><br/><img border="0" src="images/com-tea-ui-6.png"/></p><h2 id="JUinttestofthepluginusingJUint3">JUint test of the plug-in (using JUint3)</h2><p>Note: If you want to use JUnit4, the instruction bellow require minor modifications.</p><p>Create new Plugin project:<br/><img border="0" src="images/new-plugin.png"/><br/><img border="0" src="images/com-tea-ui-tests-1.png"/><br/>Don&#8217;t generate activator:<br/><img border="0" src="images/com-tea-ui-tests-2.png"/><br/>Add plugins:<br/><img border="0" src="images/com-tea-ui-tests-3.png"/><br/><img border="0" src="images/com-tea-ui-tests-4.png"/><br/>Create Test Case:<br/><img border="0" src="images/com-tea-ui-tests-5.png"/><br/><img border="0" src="images/com-tea-ui-tests-6.png"/><br/>Add code to the testing class:</p><pre>package com.tea.ui.tests;
 
 import junit.framework.TestCase;
 import org.eclipse.ui.IWorkbench;
   &lt;/build&gt;
 
 &lt;/project&gt;
-</pre><p></p><ul><li>Run <code>mvn clean install</code> in <code>com.tea.parent</code> folder to test the build and automatic testing.</li></ul><h2 id="HeadlessUnitTests">Headless Unit Tests</h2><p>TODO</p><h3 id=".coreproject">.core project</h3><h3 id=".core.testsfragment">.core.tests fragment</h3><h3 id="RunningtestsinEclipse">Running tests in Eclipse</h3><h3 id="AddingthepluginandteststotheTychobuild">Adding the plugin and tests to the Tycho build</h3><h2 id="ApplicationUpdating">Application Updating</h2><ul><li>References: <a href="http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application">p2</a></li></ul><p>, <a href="http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application">tycho</a></p><ul><li><code>Add org.eclipse.equinox.p2.user.ui</code> feature to <code>tea.product</code> Dependencies:</li></ul><p><img border="0" src="images/updating-1.png"/></p><ul><li>Create new feature project:</li></ul><p><img border="0" src="images/new-feature.png"/></p><ul><li>Name it <code>com.tea.ui.feature</code>:</li></ul><p><img border="0" src="images/updating-2.png"/></p><ul><li>Select <code>com.tea.ui</code> plug-in to initialize feature from:</li></ul><p><img border="0" src="images/updating-3.png"/></p><ul><li>Create <code>pom.xml</code> in <code>com.tea.ui.feature</code> with the following content:</li></ul><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+</pre><p></p><ul><li>Run <code>mvn clean install</code> in <code>com.tea.parent</code> folder to test the build and automatic testing.</li></ul><h2 id="HeadlessUnitTests">Headless Unit Tests</h2><p>TODO</p><h3 id=".coreproject">.core project</h3><h3 id=".core.testsfragment">.core.tests fragment</h3><h3 id="RunningtestsinEclipse">Running tests in Eclipse</h3><h3 id="AddingthepluginandteststotheTychobuild">Adding the plugin and tests to the Tycho build</h3><h2 id="ApplicationUpdating">Application Updating</h2><ul><li>References: <a href="http://wiki.eclipse.org/Equinox/p2/Adding_Self-Update_to_an_RCP_Application">p2</a> , <a href="http://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application">tycho</a></li><li><code>org.eclipse.equinox.p2.user.ui</code> feature to <code>tea.product</code> dependencies (you can also use <code>org.eclipse.equinox.p2.rcp.feature</code> for smaller footprint: <a href="http://mcaffer.com/2011/03/p2-in-rcp-applications/">see</a> ):</li></ul><p><img border="0" src="images/updating-1.png"/></p><ul><li>Create new feature project:</li></ul><p><img border="0" src="images/new-feature.png"/></p><ul><li>Name it <code>com.tea.ui.feature</code>:</li></ul><p><img border="0" src="images/updating-2.png"/></p><ul><li>Select <code>com.tea.ui</code> plug-in to initialize feature from:</li></ul><p><img border="0" src="images/updating-3.png"/></p><ul><li>Create <code>pom.xml</code> in <code>com.tea.ui.feature</code> with the following content:</li></ul><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;project
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
   xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
 }
 </pre><p></p><ul><li><code>ApplicationWorkbenchWindowAdvisor</code> should define a status line and progress area so that the p2 automatic update status and progress reporting will be shown. The following should be added to <code>preWindowOpen()</code>:</li></ul><pre>    configurer.setShowStatusLine(true);
     configurer.setShowProgressIndicator(true);
-</pre><p></p><ul><li>Run build from <code>com.tea.parent&gt; mvn clean install</code></li><li>Build should finish succesfully</li><li>Go to folder: <code>com.tea.repo/target/products</code> and unzip a product corresponding to your platform. Run <code>eclipse.exe</code> located in the extracted folder. This opens Hello RCP application:</li></ul><p><img border="0" src="images/app-2.png"/></p><ul><li>Click on Window &gt; Preferences menu of Hello RCP and check that Instal/Update preferences pages are available.</li><li>Next click on Help &gt; Install new Software ... and add <code>com.tea.repo/target/repository</code> to &#8220;Work with&#8221;. Then select &#8220;Tea UI Additions&#8221; and click &#8220;Next&#8221; button:</li></ul><p><img border="0" src="images/updating-4.png"/></p><ul><li>Then click again &#8220;Next&#8221;:</li></ul><p><img border="0" src="images/updating-5.png"/></p><ul><li>Accept license and click &#8220;Finish&#8221;:</li></ul><p><img border="0" src="images/updating-6.png"/></p><ul><li>Next you can see security warning about unsigned content (We&#8217;ll deal with signing in the Plugin Signing section). Click &#8220;OK&#8221; to proceed:</li></ul><p><img border="0" src="images/updating-7.png"/></p><ul><li>Finally finish by clicking &#8220;Apply Changes Now&#8221;:</li></ul><p><img border="0" src="images/updating-8.png"/></p><ul><li>As a result &#8220;Sample Menu&#8221; is added to the application:</li></ul><p><img border="0" src="images/updating-9.png"/></p><h2 id="UpdateSitePublishing">Update Site Publishing</h2><p>The goal of this part is to deploy created plug-ins to a remote update site, so that P2 enabled RCP could update itself. We also want to keep all previous plug-ins on update site, so that if necessary clients could do rollback. The goal is accomplished in two steps. First we put plug-ins into local update site mirror. Then we copy changes to remote update site.</p><h3 id="Refreshinglocalupdatesitemirror">Refreshing local update site mirror</h3><ul><li>Append the following plugin to build-&gt;plugins section of <code>com.tea.repo/pom.xml</code> It is assumed that eclipse executable is located in <code>c:/apps/eclipse37</code> folder and that the local repository mirror is located in <code>c:/temp/repo1</code> folder.</li></ul><pre>      &lt;plugin&gt;
+</pre><p></p><ul><li>Run build from <code>com.tea.parent&gt; mvn clean install</code></li><li>Build should finish succesfully</li><li>Go to folder: <code>com.tea.repo/target/products</code> and unzip a product corresponding to your platform. Run <code>eclipse.exe</code> located in the extracted folder. This opens Hello RCP application:</li></ul><p><img border="0" src="images/app-2.png"/></p><ul><li>Click on Window &gt; Preferences menu of Hello RCP and check that Instal/Update preferences pages are available.</li><li>Next click on Help &gt; Install new Software ... and add <code>com.tea.repo/target/repository</code> to &#8220;Work with&#8221;. Then select &#8220;Tea UI Additions&#8221; and click &#8220;Next&#8221; button:</li></ul><p><img border="0" src="images/updating-4.png"/></p><ul><li>Then click again &#8220;Next&#8221;:</li></ul><p><img border="0" src="images/updating-5.png"/></p><ul><li>Accept license and click &#8220;Finish&#8221;:</li></ul><p><img border="0" src="images/updating-6.png"/></p><ul><li>Next you can see security warning about unsigned content (We&#8217;ll deal with signing in the Plugin Signing section). Click &#8220;OK&#8221; to proceed:</li></ul><p><img border="0" src="images/updating-7.png"/></p><ul><li>Finally finish by clicking &#8220;Apply Changes Now&#8221;:</li></ul><p><img border="0" src="images/updating-8.png"/></p><ul><li>As a result &#8220;Sample Menu&#8221; is added to the application:</li></ul><p><img border="0" src="images/updating-9.png"/></p><h2 id="Branding">Branding</h2><h3 id="Customicons">Custom icons</h3><ul><li>Move <code>icons</code> folder from <code>com.tea.app</code> to <code>com.tea.repo</code></li><li>Open <code>tea.product</code> from <code>com.tea.repo</code> and go to <em>Launching</em> tab. Set icons for program launcher as follows:</li></ul><p><img border="0" src="images/branding-1.png"/><br/><img border="0" src="images/branding-2.png"/><br/><img border="0" src="images/branding-3.png"/></p><ul><li>Go to <em>Branding</em> tab and set icons for window and about dialog and text for about dialog:</li></ul><p><img border="0" src="images/branding-4.png"/></p><ul><li>Open <code>pom.xml</code> in <code>com.tea.reapo</code> and add the following plugin (after first plugin, which is <code>tycho-p2-director-plugin</code> :</li></ul><pre>      &lt;plugin&gt;
+        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
+        &lt;version&gt;2.5&lt;/version&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;id&gt;copy-resources&lt;/id&gt;
+            &lt;phase&gt;generate-resources&lt;/phase&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;copy-resources&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;outputDirectory&gt;${project.build.directory}/products/com.tea.product/icons&lt;/outputDirectory&gt;
+              &lt;resources&gt;
+                &lt;resource&gt;
+                  &lt;directory&gt;icons&lt;/directory&gt;
+                &lt;/resource&gt;
+              &lt;/resources&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+</pre><p></p><ul><li>Commit changed files, run maven build and check that launchers have icons that you selected.</li></ul><h3 id="ChangeLaunchername">Change Launcher name</h3><p>Note that it looks like there is a bug in p2 publisher, so that changing launcher name can break the build (for example, read comments of the follobing <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=349877)">bug</a>. In particular it breaks build of MacOSX on my Windows computer. At this moment I don&#8217;t have workaround. So to proceed, first remove generation of MacOSX product from <code>com.tea.parent</code> <code>pom.xml</code> by commenting out MacOSX environment:</p><pre>       &lt;!-- &lt;environment&gt;
+              &lt;os&gt;macosx&lt;/os&gt;
+              &lt;ws&gt;cocoa&lt;/ws&gt;
+              &lt;arch&gt;x86_64&lt;/arch&gt;
+            &lt;/environment&gt; --&gt;            
+</pre><p>Then change name of the launcher on <em>Launching</em> tab of <code>tea.product</code>:<br/><img border="0" src="images/branding-5.png"/></p><h2 id="UpdateSitePublishing">Update Site Publishing</h2><p>The goal of this part is to deploy created plug-ins to a remote update site, so that P2 enabled RCP could update itself. We also want to keep all previous plug-ins on update site, so that if necessary clients could do rollback. The goal is accomplished in two steps. First we put plug-ins into local update site mirror. Then we copy changes to remote update site.</p><h3 id="Refreshinglocalupdatesitemirror">Refreshing local update site mirror</h3><ul><li>Append the following plugin to build-&gt;plugins section of <code>com.tea.repo/pom.xml</code> It is assumed that eclipse executable is located in <code>c:/apps/eclipse37</code> folder and that the local repository mirror is located in <code>c:/temp/repo1</code> folder.</li></ul><pre>      &lt;plugin&gt;
         &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
         &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
         &lt;version&gt;1.1&lt;/version&gt;
             &lt;failOnViolation&gt;false&lt;/failOnViolation&gt;
           &lt;/configuration&gt;
       &lt;/plugin&gt; 
-</pre><p></p><ul><li>Now commit the changes to the parent <code>pom.xml</code> and check that the FindBugs and PMD has produced the reports:</li></ul><p><img border="0" src="images/findbugs-3.png"/></p><ul><li>References: <a href="http://softdevbuilttolast.wordpress.com/2010/03/23/findbugs-making-your-code-easier-to-use-in-a-robust-way-with-nullability-annotations/">FindBugs Annotations</a></li></ul><h2 id="BitBucketandCIbuildserver">BitBucket and CI build server</h2><p>Things are now in good shape locally. The next step is to move source code to BitBucket and to set up dedicated build server.</p><ul><li>Push code to bitbucket, by creating corresponding repository on bitbucket, checking it out locally to a temporary folder and then copying <code>hgrc</code> file from the <code>temporary folder/.hg</code> to the <code>workspace/.hg</code>. After that we can use TortoiseHG to push all code changes to the BitBucket repository.</li><li><a href="http://maven.apache.org/download.html#Installation">Install maven 3</a> on your server</li><li>Install Jenkins on the server.</li><li>Create location for update site mirror</li><li>Adjust com.tea.repo/pom.xml for the new locations</li><li>Create tea project on the server&#8217;s Jenkins</li><li>Test</li></ul><h2 id="CodeCoverage">Code Coverage</h2><p>TODO:<br/><a href="https://docs.sonatype.org/display/TYCHO/How+to+integrate+EMMA+%28code+coverage%29+with+Tycho">Reference</a></p><h2 id="Scala">Scala</h2><p>TODO</p><h2 id="EclipsePlugins">Eclipse Plugins</h2><p>Here is a list of essencial plugins:</p><ul><li><code>Builds</code> view installed by Mylyn (show Jenkins builds in Eclipse)</li><li>FindBugs plugin</li><li>EclEmma &#8211; code coverage</li><li><a href="https://bitbucket.org/shuji.w6e/bitbucket-mylyn-connector/src">BitBucket connector for Mylyn</a></li></ul></body></html>
+</pre><p></p><ul><li>Now commit the changes to the parent <code>pom.xml</code> and check that the FindBugs and PMD has produced the reports:</li></ul><p><img border="0" src="images/findbugs-3.png"/></p><ul><li>References: <a href="http://softdevbuilttolast.wordpress.com/2010/03/23/findbugs-making-your-code-easier-to-use-in-a-robust-way-with-nullability-annotations/">FindBugs Annotations</a></li></ul><h2 id="BitBucketandCIbuildserver">BitBucket and CI build server</h2><p>Things are now in good shape locally. The next step is to move source code to BitBucket and to set up dedicated build server.</p><ul><li>Push code to bitbucket, by creating corresponding repository on bitbucket, checking it out locally to a temporary folder and then copying <code>hgrc</code> file from the <code>temporary folder/.hg</code> to the <code>workspace/.hg</code>. After that we can use TortoiseHG to push all code changes to the BitBucket repository.</li><li><a href="http://maven.apache.org/download.html#Installation">Install maven 3</a> on your server</li><li>Install Jenkins on the server.</li><li>Create location for update site mirror</li><li>Adjust com.tea.repo/pom.xml for the new locations and make deployment in deploy phase:</li></ul><pre>      &lt;plugin&gt;
+        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+        &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
+        &lt;version&gt;1.1&lt;/version&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;id&gt;deploy-artifacts&lt;/id&gt;
+            &lt;phase&gt;deploy&lt;/phase&gt;
+            &lt;goals&gt;
+               &lt;goal&gt;exec&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;executable&gt;c:/apps/eclipse37/eclipsec.exe&lt;/executable&gt;
+              &lt;arguments&gt;
+                &lt;argument&gt;-nosplash&lt;/argument&gt;
+                &lt;argument&gt;-application&lt;/argument&gt;
+                &lt;argument&gt;org.eclipse.equinox.p2.artifact.repository.mirrorApplication&lt;/argument&gt;
+                &lt;argument&gt;-source&lt;/argument&gt;
+                &lt;argument&gt;file:${basedir}/target/repository&lt;/argument&gt;
+                &lt;argument&gt;-destination&lt;/argument&gt;
+                &lt;argument&gt;d:/projects/tea-repo&lt;/argument&gt;
+              &lt;/arguments&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+          &lt;execution&gt;
+            &lt;id&gt;deploy-metadata&lt;/id&gt;
+            &lt;phase&gt;deploy&lt;/phase&gt;
+            &lt;goals&gt;
+               &lt;goal&gt;exec&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;executable&gt;c:/apps/eclipse37/eclipsec.exe&lt;/executable&gt;
+              &lt;arguments&gt;
+                &lt;argument&gt;-nosplash&lt;/argument&gt;
+                &lt;argument&gt;-application&lt;/argument&gt;
+                &lt;argument&gt;org.eclipse.equinox.p2.metadata.repository.mirrorApplication&lt;/argument&gt;
+                &lt;argument&gt;-source&lt;/argument&gt;
+                &lt;argument&gt;file:${basedir}/target/repository&lt;/argument&gt;
+                &lt;argument&gt;-destination&lt;/argument&gt;
+                &lt;argument&gt;d:/projects/tea-repo&lt;/argument&gt;
+              &lt;/arguments&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+          &lt;execution&gt;
+            &lt;id&gt;deploy-to-remote&lt;/id&gt;
+            &lt;phase&gt;deploy&lt;/phase&gt;
+            &lt;goals&gt;
+               &lt;goal&gt;exec&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;executable&gt;c:/apps/delta-copy/rsync.exe&lt;/executable&gt;
+              &lt;workingDirectory&gt;c:/apps/delta-copy/&lt;/workingDirectory&gt;
+              &lt;arguments&gt;
+                &lt;argument&gt;-e&lt;/argument&gt;
+                &lt;argument&gt;ssh&lt;/argument&gt;
+                &lt;argument&gt;-av&lt;/argument&gt;
+                &lt;argument&gt;-p&lt;/argument&gt;
+                &lt;argument&gt;--chmod=ug=rwX,o=rX&lt;/argument&gt;
+                &lt;argument&gt;/cygdrive/d/projects/tea-repo/&lt;/argument&gt;
+                &lt;argument&gt;skolos@sergeykolos.com:sergeykolos.com/tea/update/&lt;/argument&gt;
+              &lt;/arguments&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+</pre><p></p><ul><li>Also need to adjust behavior of default maven&#8217;s deploy plugin, so that it is not run. Add the following plugin to <code>com.tea.parent/pom.xml</code>:</li></ul><pre>       &lt;plugin&gt;
+        &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
+        &lt;version&gt;2.7&lt;/version&gt;
+        &lt;configuration&gt;
+          &lt;skip&gt;true&lt;/skip&gt;
+        &lt;/configuration&gt;
+      &lt;/plugin&gt;
+</pre><p></p><ul><li>Create tea project on the server&#8217;s Jenkins and set goals to <code>clean deploy</code> instead of <code>clean install</code></li><li>Test</li></ul><h2 id="CodeCoverage">Code Coverage</h2><p>TODO:<br/><a href="https://docs.sonatype.org/display/TYCHO/How+to+integrate+EMMA+%28code+coverage%29+with+Tycho">Reference</a></p><h2 id="Scala">Scala</h2><p>TODO</p><h2 id="EclipsePlugins">Eclipse Plugins</h2><p>Here is a list of essencial plugins:</p><ul><li><code>Builds</code> view installed by Mylyn (show Jenkins builds in Eclipse)</li><li>FindBugs plugin</li><li>EclEmma &#8211; code coverage</li><li><a href="https://bitbucket.org/shuji.w6e/bitbucket-mylyn-connector/src">BitBucket connector for Mylyn</a></li></ul></body></html>

com.tea.wiki/build.textile

 * "Install maven 3":http://maven.apache.org/download.html#Installation on your server
 * Install Jenkins on the server.
 * Create location for update site mirror
-* Adjust com.tea.repo/pom.xml for the new locations
-* Create tea project on the server's Jenkins
+* Adjust com.tea.repo/pom.xml for the new locations and make deployment in deploy phase:
+
+bc.. 
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.1</version>
+        <executions>
+          <execution>
+            <id>deploy-artifacts</id>
+            <phase>deploy</phase>
+            <goals>
+               <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>c:/apps/eclipse37/eclipsec.exe</executable>
+              <arguments>
+                <argument>-nosplash</argument>
+                <argument>-application</argument>
+                <argument>org.eclipse.equinox.p2.artifact.repository.mirrorApplication</argument>
+                <argument>-source</argument>
+                <argument>file:${basedir}/target/repository</argument>
+                <argument>-destination</argument>
+                <argument>d:/projects/tea-repo</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>deploy-metadata</id>
+            <phase>deploy</phase>
+            <goals>
+               <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>c:/apps/eclipse37/eclipsec.exe</executable>
+              <arguments>
+                <argument>-nosplash</argument>
+                <argument>-application</argument>
+                <argument>org.eclipse.equinox.p2.metadata.repository.mirrorApplication</argument>
+                <argument>-source</argument>
+                <argument>file:${basedir}/target/repository</argument>
+                <argument>-destination</argument>
+                <argument>d:/projects/tea-repo</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>deploy-to-remote</id>
+            <phase>deploy</phase>
+            <goals>
+               <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>c:/apps/delta-copy/rsync.exe</executable>
+              <workingDirectory>c:/apps/delta-copy/</workingDirectory>
+              <arguments>
+                <argument>-e</argument>
+                <argument>ssh</argument>
+                <argument>-av</argument>
+                <argument>-p</argument>
+                <argument>--chmod=ug=rwX,o=rX</argument>
+                <argument>/cygdrive/d/projects/tea-repo/</argument>
+                <argument>skolos@sergeykolos.com:sergeykolos.com/tea/update/</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+p. 
+* Also need to adjust behavior of default maven's deploy plugin, so that it is not run. Add the following plugin to @com.tea.parent/pom.xml@:
+
+bc. 
+       <plugin>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.7</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+ 
+p. 
+* Create tea project on the server's Jenkins and set goals to @clean deploy@ instead of @clean install@
 * Test
 
 h2. Code Coverage
 
 h2. Scala
 
-
 TODO
 
 h2. Eclipse Plugins
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.