Skip to main content
Jump to: navigation, search

Difference between revisions of "Lyo/BuildTRS4JBugzilla"

< Lyo
m
Line 15: Line 15:
 
== Clone the Lyo Docs, Core and Server Git repositories  ==
 
== Clone the Lyo Docs, Core and Server Git repositories  ==
  
The code resides in the Lyo docs repository since it is part of the [[Lyo/TRSWorkshop|TRS Workshop.]] and is built on top of [[Lyo/BuildOSLC4JBugzilla|OSLC-CM compatible adapter]], the same Git repositories are used. In addition to them, the following Git repository will be used to download the source of [[Lyo/TRSSDK|TRS]] SDK libraries.  
+
The code resides in the Lyo docs repository since it is part of the [[Lyo/TRSWorkshop|TRS Workshop]] and is built on top of [[Lyo/BuildOSLC4JBugzilla|OSLC-CM compatible adapter]], the same Git repositories are used. In addition to them, the following Git repository will be used to download the source of [[Lyo/TRSSDK|TRS]] SDK libraries.  
  
 
*<tt>git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.core.git</tt>
 
*<tt>git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.core.git</tt>

Revision as of 05:06, 10 April 2013

* DRAFT IN PROGRESS *

This application is an example of Tracked Resource Set(TRS) provider for the Bugzilla application. It is built on top of OSLC-CM compatible adapter which implements OSLC Change Management provider, so it is recommended to take a look at OSLC-CM compatible adapter as well.

This application uses the OSLC4J SDK as well as TRS SDK to build up the adapter from Plain Old Java Objects and relatively simple JAX-RS web services.

Building and Running the Lyo Bugzilla Sample in Eclipse

Prerequisites

In addition to the prerequisites of OSLC-CM compatible adapter, it requires the following SDK.

  • The TRS SDK libraries - currently must be built from source (see below)

Clone the Lyo Docs, Core and Server Git repositories

The code resides in the Lyo docs repository since it is part of the TRS Workshop and is built on top of OSLC-CM compatible adapter, the same Git repositories are used. In addition to them, the following Git repository will be used to download the source of TRS SDK libraries.

Import Eclipse projects from the Git repositories

  • In the Git Repositories view, right click org.eclipse.lyo.docs and select Import Projects
  • Select the Import Existing Projects wizard and click Next
  • Import the following projects:
    • org.eclipse.lyo.oslc4j.bugzilla.trs
  • 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.server.oauth.consumerstore
    • org.eclipse.lyo.server.oauth.core
    • org.eclipse.lyo.server.oauth.webapp
  • In the Git Repositories view, right click org.eclipse.lyo.core and select Import Projects
  • Select the Import Existing Projects wizard and click Next
  • Import the following projects:
    • org.eclipse.lyo.core.query
    • org.eclipse.lyo.core.trs
    • OSLC4J
    • OSLC4JJenaProvider
    • OSLC4JJson4JProvider
    • OSLC4JWink
  • [Optional] Add the projects to a new working set.
  • [Optional] You can download OSLC4JBugzilla project in org.eclipse.lyo.docs repository. When you will compare OSLC4JBugzilla and org.eclipse.lyo.oslc4j.bugzilla.trs projects, you will see what changes are made to implement TRS provider.

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. If you use Landfill, you will need to [ https://landfill.bugzilla.org/bugzilla-4.2-branch/createaccount.cgi create a userID ] for yourself .

  • 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 Bugzilla user ID. This ID has authority to manage OAuth consumers.


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
    • OSLC4JBugzilla
  • To run Maven Install,
    • Expand the project
    • Right click pom.xml and select Run As->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:
  • 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
  • Select the OSLC4JBugzilla launch and click Run

OSLC4JBugzillaLaunch.png

You should now be able to point a local web browser at http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton to see the OSLC Catalog and explore the service providers. OAuth users can be managed at the following URL: http://localhost:8080/OSLC4JBugzilla/services/oauth/admin. Provide your Bugzilla userid/password as configured in bugz.properties when prompted.

Back to the top