Permalink
Browse files

Updated exercise 6

- Updated exercise instructions
- Added solution
- Integrated with index and other instruction steps
  • Loading branch information...
1 parent bcaa2a1 commit 19e87269f06189801043718a3a841b6776b5e008 @oberlies oberlies committed Oct 19, 2012
Showing with 204 additions and 299 deletions.
  1. +8 −6 README.html
  2. +2 −2 exercises/Exercise_04_Add_P2_Repository/tychodemo.parent/README.html
  3. +6 −10 exercises/Exercise_05_Add_Product/tychodemo.parent/README.html
  4. +3 −4 exercises/Exercise_06_Solution/tychodemo.parent/README.txt
  5. +15 −9 exercises/Exercise_06_Solution/tychodemo.parent/pom.xml
  6. +15 −0 exercises/Exercise_06_Solution/tychodemo.target/pom.xml
  7. +13 −0 exercises/Exercise_06_Solution/tychodemo.target/tychodemo.target.target
  8. BIN exercises/Exercise_06_Use_Target_File/resources/add_feature_load_pending.png
  9. BIN exercises/Exercise_06_Use_Target_File/resources/add_jdt_feature.png
  10. BIN exercises/Exercise_06_Use_Target_File/resources/add_jdt_feature_2.png
  11. BIN exercises/Exercise_06_Use_Target_File/resources/add_launchers_feature.png
  12. BIN exercises/Exercise_06_Use_Target_File/resources/add_launchers_feature_2.png
  13. BIN exercises/Exercise_06_Use_Target_File/resources/add_pom.png
  14. BIN exercises/Exercise_06_Use_Target_File/resources/add_rcp_sdk_feature.png
  15. BIN exercises/Exercise_06_Use_Target_File/resources/add_to_parent.png
  16. BIN exercises/Exercise_06_Use_Target_File/resources/add_to_parent_2.png
  17. BIN exercises/Exercise_06_Use_Target_File/resources/edit_location_error.png
  18. BIN exercises/Exercise_06_Use_Target_File/resources/new_location.png
  19. BIN exercises/Exercise_06_Use_Target_File/resources/new_target_2.png
  20. BIN exercises/Exercise_06_Use_Target_File/resources/target_1_editor.png
  21. BIN exercises/Exercise_06_Use_Target_File/resources/target_1_problems.png
  22. BIN exercises/Exercise_06_Use_Target_File/resources/target_2_build_error.png
  23. BIN exercises/Exercise_06_Use_Target_File/resources/target_2_editor.png
  24. +0 −51 exercises/Exercise_06_Use_Target_File/resources/tychodemo.parent_pom.xml_without_bonus.txt
  25. BIN exercises/Exercise_06_Use_Target_File/resources/work_with_indigo_pending.png
  26. +142 −217 exercises/Exercise_06_Use_Target_File/tychodemo.parent/README.html
