Jump to: navigation, search

Difference between revisions of "Xtext/Contributor Guide"

m (Run the script)
m
Line 2: Line 2:
 
== Prerequisites ==
 
== Prerequisites ==
 
=== User Account ===
 
=== User Account ===
We use [https://git.eclipse.org/r/ eclipse gerrit review server]. To use the review server a few steps are required:
+
We use eclipse  [https://git.eclipse.org/r/ eclipse gerrit review server] to review and manage new contributions. Hence, you need to perform the following few steps to be able to use the Gerrit server:
 
* Register an Eclipse.org account at [https://dev.eclipse.org/site_login/createaccount.php dev.eclipse.org]. The same account is used for [https://bugs.eclipse.org/bugs Bugzilla] and [https://git.eclipse.org/r Gerrit]. If you are an Eclipse committer you already have one.  
 
* Register an Eclipse.org account at [https://dev.eclipse.org/site_login/createaccount.php dev.eclipse.org]. The same account is used for [https://bugs.eclipse.org/bugs Bugzilla] and [https://git.eclipse.org/r Gerrit]. If you are an Eclipse committer you already have one.  
 
* [https://git.eclipse.org/r/#settings,http-password Define a username]
 
* [https://git.eclipse.org/r/#settings,http-password Define a username]
* [https://git.eclipse.org/r/#settings,ssh-keys Upload your public ssh-key] for authentication
+
* [https://git.eclipse.org/r/#settings,ssh-keys Upload your public ssh-key] for authentication. For more information about ssh authenticatoin and how to generate an ssh key, refer to [https://help.github.com/articles/generating-ssh-keys this site].
 
=== Eclipse Distribution ===
 
=== Eclipse Distribution ===
Download Full eclipse from [http://www.eclipse.org/Xtext/download.html Xtext website] or use the [http://www.eclipse.org/downloads/ eclipse DSL Package]  
+
Download "Full eclipse" from [http://www.eclipse.org/Xtext/download.html Xtext website] or use the [http://www.eclipse.org/downloads/ eclipse DSL Package]  
 
<br><br>  
 
<br><br>  
  
 
== Let Buckminster setup your Xcontributor environment ==
 
== Let Buckminster setup your Xcontributor environment ==
  
We provide an ant script which installs and runs [[Buckminster]]. Buckminster will do the most off necessary steps to crete a contributor workspace for you.  
+
We provide an [http://ant.apache.org/manual/install.html ant] script which installs and runs [[Buckminster]]. Buckminster will do the most off necessary steps to crete a contributor workspace for you.  
  
What does this script do in detail:  
+
What does [[Buckminster|buckminster]] do in detail:  
  
*create an eclipse workspace  
+
*creates an eclipse workspace  
*clone the Xtext git repository  
+
*clones the Xtext git repository  
*populate workspace with necessary projects  
+
*imports necessary projects in created workspace
*create and set api baseline  
+
*creates and sets [http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fapi_tooling_baseline.htm api baseline]
*create and set a target platform  
+
*creates and sets a [http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fconcepts%2Ftarget.htm target platform]
*set some important workspace settings  
+
*sets some important workspace settings  
*perform gerrit setup
+
*performs gerrit setup
  
 
=== Run the script  ===
 
=== Run the script  ===

Revision as of 08:38, 27 June 2013

Warning2.png
Draft Content
This page is currently under construction. Community members are encouraged to maintain the page, and make sure the information is accurate.

Prerequisites

User Account

We use eclipse eclipse gerrit review server to review and manage new contributions. Hence, you need to perform the following few steps to be able to use the Gerrit server:

Eclipse Distribution

Download "Full eclipse" from Xtext website or use the eclipse DSL Package

Let Buckminster setup your Xcontributor environment

We provide an ant script which installs and runs Buckminster. Buckminster will do the most off necessary steps to crete a contributor workspace for you.

What does buckminster do in detail:

  • creates an eclipse workspace
  • clones the Xtext git repository
  • imports necessary projects in created workspace
  • creates and sets api baseline
  • creates and sets a target platform
  • sets some important workspace settings
  • performs gerrit setup

Run the script

Run the ant script located here. In unix you can use following commands:

wget -N http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/plain/devtools/org.eclipse.xtext.contributor/workspace.ant
ant -f workspace.ant

If it's the first time you are cloning Xtext repository, the script will ask you to input your bugzilla/gerrit username in order to create the necessary entries in the git configuration file, so you can push to gerrit review server. You can also skip this step by leaving your input empty and manually set up your local git repository. Here you can find a good description.

Start eclipse

Start your eclipse and choose ${user.home}/workspaces/xtext-sources as eclipse workspace

Setup working sets



Using git

As git client you may use whatever you want, the important thing is that after setup your git configuration looks similar to this:


[core]
      repositoryformatversion = 0
      filemode = true
      logallrefupdates = true
[remote "origin"]
        url = git://git.eclipse.org/gitroot/tmf/org.eclipse.xtext.git
        pushurl = ssh://<your account id>@git.eclipse.org:29418/tmf/org.eclipse.xtext.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        push = HEAD:refs/for/master
[branch "master"]
        remote = origin
        merge = refs/heads/master


Pulling changes from server

git pull origin master

Pushing to review server

git push origin master

Helpful sites

Using Gerrit hosted at eclipse

Contribution monitoring

After you pushed your first commit to gerrit, it will be reviewed on the hudson review server. If all tests pass a manuel review will be done by one of the Xtext committers. If all looks good, your contribution will be pushed to the master repository and you can install it from the regular eclipse hudson server.

Browse Sources Online

Xtext and Xtend are hosted in Git. You can browse the repository in cgit here Xtext/Xtend repository.