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

< Lyo
m
(adding a note at the top about where to find the OSLC4J-based RIOs)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Building and Running Lyo reference implementations (RIOs) in Eclipse =
+
= Building and Running Lyo reference implementations (RIOs) in Eclipse =
  
== Prerequisites ==
+
== OSLC4J-based RIOs  ==
* [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 RIO git repository ==
+
'''NOTE''': The instructions below are for the "old" RIOs. There are newer RIOs that leverage OSLC4J.
This example assumes EGit is being used
+
  
* Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
+
The Projects for the OSLC4J-based RIOs are in the same git repository as the "old" ones, namely:<br>&nbsp;&nbsp;&nbsp; git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git<br>and have names such as: <br>&nbsp;&nbsp;&nbsp;&nbsp; org.eclipse.lyo.oslc4j.changemanagement.  
* Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git as the URI. User/Password are not required.
+
[[Image:Lyo-rio-git-repo.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
+
Instructions for running the OSLC4J-based RIOs are on the [[Lyo/BuildingOSLC4J]] wiki page, e.g.: [http://wiki.eclipse.org/Lyo/BuildingOSLC4J#Run_the_Change_Management_sample_provider instructions for running the Change Management provider].
  
== Import Eclipse projects from the git repository ==
+
== Prerequisites  ==
* In the Git Repositories view, right click org.eclipse.lyo.rio and select Import Projects
+
* Select the Import Existing Projects wizard and click next
+
* Select all components of RIO
+
[[Image:Lyo-rio-import-projects.png]]
+
  
== Build the projects ==
+
*[http://eclipse.org/downloads Eclipse 3.6 or higher IDE]
* In the Eclipse Package Explorer view, select all RIO projects, right click and select Maven->Update Project Configuration and click OK
+
*[http://eclipse.org/egit/download/ EGit] team provider for git (recommended) or [http://git-scm.com/download git command line package].
* Build each project starting with org.eclipse.lyo.rio.core
+
*[http://www.eclipse.org/m2e/download/ m2e] for Maven support in the Eclipse IDE
** Expand the project
+
** Right click pom.xml and select Run As->Maven install. Depending on what plugins are in your Eclipse install, Maven might have to download dependencies
+
** After org.eclipse.lyo.rio.core, build org.eclipse.lyo.rio.template-webabb followed by the three reference webapps (CM, RM, AM) in any order.
+
* If org.eclipse.lyo.rio.core still shows an error, right click the project and select Maven->Update Project Configuration again.
+
  
== Run a reference implementation web application ==
+
== Clone the Lyo RIO git repository  ==
This example is for the CM provider.
+
 
* Select Run->Run Configurations and double click Maven Build
+
This example assumes EGit is being used
* Give the configuration a name
+
 
* Specify a base directory of '''${workspace_loc:/org.eclipse.lyo.rio.cm}''' and a goal of '''jetty:run-exploded''' and Click Run
+
*Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
[[Image:Lyo-rio-launch-config-2.png]]
+
*Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git as the URI. User/Password are not required.
 +
 
 +
[[Image:Lyo-rio-git-repo.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.rio and select Import Projects
 +
*Select the Import Existing Projects wizard and click next
 +
*Select all components of RIO
 +
 
 +
[[Image:Lyo-rio-import-projects.png]]
 +
 
 +
== Build the projects  ==
 +
 
 +
*In the Eclipse Package Explorer view, select all RIO projects, right click and select Maven-&gt;Update Project Configuration and click OK
 +
*Build each project (in the order described below) as follows:
 +
**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.)
 +
*Build order for RIO projects:
 +
**org.eclipse.lyo.rio.core
 +
**org.eclipse.lyo.rio.template-webapp
 +
**the others (e.g. AM, CM, RM), in any order
 +
*If org.eclipse.lyo.rio.core still shows an error, right click the project and select Maven-&gt;Update Project Configuration again.
 +
*'''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
 +
*'''If there is still a workspace error at this point, add target/generated-sources/antlr3 to the project build path.''' This will be fixed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=362524
 +
 
 +
== Run a reference implementation web application ==
 +
 
 +
This example is for the CM provider.  
 +
 
 +
*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.rio.cm}''' and a goal of '''jetty:run-exploded''' and Click Run
 +
 
 +
[[Image:Lyo-rio-launch-config-2.png]]  
  
 
You should now be able to point a local web browser at '''http://localhost:8080/rio-cm''' and start working with the reference implementation.
 
You should now be able to point a local web browser at '''http://localhost:8080/rio-cm''' and start working with the reference implementation.
Line 44: Line 70:
 
* [http://git-scm.com/download git command line package]
 
* [http://git-scm.com/download git command line package]
 
* [http://maven.apache.org/download.html Apache Maven]
 
* [http://maven.apache.org/download.html Apache Maven]
== Clone the RIO git repository
+
== Clone the RIO git repository ==
 
* git clone -b master git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git
 
* git clone -b master git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git
 
== Build the projects ==
 
== Build the projects ==
Line 60: Line 86:
  
 
You should now be able to point a local web browser at '''http://localhost:8080/rio-cm''' and start working with the reference implementation.
 
You should now be able to point a local web browser at '''http://localhost:8080/rio-cm''' and start working with the reference implementation.
 +
 +
Ctrl-C will stop it.

Latest revision as of 14:33, 15 August 2013

Building and Running Lyo reference implementations (RIOs) in Eclipse

OSLC4J-based RIOs

NOTE: The instructions below are for the "old" RIOs. There are newer RIOs that leverage OSLC4J.

The Projects for the OSLC4J-based RIOs are in the same git repository as the "old" ones, namely:
    git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git
and have names such as:
     org.eclipse.lyo.oslc4j.changemanagement.

Instructions for running the OSLC4J-based RIOs are on the Lyo/BuildingOSLC4J wiki page, e.g.: instructions for running the Change Management provider.

Prerequisites

Clone the Lyo RIO git repository

This example assumes EGit is being used

Lyo-rio-git-repo.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.rio and select Import Projects
  • Select the Import Existing Projects wizard and click next
  • Select all components of RIO

Lyo-rio-import-projects.png

Build the projects

  • In the Eclipse Package Explorer view, select all RIO projects, right click and select Maven->Update Project Configuration and click OK
  • Build each project (in the order described below) as follows:
    • Expand the project
    • Right click pom.xml and select Run As->Maven install. (Depending on what plugins are in your Eclipse install, Maven might have to download dependencies.)
  • Build order for RIO projects:
    • org.eclipse.lyo.rio.core
    • org.eclipse.lyo.rio.template-webapp
    • the others (e.g. AM, CM, RM), in any order
  • If org.eclipse.lyo.rio.core still shows an error, right click the project and select Maven->Update Project Configuration again.
  • 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:
  • If there is still a workspace error at this point, add target/generated-sources/antlr3 to the project build path. This will be fixed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=362524

Run a reference implementation web application

This example is for the CM provider.

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

Lyo-rio-launch-config-2.png

You should now be able to point a local web browser at http://localhost:8080/rio-cm and start working with the reference implementation.

Building and Running the Lyo RIO project using Git and Maven

Prerequistes

Clone the RIO git repository

Build the projects

  • Build Core
    • cd to org.eclipse.lyo.rio.core in git repository
    • mvn install
    • cd to org.eclipse.lyo.rio.template-webapp in git repository
    • mvn install
  • Build CM RIO (for example)
    • cd to org.eclipse.lyo.rio.cm
    • mvn install

Run a reference implementation web application

    • cd to the desired RIO directory (am/cm/rm)
    • mvn jetty:run-exploded

You should now be able to point a local web browser at http://localhost:8080/rio-cm and start working with the reference implementation.

Ctrl-C will stop it.

Back to the top