Skip to content

Commit

Permalink
Added instructions to use local p2 repository
Browse files Browse the repository at this point in the history
  • Loading branch information
oberlies committed Oct 22, 2012
1 parent 5f33d73 commit 8decb30
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 16 deletions.
10 changes: 3 additions & 7 deletions exercises/Exercise_01_Create_RCP_Bundle/README.html
Expand Up @@ -127,16 +127,12 @@ <h2>Exercise 1: Create and build a "Hello World" e4 RCP plugin using Tycho</h2>
&lt;/repository&gt;
&lt;/repositories&gt;
</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>
</ul>

<br/>
Note: The local p2 repository we provide on the USB stick is a subset mirrored from the <a href="http://download.eclipse.org/releases/juno/">Juno p2 repository</a>.<br/>
Using the local p2 repository avoids network problems during the tutorial and works around one open <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=355433">bug in the Juno p2 repo</a>.

</li>


<li> Expected result is a <tt>SUCCESSFUL</tt> build with the bundle jar
<tt>tychodemo.bundle-1.0.0-SNAPSHOT.jar</tt> in the <tt>target/</tt> folder of the project <br/>
(you may have to refresh the project to display the <tt>target/</tt> folder)<br/>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified exercises/Exercise_02_Add_Test_Fragment/resources/import.png
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.
Expand Up @@ -20,12 +20,21 @@ <h2>Exercise 2: Add a test fragment with a simple JUnit test</h2>
Common settings have been extracted to a parent POM <a href="pom.xml"><tt>tychodemo.parent</tt></a> from which all modules will inherit and which defines the reactor modules.<br/>

<ol>
<li> Select <tt>File > Switch Workspace > Other...</tt> and choose <a href="../">folder Exercise_02_Add_Test_Fragment</a>.</li>
<li> Import the two projects from this folder into the new empty Eclipse workspace using <tt>File > Import > Maven > Existing Maven Projects</tt><br/>
<img src="../resources/import.png"/>
<li> Select <tt>File > Switch Workspace > Other...</tt> and choose the folder <a href="../">Exercise_02_Add_Test_Fragment</a>.</li>
<li> Import the two projects from this folder into the workspace using <tt>File > Import > Maven > Existing Maven Projects</tt>
<br/><img src="../resources/import.png" />
<br/><img src="../resources/import_2.png" />
</li>
<li>Right-click on tychodemo.parent, <tt>Run As > Maven build</tt>, enter Goals: <tt>clean install</tt>.<br/>
The build should succeed and build 2 modules:<br/>
<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"/>
</li>
<li> Create a new fragment project <tt>tychodemo.bundle.tests</tt> with fragment host <tt>tychodemo.bundle</tt>:<br/>
Expand Down
Expand Up @@ -19,8 +19,12 @@ <h3>Recovery option</h3>
This section is optional and only needed if you want to catch up from exercise 2 or reset your workspace.

<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose folder <a href="../">Exercise_03_Add_Feature</a>.<br/>
<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>
Expand Down
Expand Up @@ -19,8 +19,12 @@ <h3>Recovery option</h3>

This section is optional and only needed if you want to catch up from exercise 3 or reset your workspace.
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose folder <a href="../">Exercise_04_Add_P2_Repository</a></li>
<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>
Expand Down
Expand Up @@ -19,8 +19,12 @@ <h3>Recovery option</h3>

This section is optional and only needed if you want to catch up from exercise 4 or reset your workspace.
<ul>
<li>Select <tt>File > Switch Workspace > Other...</tt> and choose folder <a href="../">Exercise_05_Add_Product</a></li>
<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>
Expand Down
Expand Up @@ -19,8 +19,12 @@ <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 folder <a href="../">Exercise_06_Use_Target_File</a>.</li>
<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>
Expand Down

0 comments on commit 8decb30

Please sign in to comment.