Marauroa on Eclipse: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann No edit summary |
imported>Monsterdhal Changed the tutorial to match the move of marauroa to Git |
||
| Line 2: | Line 2: | ||
{{Navigation for Marauroa Developers}} |
{{Navigation for Marauroa Developers}} |
||
==First Steps== |
== First Steps (Installing EGit Plugin) == |
||
In Eclipse check if you have got ''Eclipse EGit'' already installed: |
|||
<ol> |
|||
<li> First of all open the view called Package Explorer.</li> |
|||
<li> "New Project..."</li> |
|||
<li> "CVS" -> "Project from CVS" </li> |
|||
<li> Get marauroa from CVS. (Connection type: pserver, User: anonymous, Password - leave blank, Host:arianne.cvs.sourceforge.net, Repository: /cvsroot/arianne module marauroa)</li> |
|||
<pre> |
<pre> |
||
* Help -> Install New Software... -> What is already installed? |
|||
file-> new -> project -> project-> from cvs |
|||
* Now you should have opened a Window titled "Eclipse Intallation Details". |
|||
click next |
|||
* Look for Eclipse EGit in the list of installed Software. |
|||
</pre> |
|||
If you '''don't''' see ''Eclipse EGit'' in that list: |
|||
<pre> |
|||
* Close (go back to the Window titled "Install") -> Work with: <your Eclipse version> |
|||
(e. g. Indigo - http://download.eclipse.org/releases/indigo) |
|||
* Into the filter text box type "egit". |
|||
* Eclipse EGit should come up (on the Collaboration branch). |
|||
* Mark Eclipse EGit by clicking the small box next to it. |
|||
* Click Next and follow through clicking Next until finished. |
|||
* Restart Eclipse when prompted. |
|||
</pre> |
|||
== Getting Marauroa Source from Git == |
|||
check "create new repository" |
|||
Once installed the Eclipse EGit software you can proceed preparing Eclipse for your sourceforge git access. |
|||
click next |
|||
=== Configuration === |
|||
host : arianne.cvs.sourceforge.net |
|||
<pre> |
|||
repository path : /cvsroot/arianne |
|||
* First you need to tell Git about yourself: |
|||
user : anonymous |
|||
Window -> Preferences -> Team -> Git -> Configuration |
|||
connection Type: pserver |
|||
* Click New Entry and enter |
|||
click next |
|||
Key: user.name |
|||
Value: <your sourceforge username> |
|||
* Click New Entry again and enter |
|||
Key: user.email |
|||
Value: <your sourceforge email address> (<your sourceforge username>@users.sourceforge.net) |
|||
</pre> |
|||
This information is stored in ~/.gitconfig (Linux) or %USERPROFILE%\.gitconfig (Windows) and will be used by Git to identify who did change the history of the repository. |
|||
check "use an existing module" |
|||
click directory: marauroa |
|||
click next |
|||
You'll see the location of the file right above the key table in the window you are looking at. Click [Open] and edit it directly in Eclipse. Add the rest of the file as in the example below. (Replace USERNAME with your sourceforge username.) |
|||
checkout as a project configured using the new project wizard |
|||
<pre> |
|||
click next |
|||
[core] |
|||
repositoryformatversion = 0 |
|||
click finish (ignoring the rest) |
|||
filemode = true |
|||
logallrefupdates = true |
|||
The next dialog says 'New Project' |
|||
autocrlf = false |
|||
select a wizard: java project and click next |
|||
[branch "master"] |
|||
project Name: marauroa ( or whatever you like to call it ) |
|||
remote = origin |
|||
make sure in jre a java version 1.5 or higher is selected |
|||
merge = refs/heads/master |
|||
click finish |
|||
[remote "origin"] |
|||
url = ssh://USERNAME@arianne.git.sourceforge.net/gitroot/arianne/marauroa.git |
|||
fetch = +refs/heads/*:refs/remotes/origin/* |
|||
[user] |
|||
name = USERNAME |
|||
email = USERNAME@users.sourceforge.net |
|||
</pre> |
</pre> |
||
Before going on, you possibly might want to change the default repository folder to be sure the new project will be stored into your Eclipse workspace: |
|||
<!--<li> Right click on your project folder and select "Properties" in the context menu.</li> |
|||
<li> Then select "Java Build Path" on the left side of the dialog box.</li> |
|||
<li> Now remove all existing folders from source path and add the two source folders 'src' and 'tests' by clicking on the "Add Folder..." button</li> |
|||
<pre> |
<pre> |
||
* Window -> Preferences -> Team -> Git |
|||
source folder #1: |
|||
Default repository folder: <your Eclipse workspace folder> |
|||
marauroa/src |
|||
</pre> |
|||
Included:(All) |
|||
Excluded:(None) |
|||
Native library location: (None) |
|||
=== Get Code === |
|||
source folder #2: |
|||
<pre> |
|||
marauroa/tests |
|||
* File -> Import... -> Git -> Projects from Git -> Next |
|||
Included:(All) |
|||
* Clone... |
|||
Excluded:(None) |
|||
URI: ssh://USERNAME@arianne.git.sourceforge.net/gitroot/arianne/marauroa.git |
|||
Native library location: (None) |
|||
(changing USERNAME to your own source forge username) |
|||
User: <your sourceforge username> |
|||
source folder #2: |
|||
Password: <your sourceforge password> |
|||
marauroa/functional_tests |
|||
Store in Secure Store: Select that if you want |
|||
Included:(All) |
|||
* If you have trouble at this stage try restarting eclipse and try again |
|||
Excluded:(None) |
|||
* Select all branches if not already selected (fast anyway) -> Next |
|||
Native library location: (None) |
|||
Initial branch: master |
|||
Remote name: origin |
|||
default output folder: marauroa/classes |
|||
(should already be inserted) |
|||
* Let it import everything |
|||
* Select the repository you just cloned -> Next |
|||
* Wizard for project import: Use the New Projects wizard -> Finish |
|||
* New Project wizard will open |
|||
* Select Java -> Java Project -> Next |
|||
* Give it a name (marauroa will do) |
|||
* The other defaults are okay |
|||
* Finish |
|||
</pre> |
</pre> |
||
<li> On the "Libraries" tab: click on the "Add JARs" button and select all the files in stendhal/lib</li> --> |
|||
</ol> |
|||
Eclipse should be able to compile the source code now. There could be a little yellow sign (signalling warning messages) before your project folder but there must not be red X (error messages). The package explorer should now display the "src" folder below the root folder with a different icon, the icon is like a small grid. |
|||
==Trouble Shooting== |
== Trouble Shooting == |
||
menu Windows | Preferences | Java | Installed JREs |
menu Windows | Preferences | Java | Installed JREs |
||
* there should be at least one entry with a valid JAVA_HOME path |
* there should be at least one entry with a valid JAVA_HOME path |
||
== See also == |
== See also == |
||
[[StendhalonEclipse|Stendhal on Eclipse]]<br/> |
|||
[[Arianne_Source_Code_Repositories|Arianne Source Code Repositories]] |
|||
[[StendhalonEclipse]] |
|||
[[Category:Marauroa]] |
[[Category:Marauroa]] |
||