Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Skalli/Contributor Guide"
m (→Contributing Patches) |
(Revised Howto Make Skalli Build section) |
||
Line 27: | Line 27: | ||
Note: there will be compile errors, as some patches are needed for successful compilation. | Note: there will be compile errors, as some patches are needed for successful compilation. | ||
− | = | + | = Howto: Make Skalli Build in Eclipse (as of 2011-06-22) = |
− | Skalli | + | After you cloned Skalli from Git you should see a couple of build errors. Due to the ongoing IP process for Skalli, we are not allowed to provide all necessary 3rd-party libraries as part of our source code (or in Eclipse Orbit) yet. Therefore, you need to download the missing bundles by your own an copy them into the folder <code>org.eclipse.skalli.target/target-platform-3rdparty</code> so that the target platform resolver can find them. |
− | '''1. | + | '''1. Download Missing 3rd-Party Libraries''' |
− | + | The following 3rd-party libraries are needed for Skalli: | |
<pre>org.restlet version="2.0.0.RC4" | <pre>org.restlet version="2.0.0.RC4" | ||
org.restlet.ext.servlet version="2.0.0.RC4 | org.restlet.ext.servlet version="2.0.0.RC4 | ||
Line 45: | Line 45: | ||
org.xmlpull version="1.1.4.c" | org.xmlpull version="1.1.4.c" | ||
com.vaadin version="6.4.0" | com.vaadin version="6.4.0" | ||
+ | osgi.enterprise version="4.2.0" | ||
+ | org.eclipse.gemini.jpa version="1.0.0.RC1" | ||
+ | org.eclipse.gemini.jpa.weaving version="1.0.0.RC1" | ||
+ | org.eclipse.gemini.dbaccess.derby version="1.0.0.M1-incubation" | ||
</pre> | </pre> | ||
− | + | ||
+ | Some of them provide OSGi bundles, so you can download them directly from the vendor or [http://repo2.maven.org/maven2 Maven Central], respectively: | ||
* [http://maven.restlet.org/org/restlet/jse/org.restlet/2.0-RC4/ org.restlet] | * [http://maven.restlet.org/org/restlet/jse/org.restlet/2.0-RC4/ org.restlet] | ||
Line 53: | Line 58: | ||
* [http://repo2.maven.org/maven2/org/codehaus/jettison/jettison/1.2/ org.codehaus.jettison.jettison] | * [http://repo2.maven.org/maven2/org/codehaus/jettison/jettison/1.2/ org.codehaus.jettison.jettison] | ||
* [http://repo2.maven.org/maven2/com/vaadin/vaadin/6.4.0/ com.vaadin] | * [http://repo2.maven.org/maven2/com/vaadin/vaadin/6.4.0/ com.vaadin] | ||
+ | * [http://www.eclipse.org/downloads/download.php?file=/gemini/dbaccess/r1.0/milestones/gemini-dbaccess-1.0.0.M1-incubation.zip org.eclipse.gemini.dbaccess.derby and osgi.enterprise] | ||
+ | * [http://www.eclipse.org/downloads/download.php?file=/gemini/jpa/r1.0/milestones/gemini-jpa-1.0.0.RC1.zip org.eclipse.gemini.jpa and org.eclipse.gemini.jpa.weaving] | ||
XStream, XMLUnit and XMlPull do not provide OSGi bundles, but you can use those from SpringSource: | XStream, XMLUnit and XMlPull do not provide OSGi bundles, but you can use those from SpringSource: | ||
Line 60: | Line 67: | ||
* [http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.xmlpull&version=1.1.4.c org.xmlpull] | * [http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.xmlpull&version=1.1.4.c org.xmlpull] | ||
− | + | For Lucene there are no suitable bundles available at SpringSource (only for older releases), but you can use those attached to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=346411 Bug 346411]: | |
− | + | ||
− | + | * [https://bugs.eclipse.org/bugs/attachment.cgi?id=196095 org.apache.lucene.lucene*] | |
− | + | ||
− | + | ||
− | + | ||
− | + | '''2. Set the Target Platform''' | |
− | Open <code>org.eclipse.skalli.target/skalli- | + | Open <code>org.eclipse.skalli.target/skalli-for-eclipse.target</code> in the Eclipse target editor. Wait a moment till all locations are resolved. Since the target platform contains some bundles from the Eclipse distribution and a complete Jetty runtime, it may take some time. |
− | + | Click the link "Set as Target Platform" in the upper right corner of the editor. This will rebuild all projects in the workspace. | |
− | '''3. | + | '''3. Add a missing class from VAADIN: <code>com.vaadin.ui.CustomField</code>''' |
− | + | After setting the target platform and rebuilding you should still see some compile errors, e.g. in the bundle <code>org.eclipse.skalli.view</code>. This is due to a missing class, <code>com.vaadin.ui.CustomField</code>, which is quite heavily used in Skalli, but unfortunatelly not yet part of the Vaadin distribution. | |
− | + | Therefore, unless we are allowed to include that class in our own source code, you have to download it by your own from the project's SVN repository at Google Code: [http://customfield.googlecode.com/svn-history/r5/trunk/src/com/vaadin/ui/CustomField.java CustomField.java]. Please use version 0.8.2 of that class since package names have been renamed from version 0.9.0 on. | |
− | + | Copy this file to <code>org.eclipse.skalli.view/src/main/java/com/vaadin/ui/CustomField.java</code>. | |
− | + | ||
− | + | Now all Skalli bundles should compile sucessfully. | |
= Run Skalli from IDE = | = Run Skalli from IDE = |
Revision as of 08:50, 22 June 2011
Contents
Development IDE Configuration
Skalli has Java 5.0 as a minimum requirement. It is recommended to use latest Eclipse release, classic edition is sufficient for development, but JavaEE edition is recommended due to JSP support. As Skalli source code is hosted in git, it is recommended to use EGit plugin too.
Note: As of 2011-05-10, Indigo release 3.7M7 is working well. Install EGit 0.12.1 from included software site at "Indigo - http://download.eclipse.org/releases/indigo".
Obtaining Sources
Skalli is hosted in Git. You can browse the repository in gitweb.
You can get the source code via git commandline tool
git clone git://git.eclipse.org/gitroot/skalli/org.eclipse.skalli.git
or cloning a repository using EGit from URI git://git.eclipse.org/gitroot/skalli/org.eclipse.skalli.git
.
Clone from master
branch and specify remote branch as origin/master
.
Now import all projects into your workspace. Import > Git > Projects from Git >
Select your cloned repo > Import existing projects > Select all projects > Finish
. You will import 29 projects (as of 2011-04-26).
Note: there will be compile errors, as some patches are needed for successful compilation.
Howto: Make Skalli Build in Eclipse (as of 2011-06-22)
After you cloned Skalli from Git you should see a couple of build errors. Due to the ongoing IP process for Skalli, we are not allowed to provide all necessary 3rd-party libraries as part of our source code (or in Eclipse Orbit) yet. Therefore, you need to download the missing bundles by your own an copy them into the folder org.eclipse.skalli.target/target-platform-3rdparty
so that the target platform resolver can find them.
1. Download Missing 3rd-Party Libraries
The following 3rd-party libraries are needed for Skalli:
org.restlet version="2.0.0.RC4" org.restlet.ext.servlet version="2.0.0.RC4 org.restlet.ext.xstream version="2.0.0.RC4 org.codehaus.jettison.jettison version="1.2.0" org.apache.lucene.lucene-core version="3.0.2" org.apache.lucene.lucene-highlighter version="3.0.2" org.apache.lucene.lucene-queries version="3.0.2" com.thoughtworks.xstream version="1.3.1" org.custommonkey.xmlunit version="1.2.0" org.xmlpull version="1.1.4.c" com.vaadin version="6.4.0" osgi.enterprise version="4.2.0" org.eclipse.gemini.jpa version="1.0.0.RC1" org.eclipse.gemini.jpa.weaving version="1.0.0.RC1" org.eclipse.gemini.dbaccess.derby version="1.0.0.M1-incubation"
Some of them provide OSGi bundles, so you can download them directly from the vendor or Maven Central, respectively:
- org.restlet
- org.restlet.ext.servlet
- org.restlet.ext.xstream
- org.codehaus.jettison.jettison
- com.vaadin
- org.eclipse.gemini.dbaccess.derby and osgi.enterprise
- org.eclipse.gemini.jpa and org.eclipse.gemini.jpa.weaving
XStream, XMLUnit and XMlPull do not provide OSGi bundles, but you can use those from SpringSource:
For Lucene there are no suitable bundles available at SpringSource (only for older releases), but you can use those attached to Bug 346411:
2. Set the Target Platform
Open org.eclipse.skalli.target/skalli-for-eclipse.target
in the Eclipse target editor. Wait a moment till all locations are resolved. Since the target platform contains some bundles from the Eclipse distribution and a complete Jetty runtime, it may take some time.
Click the link "Set as Target Platform" in the upper right corner of the editor. This will rebuild all projects in the workspace.
3. Add a missing class from VAADIN: com.vaadin.ui.CustomField
After setting the target platform and rebuilding you should still see some compile errors, e.g. in the bundle org.eclipse.skalli.view
. This is due to a missing class, com.vaadin.ui.CustomField
, which is quite heavily used in Skalli, but unfortunatelly not yet part of the Vaadin distribution.
Therefore, unless we are allowed to include that class in our own source code, you have to download it by your own from the project's SVN repository at Google Code: CustomField.java. Please use version 0.8.2 of that class since package names have been renamed from version 0.9.0 on.
Copy this file to org.eclipse.skalli.view/src/main/java/com/vaadin/ui/CustomField.java
.
Now all Skalli bundles should compile sucessfully.
Run Skalli from IDE
Skalli provides a launch configuration at skalli-jetty.launch
, which can be copied from this patch at [1] to project org.eclipse.skalli.target
. This launch configuration is using OSGi / Jetty provided WebContainer (RFC66) implementation. Required Jetty configuration files are provided within jetty folder (jetty/etc/jetty.xml
). The log files will be stored in jetty/logs
.
The Jetty working directory is expected to be in ${workspace_loc:org.eclipse.skalli.target}/workdir
. This directory has to be created first within your workspace, and will contain all persistent data of Skalli (in folder storage).
Jetty will run by default on port 8080. So start a browser to URL http://localhost:8080, and you should see a login dialog to authenticate. The default user configured is "admin", password "admin". Then you are able to create projects, edit projects, search projects etc. The created projects are located in org.eclipse.skalli.target/workdir/Storage/Projects/*.xml
.
TODO: icons are missing [2], get them into themes.
Build
Skalli builds run on build.eclipse.org via Hudson using
Hudson
TODO: mvn build actually does not work due to missing patches and a target definition using a location of type directory.
Run Tests
TODO: explain how to run tests in Eclipse, using Maven. Meanwhile use:
$ mvn clean install
Contributing Patches
Contributors a welcome to provide patches according to the Eclipse Committer Due Diligence Guidelines. In short: Create an issue on bugs.eclipse.org, create a patch (please use git format-patch
whenever possible because that makes it easier for us to integrate patches), and attach it to the bug entry. Make sure to follow the guidelines set forth below.
General Guidelines
- Make small commits, as small as reasonable. This makes them easy to review.
- Each commit should have a commit message (see details below) that explains very clearly what the commit sets out to achieve.
- The scope of a commit should be clear and easy to understand for others. Do not put different features/bug fixes/ideas into one and the same commit!
- Split larger features into multiple commits if that makes them easier to understand. Create an issue in bugs.eclipse.org/skalli to track the parts.
- Provide tests for your new features/bug fixes.
- Format your source code according to the formatting standards of the project prior to committing or providing a patch. All bundles come with project-specific formatter settings. Apply them!
Commit Message Guidelines
- The commit message header should fit on one line and should start with an uppercase letter
- The commit message have newline characters after every 60-70 characters.
- If a Gerrit Change-Id is available (for example when re-submitting to the same change), it should be added in the format below
- If there is an associated bug number in Bugzilla about it, it should come right before Gerrit's Change-Id entry (if available) or towards the end.
- A "Signed-off-by" should be added to the end of the commit message (see example below).
- The first sentence should be a clear and concise description about the change.
- Enter a newline before providing a more detailed description about the change.
Fix the commit dialog to respect the workbench's selection Originally, the commit dialog would automatically check off all files in the dialog. This behaviour contradicts a user's expectation because their selection in the workbench is completely ignored. The code has been corrected to only preselect what the user has actually selected. Bug: 12345 Change-Id: I71ac4844ab9d2f848352eba9252090c586b4146a Signed-off-by: Your Name <your.email@example.org>
Website
The Skalli website is located in a CVS repository on the Eclipse Foundation's servers.
- File > Import > CVS > Projects from CVS
- Select URL :pserver:anonymous@dev.eclipse.org/cvsroot/org.eclipse
- Use module skalli (from www)
- Finish