Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Lyo/BuildBugzilla"

< Lyo
(Building and Running the Lyo Bugzilla Sample in Eclipse)
m (Prerequisites)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Building and Running the Lyo Bugzilla Sample in Eclipse =
+
This application is an example of what Eclipse Lyo can be used for, in the form of an OSLC-CM compatible adapter for the Bugzilla bugtracker application. It wraps Bugzilla (interacting with it through Bugzilla's native XMLRPC API) with an OSLC-CM provider server accessible through REST calls.
  
== Prerequisites ==
+
= Building and Running the Lyo Bugzilla Sample in Eclipse =
* [http://eclipse.org/downloads Eclipse 3.6 or 3.7 IDE]
+
* [http://eclipse.org/egit/download/ EGit] team provider for git (recommended) or [http://git-scm.com/download git command line package].
+
* [http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE
+
  
== Clone the Lyo Server git repository ==
+
== Prerequisites  ==
This example assumes EGit is being used.
+
  
* Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
+
*[http://eclipse.org/downloads Eclipse 3.6 or higher IDE]
* Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.server.git as the URI. User/Password are not required.
+
*[http://eclipse.org/egit/download/ EGit] team provider for git (recommended) or [http://git-scm.com/download git command line package].
* On the Branch Selection page, select the master branch
+
*[http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE
* On the Local Destination page, specify a location or accept the default and click Finish
+
 
 +
== Clone the Lyo Server git repository  ==
 +
 
 +
This example assumes EGit is being used.
 +
 
 +
*Open the Git Repositories view in Eclipse and click the Clone Git Repository icon  
 +
*Use <tt>git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.server.git</tt> as the URI (browse it also [http://git.eclipse.org/c/lyo/org.eclipse.lyo.server.git/ on line]). User/Password are not required.  
 +
*On the Branch Selection page, select the master branch  
 +
*On the Local Destination page, specify a location or accept the default and click Finish
  
 
The repository should now show up in your Git Repositories view.
 
The repository should now show up in your Git Repositories view.
  
== Import Eclipse projects from the git repository ==
+
== Import Eclipse projects from the git repository ==
* In the Git Repositories view, right click org.eclipse.lyo.server and select Import Projects
+
 
* Select the Import Existing Projects wizard and click Next
+
*In the Git Repositories view, right click org.eclipse.lyo.server and select Import Projects  
* Import the following projects:
+
*Select the Import Existing Projects wizard and click Next  
** org.eclipse.lyo.samples.bugzilla
+
*Import the following projects:  
** org.eclipse.lyo.server.oauth.consumerstore
+
**org.eclipse.lyo.samples.bugzilla  
** org.eclipse.lyo.server.oauth.core
+
**org.eclipse.lyo.server.oauth.consumerstore  
** org.eclipse.lyo.server.oauth.webapp
+
**org.eclipse.lyo.server.oauth.core  
 +
**org.eclipse.lyo.server.oauth.webapp
 +
 
 +
[[Image:BugzillaImport.png]]
 +
 
 +
*[Optional] Add the projects to a new working set.
 +
 
 +
== Edit the Bugzilla configuration  ==
 +
 
 +
The sample requires Bugzilla 4.0. By default, it uses the [http://landfill.bugzilla.org/ Bugzilla Landfill] test server, but you can specify your own.
 +
 
 +
*Edit org.eclipse.lyo.samples.bugzilla/src/main/resources/bugz.properties.
 +
**Change the bugzilla_uri property to the URL of your Bugzilla server.
 +
**Change the admin property to your user ID. This ID has authority to manage OAuth consumers.
 +
*Edit org.eclipse.lyo.samples.bugzilla/src/test/resources/test.properties.
 +
**Enter your ID and password for the JUnit tests.
  
 
== Build the projects  ==
 
== Build the projects  ==
  
*In the Eclipse Package Explorer view, select all the projects you've imported, right click, and select Maven-&gt;Update Project Configuration. Click OK.
+
*In the Eclipse Package Explorer view, select all the projects you've imported, right click, and select Maven-&gt;Update Project Configuration. Click OK.  
*For each project,
+
*Run Maven Install on each project in this order,
 +
** org.eclipse.lyo.server.oauth.core
 +
** org.eclipse.lyo.server.oauth.consumerstore
 +
** org.eclipse.lyo.server.oauth.webapp
 +
** org.eclipse.lyo.server.samples.bugzilla
 +
*To run Maven Install,  
 
**Expand the project  
 
**Expand the project  
**Right click pom.xml and select Run As-&gt;Maven install. Depending on what plugins are in your Eclipse install, Maven might have to download dependencies.
+
**Right click pom.xml and select Run As-&gt;Maven install.
*'''IBM JVM/JRE Users:'''  There is an issue with m2eclipse and the the IBM JRE.  If you have see the error '''java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder''' when running a Maven install, you need to copy a newer slf4j api jar into your JRE directory to work around the issue until it is fixed:
+
 
** Download [http://slf4j.org/dist/slf4j-1.6.2.zip slf4j-1.6.2.zip] and extract the zip.
+
[[Image:MavenInstall.png]]  
** copy slf4j-api-1.6.2.jar from the slf4j distribution to the JAVA_HOME\jre\lib\ext directory
+
** See https://bugs.eclipse.org/bugs/show_bug.cgi?id=338252 if you are interested in the details
+
  
== Edit the Bugzilla configuration ==
+
*'''IBM JVM/JRE Users:''' There is an issue with m2eclipse and the the IBM JRE. If you have see the error '''java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder''' when running a Maven install, you need to copy a newer slf4j api jar into your JRE directory to work around the issue until it is fixed:
 +
**Download [http://slf4j.org/dist/slf4j-1.6.2.zip slf4j-1.6.2.zip] and extract the zip.
 +
**copy slf4j-api-1.6.2.jar from the slf4j distribution to the JAVA_HOME\jre\lib\ext directory
 +
**See https://bugs.eclipse.org/bugs/show_bug.cgi?id=338252 if you are interested in the details
  
The sample requires Bugzilla 4.0. By default, it uses the [http://landfill.bugzilla.org/ Bugzilla Landfill] test server, but you can specify your own.
+
* You may need to check [http://git.eclipse.org/c/lyo/org.eclipse.lyo.server.git/tree/org.eclipse.lyo.samples.bugzilla/README.txtorg.eclipse.lyo.server.samples.bugzilla's README.txt] for instructions on how to install the missing <tt>j2bugzilla</tt> dependency in case the Maven install fails for this project.
  
* Edit org.eclipse.lyo.samples.bugzilla/src/main/resources/bugz.properties.
+
== Run the Bugzilla sample web application  ==
* Change the bugzilla_uri property to the URL of your Bugzilla server.
+
* Change the admin property to your user ID. This ID has authority to manage OAuth consumers.
+
* Edit org.eclipse.lyo.samples.guzilla/src/test/resources/test.properties.
+
* Enter your ID and password for the JUnit tests.
+
  
== Run the Bugzilla sample web application ==
+
*Select Run-&gt;Run Configurations and double click Maven Build
 +
*Give the configuration a name
 +
*Specify a base directory of '''${workspace_loc:/org.eclipse.lyo.samples.bugzilla}''' and a goal of '''jetty:run-exploded''' and Click Run
  
* Select Run->Run Configurations and double click Maven Build
+
[[Image:BugzillaLaunch.png]]
* Give the configuration a name
+
* Specify a base directory of '''${workspace_loc:/org.eclipse.lyo.samples.bugzilla}''' and a goal of '''jetty:run-exploded''' and Click Run
+
  
You should now be able to point a local web browser at '''http://localhost:8888/bugz'''.
+
You should now be able to point a local web browser at '''http://localhost:8282/bugz'''. See the [http://open-services.net/resources/tutorials/integrating-products-with-oslc/ OSLC Tutorial] for more about the Bugzilla adapter and OSLC.

Latest revision as of 15:11, 18 September 2012

This application is an example of what Eclipse Lyo can be used for, in the form of an OSLC-CM compatible adapter for the Bugzilla bugtracker application. It wraps Bugzilla (interacting with it through Bugzilla's native XMLRPC API) with an OSLC-CM provider server accessible through REST calls.

Building and Running the Lyo Bugzilla Sample in Eclipse

Prerequisites

Clone the Lyo Server git repository

This example assumes EGit is being used.

  • Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
  • Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.server.git as the URI (browse it also on line). User/Password are not required.
  • On the Branch Selection page, select the master branch
  • On the Local Destination page, specify a location or accept the default and click Finish

The repository should now show up in your Git Repositories view.

Import Eclipse projects from the git repository

  • In the Git Repositories view, right click org.eclipse.lyo.server and select Import Projects
  • Select the Import Existing Projects wizard and click Next
  • Import the following projects:
    • org.eclipse.lyo.samples.bugzilla
    • org.eclipse.lyo.server.oauth.consumerstore
    • org.eclipse.lyo.server.oauth.core
    • org.eclipse.lyo.server.oauth.webapp

BugzillaImport.png

  • [Optional] Add the projects to a new working set.

Edit the Bugzilla configuration

The sample requires Bugzilla 4.0. By default, it uses the Bugzilla Landfill test server, but you can specify your own.

  • Edit org.eclipse.lyo.samples.bugzilla/src/main/resources/bugz.properties.
    • Change the bugzilla_uri property to the URL of your Bugzilla server.
    • Change the admin property to your user ID. This ID has authority to manage OAuth consumers.
  • Edit org.eclipse.lyo.samples.bugzilla/src/test/resources/test.properties.
    • Enter your ID and password for the JUnit tests.

Build the projects

  • In the Eclipse Package Explorer view, select all the projects you've imported, right click, and select Maven->Update Project Configuration. Click OK.
  • Run Maven Install on each project in this order,
    • org.eclipse.lyo.server.oauth.core
    • org.eclipse.lyo.server.oauth.consumerstore
    • org.eclipse.lyo.server.oauth.webapp
    • org.eclipse.lyo.server.samples.bugzilla
  • To run Maven Install,
    • Expand the project
    • Right click pom.xml and select Run As->Maven install.

MavenInstall.png

  • IBM JVM/JRE Users: There is an issue with m2eclipse and the the IBM JRE. If you have see the error java.lang.NoClassDefFoundError: org.slf4j.impl.StaticLoggerBinder when running a Maven install, you need to copy a newer slf4j api jar into your JRE directory to work around the issue until it is fixed:
  • You may need to check README.txt for instructions on how to install the missing j2bugzilla dependency in case the Maven install fails for this project.

Run the Bugzilla sample web application

  • Select Run->Run Configurations and double click Maven Build
  • Give the configuration a name
  • Specify a base directory of ${workspace_loc:/org.eclipse.lyo.samples.bugzilla} and a goal of jetty:run-exploded and Click Run

BugzillaLaunch.png

You should now be able to point a local web browser at http://localhost:8282/bugz. See the OSLC Tutorial for more about the Bugzilla adapter and OSLC.

Back to the top