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/BuildClient"

< Lyo
(Replaced content with "'''Eclipse Lyo documentation has moved to its new site under the [http://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html OSLC Developer Guide], wh...")
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
The Lyo Client provides helpful APIs and sample code that can be used to interact with OSLC Service Providers.  It provides an additional layer of functionality on top of Apache HttpClient, Apache Wink, and OSLC4J that can give you a head start on some of the common use cases such as form login, OAuth handling, service discovery, sending queries, and processing query results.  It also provides sample code that demonstrates how to use the Lyo client in interesting ways, such as acting as a remote agent for an OSLC Automation service provider.
+
'''Eclipse Lyo documentation has moved to its new site under the [http://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html OSLC Developer Guide], where you can find even more resources for developing OSLC applications.
 
+
'''
= Building the Lyo Client in Eclipse =
+
 
+
== Prerequisites  ==
+
 
+
*[http://eclipse.org/downloads Eclipse 3.6 or higher 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
+
*Lyo client requires a Java 1.6 compiler and Java 1.6 runtime. The Eclipse project settings have been set appropriately. If you are building outside of Eclipse, please use Java 1.6.
+
 
+
== Clone the Lyo Core 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.core.git</tt> as the URI (browse it also [http://git.eclipse.org/c/lyo/org.eclipse.lyo.core.git/ on line]). User/Password are not required.
+
 
+
[[Image:Lyo_client_core_git.png]]
+
 
+
*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.core and select Import Projects
+
*Select the Import Existing Projects wizard and click Next
+
*Import the following projects:
+
**OSLC4J
+
**OSLC4JJenaProvider
+
**OSLC4JJson4JProvider
+
 
+
You may import the other projects if you like, but they are not required for building the client.
+
 
+
[[Image:Lyo_core_import_projects.png]]
+
 
+
*[Optional] Add the projects to a new working set.
+
 
+
== Build all projects ==
+
* Expand the OSLC4J project
+
* Right click pom.xml -> Run As -> Maven clean
+
* Right click pom.xml -> Run As -> Maven install
+
* Repeat these steps for the OSLC4JJenaProvider and OSLC4JJson4JProvider projects
+
 
+
== 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.
+
 
+
[[Image:Lyo_server_clone_git.png]]
+
 
+
*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 project:
+
**org.eclipse.lyo.server.oauth.core
+
 
+
You may import the other projects if you like, but they are not required for building the client.
+
 
+
[[Image:Lyo_server_import_projects.png]]
+
 
+
*[Optional] Add the projects to a new working set.
+
 
+
== Build the project ==
+
* Expand the org.eclipse.lyo.server.oauth.core project
+
* Right click pom.xml -> Run As -> Maven clean
+
* Right click pom.xml -> Run As -> Maven install
+
 
+
== Clone the Lyo Client 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.client.git</tt> as the URI (browse it also [http://git.eclipse.org/c/lyo/org.eclipse.lyo.client.git/ on line]). User/Password are not required.
+
 
+
[[Image:lyo_client_clone_git.png]]
+
 
+
*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.client and select Import Projects
+
*Select the Import Existing Projects wizard and click Next
+
*Import the following projects:
+
**org.eclipse.lyo.client.java
+
**org.eclipse.lyo.samples.clients
+
 
+
[[Image:Lyo_client_import_projects.png]]
+
 
+
*[Optional] Add the projects to a new working set.
+
 
+
== Build all projects ==
+
* Expand the org.eclipse.lyo.clients.java project
+
* Right click pom.xml -> Run As -> Maven clean
+
* Right click pom.xml -> Run As -> Maven install
+
* Repeat these steps for the org.eclipse.lyo.samples.client project
+
 
+
= Running the Lyo Client samples in Eclipse  =
+
 
+
The '''org.eclipse.lyo.samples.clients''' project contains sample code that uses the Lyo client to interact with OSLC Service Providers in various ways.
+
 
+
== GenericCMSample ==
+
 
+
This sample demonstrates how to use the Lyo client to interact with a Change Management (CM) Service Provider in the following ways:
+
* run an OLSC ChangeRequest query and retrieve OSLC ChangeRequests and de-serialize them as Java objects
+
* retrieve an OSLC ChangeRequest and print it as XML
+
* create a new ChangeRequest
+
* update an existing ChangeRequest
+
 
+
To run the sample you first need to follow the instructions to build and run the [[Lyo/BuildRIO | Change Management Reference Implementation]]. Then you can create a launch configuration in eclipse to run GenericCMSample as a java application, passing in values for the command line arguments as shown below:
+
 
+
[[Image:RunGenericCMSample.png]]
+
 
+
== RQMFormSample ==
+
 
+
This sample demonstrates how to use the Lyo client to interact with a Quality Management (QM) Service Provider such as Rational Quality Manager in the following ways:
+
* run an OLSC TestResult query and retrieve OSLC TestResults and de-serialize them as Java objects
+
* retrieve an OSLC TestResult and print it as XML
+
* create a new TestCase
+
* update an existing TestCase
+
 
+
To run this sample you can install and configure a Quality Management V2 service provider such as Rational Quality Manager.   Then create a launch configuration in eclipse to run RQMFormSample as a java application, passing in values for the command line arguments as shown below:
+
 
+
[[Image:RunRQMFormSample.png]]
+

Latest revision as of 04:44, 24 September 2019

Eclipse Lyo documentation has moved to its new site under the OSLC Developer Guide, where you can find even more resources for developing OSLC applications.

Back to the top