Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 21, 2013
@jsievers Remove outdated README (leftover from exc 6) 80ef9f3
@jsievers Add instructions for settings.xml with p2 mirror db9cb30
@jsievers Adapt recovery instructions
no longer need to change p2 URL
as this is done via mirror in settings.xml now.
a1a3a39
View
8 exercises/Exercise_01_Create_RCP_Bundle/README.html
@@ -127,8 +127,12 @@
</repository>
</repositories>
</pre></li>
- <li>In order to be independent of the network, replace the URL in the snippet with a <tt>file:</tt> URL pointing to your <a href="../../p2_repository">local copy</a> of the p2 repository from the USB stick.
- <br/>This p2 repository contains is a subset of the <a href="http://download.eclipse.org/releases/juno/">Juno p2 repository</a>.<br/>
+ <li>In order to be independent of network access to eclipse.org:
+ <ul>
+ <li>Open <tt>~/.m2/repository/settings.xml</tt> (Linux/Mac) or <tt>%USERPROFILE%/.m2/repository/settings.xml</tt> (Windows)</li>
+ <li>Replace the mirror URL <tt>file:/TODO/path/to/tutorial/p2_repository</tt> with a real <tt>file:</tt> URL pointing to your <a href="../../p2_repository">local copy</a> of the p2 repository from the USB stick.</li>
+ </ul>
+ <br/>This p2 repository contains a subset of the <a href="http://download.eclipse.org/releases/kepler/">Kepler p2 repository</a>.<br/>
</li>
</ul>
</li>
View
8 exercises/Exercise_02_Add_Test_Fragment/tychodemo.parent/README.html
@@ -25,14 +25,6 @@
<br/><img src="../resources/import.png" />
<br/><img src="../resources/import_2.png" />
</li>
-<li>If you are not connected to the Internet, use your <a href="../../../p2_repository">local copy</a> of the p2 repository from the USB stick for resolving dependencies:<ul>
- <li>Open the file <tt>tychodemo.parent/pom.xml</tt> and switch to the <tt>pom.xml</tt> tab
- <br/><img src="../resources/local_p2_repository.png" />
- </li>
- <li>In the <tt>&lt;repositories&gt;</tt> section, replace <tt>http://download.eclipse.org/releases/juno/</tt> by a <tt>file:</tt> URL pointing to the <a href="../../../p2_repository">local p2 repository</a>
- <br/><img src="../resources/local_p2_repository_2.png" />
- </li>
-</ul></li>
<li>Right-click on <tt>tychodemo.parent > Run As > Maven build</tt>, enter Goals: <tt>clean install</tt>.<br/>
The build should succeed and build two modules:<br/>
<img src="../resources/build_success.png"/>
View
4 exercises/Exercise_03_Add_Feature/tychodemo.parent/README.html
@@ -21,10 +21,6 @@
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose the folder <a href="../">Exercise_03_Add_Feature</a>.<br/>
Import all three projects from this folder into the new empty Eclipse workspace using <tt>File &gt; Import &gt; Existing Maven Projects</tt></li>
-<li>Configure your <a href="../../../p2_repository">local copy</a> of the p2 repository from the USB stick as target platform of the build:<ul>
- <li>Open the file <tt>tychodemo.parent/pom.xml</tt> and switch to the <tt>pom.xml</tt> tab</li>
- <li>In the <tt>&lt;repositories&gt;</tt> section, replace <tt>http://download.eclipse.org/releases/juno/</tt> by a <tt>file:</tt> URL pointing to the <a href="../../../p2_repository">local p2 repository</a></li>
-</ul></li>
<li> Right-click on <tt>tychodemo.parent, Run As > Maven build</tt>, enter Goals: <tt>clean install</tt>.<br/>
The build should succeed and build three modules
<pre>
View
4 exercises/Exercise_04_Add_P2_Repository/tychodemo.parent/README.html
@@ -21,10 +21,6 @@
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose the folder <a href="../">Exercise_04_Add_P2_Repository</a></li>
<li>Import all four projects from this folder into the workspace using <tt>File > Import > Existing Maven Projects</tt></li>
- <li>Configure your <a href="../../../p2_repository">local copy</a> of the p2 repository from the USB stick as target platform of the build:<ul>
- <li>Open the file <tt>tychodemo.parent/pom.xml</tt> and switch to the <tt>pom.xml</tt> tab</li>
- <li>In the <tt>&lt;repositories&gt;</tt> section, replace <tt>http://download.eclipse.org/releases/juno/</tt> by a <tt>file:</tt> URL pointing to the <a href="../../../p2_repository">local p2 repository</a></li>
- </ul></li>
<li>Trigger a build on the parent POM: <ul>
<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>
View
4 exercises/Exercise_05_Add_Product/tychodemo.parent/README.html
@@ -21,10 +21,6 @@
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose the 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>Configure your <a href="../../../p2_repository">local copy</a> of the p2 repository from the USB stick as target platform of the build:<ul>
- <li>Open the file <tt>tychodemo.parent/pom.xml</tt> and switch to the <tt>pom.xml</tt> tab</li>
- <li>In the <tt>&lt;repositories&gt;</tt> section, replace <tt>http://download.eclipse.org/releases/juno/</tt> by a <tt>file:</tt> URL pointing to the <a href="../../../p2_repository">local p2 repository</a></li>
- </ul></li>
<li>Trigger a build on the parent POM: <ul>
<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>
View
190 exercises/Exercise_05_Solution/tychodemo.parent/README.html
@@ -1,190 +0,0 @@
-<!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>
-<title>EclipseCon 2012 Tycho Tutorial - Exercise 6</title>
-</head>
-<body>
- <p align="center">
- <a href="../../Exercise_05_Add_Product/tychodemo.parent/README.html">&lt;Previous Exercise</a>
- | <a href="../../../README.html">TOC</a>
- </p>
-
- <h2>Exercise 6: Use a target file</h2>
-
- In this exercise, we will ensure that others can also develop the project by using a target definition file as target platform in Eclipse (instead of the "Running Platform").<br/>
- Then we will re-use the target file for the target platform in the Tycho build.
-
- <h3>Recovery option</h3>
-
- This section is optional and only needed if you want to catch up from exercise 5 or reset your workspace.
-
- <ul>
- <li>Select <tt>File > Switch Workspace > Other...</tt> and choose the folder <a href="../">Exercise_06_Use_Target_File</a>.</li>
- <li>Import all five projects from this folder into the workspace using <tt>File > Import > Existing Maven Projects</tt></li>
- <li>Configure your <a href="../../../p2_repository">local copy</a> of the p2 repository from the USB stick as target platform of the build:<ul>
- <li>Open the file <tt>tychodemo.parent/pom.xml</tt> and switch to the <tt>pom.xml</tt> tab</li>
- <li>In the <tt>&lt;repositories&gt;</tt> section, replace <tt>http://download.eclipse.org/releases/juno/</tt> by a <tt>file:</tt> URL pointing to the <a href="../../../p2_repository">local p2 repository</a></li>
- </ul></li>
- <li>Trigger a build on the parent POM: <ul>
- <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
- tychodemo.bundle
- tychodemo.bundle.tests
- tychodemo.feature
- tychodemo.repository</pre>
- </li>
- </ul>
-
- <h3>Creating a target definition file for Eclipse</h3>
-
- In the Eclipse workspace, the plug-ins currently compile against the running Eclipse installation.
- This may lead to problems if other developers use a different version of Eclipse.<br/>
- As first part of this exercise, we will make the project portable by defining the Eclipse target platform through a target file.
-
- <ol>
- <li>Create a new general project <tt>tychodemo.target</tt>:<br/>
- <ul>
- <li><tt>CTRL+N &gt; General &gt; Project</tt>
- <br/><img src="../resources/new_project.png"/></li>
- </ul>
- <ul>
- <li>Enter the project name <tt>tychodemo.target</tt> and hit <tt>Finish</tt>
- <br/><img src="../resources/new_project_2.png"/></li>
- </ul>
- </li>
-
- <li>In the <tt>tychodemo.target</tt> project, create a new, empty target definition called <tt>tychodemo.target.target</tt>:
- <ul>
- <li><tt>CTRL+N &gt; Plug-in Development &gt; Target Definition</tt>
- <br/><img src="../resources/new_target.png"/></li>
- </ul>
- <ul>
- <li>Enter the file name <tt>tychodemo.target.target</tt> and hit <tt>Finish</tt>
- <br/><img src="../resources/new_target_2.png"/></li>
- </ul>
- </li>
-
- <li>In the editor for the <tt>tychodemo.target.target</tt>, add the <tt>Eclipse RCP</tt> feature from the Juno repository <tt>http://download.eclipse.org/releases/juno/</tt>
- <br/>Note: If you are not connected to the Internet, use <a href="../../../p2_repository">your local copy of the p2 repository from the USB stick</a> instead. This p2 repository contains a subset of the Juno repository.
- <ul>
- <li>Click <tt>Add...</tt></li>
- <li>Select <tt>Software Site</tt> and click <tt>Next &gt;</tt>
- <br/><img src="../resources/new_location.png"/></li>
- <li>In the <tt>Work with</tt> field, paste the URL <tt>http://download.eclipse.org/releases/juno/</tt> and press <tt>ENTER</tt>. Wait until the repository content is shown.
- <br/><img src="../resources/add_feature_load_pending.png"/></li>
- <li>Deselect <tt>Group by Category</tt>, enter <tt>Eclipse RCP</tt> in the filter text box and select the <tt>Eclipse RCP</tt> feature. Hit <tt>Finish</tt>.
- <br/><img src="../resources/add_rcp_sdk_feature.png"/></li>
- </ul>
- </li>
-
- <li>Set the target definition as target platform:
- <ul>
- <li>Wait until the target definition is resolved (optional). Click <tt>Set as Target Platform</tt>
- <br/><img src="../resources/target_1_editor.png"/></li>
- <li>This leads to a compilation problem: <tt>Bundle 'org.junit' cannot be resolved</tt>
- <br/><img src="../resources/target_1_problems.png"/></li>
- </ul>
- </li>
-
- <li>We need to add the JUnit bundle to the target platform. Do this by adding the <tt>Eclipse Java Development Tools</tt> feature:
- <ul>
- <li>In the editor of <tt>tychodemo.target.target</tt>, select the p2 repository URL under <tt>Locations</tt> and click <tt>Edit...</tt></li>
- <li><em>If the dialog displays an error message,</em> close the dialog and open it again by clicking <tt>Edit...</tt> (cf. <a target="_blank" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275999" title="Bug 275999 &ndash; [target] edit software site does not set initial selection reliably">bug 275999</a>)
- <br/><img src="../resources/edit_location_error.png"/>
- <br/>The status text below the features list should be <tt>1 item selected</tt></li>
- <li>Enter <tt>Java Dev</tt> in the search text box and select the one feature from the list. Do <em>not</em> click finish yet!
- <br/><img src="../resources/add_jdt_feature.png"/></li>
- <li>Clear the filter text box &ndash; the status text below the features list should now say <tt>2 items selected</tt> (cf. <a target="_blank" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309136" title="Bug 309136 &ndash; Software content selection wizard does not add filtered content">bug 309136</a>). Hit <tt>Finish</tt>.
- <br/><img src="../resources/add_jdt_feature_2.png"/></li>
- <li>Once the target definition is resolved, the editor shows two features under the p2 repository URL
- <br/><img src="../resources/target_2_editor.png"/></li>
- </ul>
- </li>
-
- <li>Set the target definition as target platform. The compile error should now be resolved.</li>
- <li>Save the <tt>tychodemo.target.target</tt> file</li>
- </ol>
-
- <h3>Using the same target definition in the Tycho build</h3>
-
- Now that we have a target definition file, we can use that file for the target platform configuration in Tycho. With such a setup, we can be certain that both Eclipse and Tycho use the same target platform.
-
- <ol start="8">
- <li>Add the <tt>tychodemo.target</tt> project to the build (with packaging type <tt>eclipse-target-definition</tt>):<ul>
- <li>Right-click on <tt>tychodemo.target > 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-target-definition</tt>
- <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.target</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>
-
- <li>Configure the build to use the target definition in <tt>tychodemo.target</tt> as target platform: <ul>
- <li>Switch to the <tt>pom.xml</tt> tab of the <tt>tychodemo.parent</tt> POM editor</li>
- <li>In the <tt>&lt;build&gt;&lt;plugins&gt;</tt> section, add the following build plugin configuration:
- <pre>
- &lt;plugin&gt;
- &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
- &lt;artifactId&gt;target-platform-configuration&lt;/artifactId&gt;
- &lt;version&gt;${tycho-version}&lt;/version&gt;
- &lt;configuration&gt;
- &lt;target&gt;
- &lt;artifact&gt;
- &lt;groupId&gt;tychodemo&lt;/groupId&gt;
- &lt;artifactId&gt;tychodemo.target&lt;/artifactId&gt;
- &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
- &lt;/artifact&gt;
- &lt;/target&gt;
- &lt;/configuration&gt;
- &lt;/plugin&gt;
- </pre>
- </li>
- <li>Delete the <tt>repositories</tt> section in the parent POM (<a href="../../Exercise_06_Solution/tychodemo.parent/pom.xml">expected result</a>)</li>
- </ul></li>
-
- <li>Run the build of <tt>tychodemo.parent</tt>, e.g. by selecting <tt>tychodemo.parent</tt> from the run history
- <br/>The expected result is a build failure &ndash; the root cause can be seen at the start of the <tt>[ERROR]</tt> log output:
- <br/><img src="../resources/target_2_build_error.png"/>
- </li>
-
- <li>The product build needs the <tt>org.eclipse.equinox.executable</tt> feature, which contains the native launchers. Add this feature in the target file: <ul>
- <li>In the editor of <tt>tychodemo.target.target</tt>, select the p2 repository URL and click <tt>Edit...</tt></li>
- <li><em>If the dialog displays an error message,</em> close the dialog and open it again by clicking <tt>Edit...</tt></li>
- <li>Type <tt>executable</tt> in the search text box and select the one feature from the list
- <br/><img src="../resources/add_launchers_feature.png"/></li>
- <li>Clear the filter text box &ndash; the status text below the features list should now say <tt>3 items selected</tt>. Hit <tt>Finish</tt>.
- <br/><img src="../resources/add_launchers_feature_2.png"/></li>
- <li>Once the target definition is resolved, the editor shows three features under the p2 repository URL</li>
- </ul></li>
-
- <li>Run the build of <tt>tychodemo.parent</tt> again, e.g. by selecting <tt>tychodemo.parent</tt> from the run history. The build should now be successful again.</li>
- </ol>
-
- <p>This concludes this exercise. To recapitulate our achievements:
- <ul>
- <li>We have created a target definition file in order to ensure that all developers of the project use the same target platform.</li>
- <li>We have re-used the target definition file in the Tycho build configuration to have the same target platform in Tycho as in Eclipse.</li>
- <li>We have now the possibility to manage the project's dependencies.</li>
- </ul></p>
-<hr/>
-
-<p><strong>Congratulations</strong>: You have now completed the Tycho tutorial. You now may want to
-<ul>
- <li>Read more about <a href="http://www.eclipse.org/tycho/">Tycho</a> in the <a href="http://wiki.eclipse.org/Category:Tycho">Tycho documentation</a></li>
-</ul>
-</p>
-
-<p align="center">
- <a href="../../Exercise_05_Add_Product/tychodemo.parent/README.html">&lt;Previous Exercise</a>
- | <a href="../../../README.html">TOC</a>
-</p>
-
-</body>
-</html>

No commit comments for this range

Something went wrong with that request. Please try again.