View
@@ -11,12 +11,12 @@
<li>You need a Juno SR1 eclipse classic SDK with m2eclipse, m2e Tycho configurators and e4 Tools installed.<br/>
For your convenience, we provide <a href="../">pre-packaged zips/tarballs</a> with this installation in the root folder of the USB stick. </li>
<li>Copy and unpack the eclipse SDK archive for your platform and start it.<br/> NOTE: for the 64-bit versions you will need a 64-bit JVM installed</li>
-<li>Copy folder <tt>tutorial/</tt> to your local harddrive, e.g. to <tt>C:\temp\tycho\</tt> or <tt>~/tycho/</tt></li>
+<li>Copy folder <tt>tutorial/</tt> to your local hard drive, e.g. to <tt>C:\temp\tycho\</tt> or <tt>~/tycho/</tt></li>
</ol>
<h2>Exercises Overview:
-Building an e4 RCP application in five step-by-step exercises</h2>
+Building an e4 RCP application in six step-by-step exercises</h2>
The hands-on exercises will guide you through setting up a
typical Tycho build for an e4 RCP application.<br/>
@@ -26,26 +26,28 @@
<li>Create a feature for grouping the plugins we want to deliver.</li>
<li>Then, we create a p2 repository/update site containing our feature(s)
and bundles, and </li>
-<li>Finally, build a ready-to-use distribution archive of our RCP application.</li>
+<li>Build a ready-to-use distribution archive of our RCP application.</li>
+<li>Finally, we improve the project setup by using a target definition file.</li>
</ul>
<h2>Table Of Contents</h2>
-The exercises consist of five steps:
+The exercises consist of six steps:
<ol>
<li> <a href="exercises/Exercise_01_Create_RCP_Bundle/README.html">Build a simple e4 RCP plugin</a></li>
<li> <a href="exercises/Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html">Build and execute a simple test</a></li>
<li> <a href="exercises/Exercise_03_Add_Feature/tychodemo.parent/README.html">Add a feature</a></li>
<li> <a href="exercises/Exercise_04_Add_P2_Repository/tychodemo.parent/README.html">Add a p2 repository</a></li>
<li> <a href="exercises/Exercise_05_Add_Product/tychodemo.parent/README.html">Build a product</a>
- (<a href="exercises/Exercise_05_Solution/">solution</a>)</li>
+<li> <a href="exercises/Exercise_06_Use_Target_File/tychodemo.parent/README.html">Use a target file</a>
+ (<a href="exercises/Exercise_06_Solution/">solution</a>)</li>
</ol>
<br/>
-Each step has a subfolder with stub content as a starting point.<br/>
+Each step has a sub-folder with stub content as a starting point.<br/>
The links above give detailed step-by-step instructions for each step.<br/>
The folder for an exercise is at the same time starting point for the current exercise and solution of the previous one.<br/>
If you want to catch up to a certain step during the exercises,
@@ -49,15 +49,15 @@
<li>Rename <tt>site.xml</tt> to <tt>category.xml</tt> using Right-click <tt>Refactor > Rename...</tt><br /> <img src="../resources/rename.png" />
</li>
- <li>Include the new project in the build: <ul>
+ <li>Add the the new project to the build (with packaging type <tt>eclipse-repository</tt>): <ul>
<li>Right-click on <tt>tychodemo.repository > Configure > Convert to Maven Project</tt></li>
<li>Enter the group ID <tt>tychodemo</tt>, version <tt>1.0.0-SNAPSHOT</tt> and packaging <tt>eclipse-repository</tt>. Background info: the packaging type <tt>eclipse-repository</tt> tells Tycho to build a p2 repository.
<br /><img src="../resources/add_pom.png" />
</li>
<li>Open the <tt>pom.xml</tt> of <tt>tychodemo.parent</tt> and click on <tt>Add...</tt> in the <tt>Modules</tt> section
<br /><img src="../resources/add_to_parent.png" />
</li>
- <li>Select the <tt>tychodemo.bundle</tt> module, select <tt>Update POM parent section in selected projects</tt>, and hit <tt>OK</tt>
+ <li>Select the <tt>tychodemo.repository</tt> module, select <tt>Update POM parent section in selected projects</tt>, and hit <tt>OK</tt>
<br /><img src="../resources/add_to_parent_2.png" />
</li>
</ul></li>
@@ -7,10 +7,10 @@
<p align="center">
<a href="../../Exercise_04_Add_P2_Repository/tychodemo.parent/README.html">&lt;Previous Exercise</a>
| <a href="../../../README.html">TOC</a>
-<!-- | <a href="../../Exercise_06_Use_Target_File/tychodemo.parent/README.html">Next Exercise&gt;</a> -->
+ | <a href="../../Exercise_06_Use_Target_File/tychodemo.parent/README.html">Next Exercise&gt;</a>
</p>
- <h2>Exercise 5: Add a product</h2>
+ <h2>Exercise 5: Build a product distribution</h2>
In this exercise, we build an installation of our RCP application and pack it into a ready-to-use ZIP archive.
<br />Offering an archive for download is a common way to distribute RCP applications.
@@ -22,8 +22,8 @@
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose folder <a href="../">Exercise_05_Add_Product</a></li>
<li>Import all five projects from this folder into the workspace using <tt>File > Import > Existing Maven Projects</tt></li>
<li>Trigger a build on the parent POM: <ul>
- <li>Right-click on <tt>tychodemo.parent > Run As > Maven</tt></li>
- <li>If an launch configuration dialog appears, enter the goals <tt>clean install</tt> and hit <tt>Run</tt></li>
+ <li>Right-click on <tt>tychodemo.parent > Run As > Maven build</tt></li>
+ <li>If a launch configuration dialog appears, enter the goals <tt>clean install</tt> and hit <tt>Run</tt></li>
</ul></li>
<li>The build should succeed and build five modules <pre>
tychodemo.parent
@@ -34,7 +34,7 @@
</li>
</ul>
- <h3>Building a product configuration file</h3>
+ <h3>Building a product distribution</h3>
<ol>
<li>Move the existing <tt>tychodemo.bundle.product</tt> file from the project <tt>tychodemo.bundle</tt> to the project <tt>tychodemo.repository</tt>
@@ -146,14 +146,10 @@
</ol>
<br />
- <p>
- Congratulations! You have now completed the EclipseCon Tycho tutorial.
- </p>
-
<p align="center">
<a href="../../Exercise_04_Add_P2_Repository/tychodemo.parent/README.html">&lt;Previous Exercise</a>
| <a href="../../../README.html">TOC</a>
-<!-- | <a href="../../Exercise_06_Use_Target_File/tychodemo.parent/README.html">Next Exercise&gt;</a> -->
+ | <a href="../../Exercise_06_Use_Target_File/tychodemo.parent/README.html">Next Exercise&gt;</a>
</p>
</body>
@@ -1,5 +1,4 @@
-Exercise 5: Add a product (solution)
-====================================
-
-This folder contains the solution of exercise 5.
+Exercise 6: Use a target file (solution)
+========================================
+This folder contains the solution of exercise 6.
@@ -14,22 +14,14 @@
<module>../tychodemo.bundle.tests</module>
<module>../tychodemo.feature</module>
<module>../tychodemo.repository</module>
+ <module>../tychodemo.target</module>
</modules>
<!-- common settings for all modules -->
<properties>
<tycho-version>0.16.0</tycho-version>
</properties>
- <repositories>
- <!-- configure p2 repository to resolve against -->
- <repository>
- <id>juno</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/releases/juno/</url>
- </repository>
- </repositories>
-
<build>
<plugins>
<plugin>
@@ -39,6 +31,20 @@
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <target>
+ <artifact>
+ <groupId>tychodemo</groupId>
+ <artifactId>tychodemo.target</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </artifact>
+ </target>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -0,0 +1,15 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>tychodemo</groupId>
+ <artifactId>tychodemo.parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../tychodemo.parent</relativePath>
+ </parent>
+
+ <artifactId>tychodemo.target</artifactId>
+ <packaging>eclipse-target-definition</packaging>
+
+</project>
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde version="3.8"?>
+
+<target name="tychodemo.target" sequenceNumber="8">
+<locations>
+<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+<unit id="org.eclipse.jdt.feature.group" version="3.8.1.v20120814-104540-8-8nFqpFNOfwKDRVz-tXOcL5d_83"/>
+<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.0.v20120522-1813-7P7OG2BFLWUl7UmbVUO9iCm"/>
+<unit id="org.eclipse.rcp.sdk.id" version="4.2.1.M20120914-1800"/>
+<repository location="http://download.eclipse.org/releases/juno/"/>
+</location>
+</locations>
+</target>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>tychodemo</groupId>
- <artifactId>tychodemo.parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <!-- this is the parent POM from which all modules inherit common settings -->
- <properties>
- <tycho-version>0.13.0</tycho-version>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <!-- enable tycho build extension -->
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <target>
- <artifact>
- <groupId>tychodemo</groupId>
- <artifactId>tychodemo.target</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <classifier>indigo</classifier>
- </artifact>
- </target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <modules>
- <module>../tychodemo.bundle</module>
- <module>../tychodemo.bundle.tests</module>
- <module>../tychodemo.feature</module>
- <module>../tychodemo.repository</module>
- <module>../tychodemo.target</module>
- </modules>
-
-</project>
Oops, something went wrong.

0 comments on commit 19e8726

Please sign in to comment.