Jump to: navigation, search

Difference between revisions of "Lyo/BuildingOSLC4J"

< Lyo
(New page: = Building and Running Lyo reference implementations (RIOs) in Eclipse = == Prerequisites == * [http://eclipse.org/downloads Eclipse 3.6 or 3.7 IDE] * [http://eclipse.org/egit/download/ E...)
 
Line 26: Line 26:
 
* If you want to load the OSLC4J Change Management sample provider, repeat the above steps for the RIO Git repository:  git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.core.git
 
* If you want to load the OSLC4J Change Management sample provider, repeat the above steps for the RIO Git repository:  git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.core.git
  
== Import Eclipse projects from the git repository ==
+
== Import OSLC4J Eclipse projects from the git repository ==
* In the Git Repositories view, right click org.eclipse.lyo.rio and select Import Projects
+
* In the Git Repositories view, right click org.eclipse.lyo.core and select Import Projects
 
* Select the Import Existing Projects wizard and click next
 
* Select the Import Existing Projects wizard and click next
 
* Select all components of RIO
 
* Select all components of RIO
[[Image:Lyo-rio-import-projects.png]]
+
[[Image:Lyo-core-import-projects.png]]
 +
 
 +
== Build all projects ==
 +
* Expand the OSLC4JCoreRelEng project
 +
* Right click pom.xml -> Run As -> Maven clean
 +
* Right click pom.xml -> Run As -> Maven install
 +
 
 +
== Run the StockQuote sample application
 +
* By default, the sample applications require that the OSLC4JRegistry application be running on the Tomcat server running on port 8080 and the sample application running on the Tomcat server running on port 8081.
 +
* Go to the Server view (Window->Show View->Other and select Servers)
 +
* right click the server running on port 8080 and select Add and Remove
 +
* Add OSLC4JRegistry and start this server
 +
* Test that the server is running by going to this URL in a web browser:  http://localhost:8080/OSLC4JRegistry/catalog.  You should get an OSLC catalog document in response.
 +
* right click the server running on port 8081 and select Add and Remove
 +
* Add OSLC4JStockQuote and start this server
 +
* Test that the server is running by going to this URL in the web browser:  http://localhost:8081/OSLC4JStockQuote/stockQuotes.  You should get an OSLC response with some recent stock quotes (if you have internet connectivity).

Revision as of 10:44, 27 February 2012

Building and Running Lyo reference implementations (RIOs) in Eclipse

Prerequisites

Create an Apache Tomcat runtime environment in Eclipse

  • Tomcat is the default runtime for OSLC4J samples. Configuration for other runtimes (Jetty, etc) is possible.
  • See the Eclipse documentation for instructions on creating a Tomcat server. Be sure to name the server Apache Tomcat v7.0.
  • Create 1 server on port 8080 for the OSLC4JRegistry catalog application
  • Create 1 server on port 8081 for any sample applications you want to run. In the future, the config will change so all apps can run on the same port.

Clone the Lyo Core and RIO (optional, for Change Management sample) git repositories

This example assumes EGit is being used

Lyo-rio-git-core.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 OSLC4J 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
  • Select all components of RIO

Lyo-core-import-projects.png

Build all projects

  • Expand the OSLC4JCoreRelEng project
  • Right click pom.xml -> Run As -> Maven clean
  • Right click pom.xml -> Run As -> Maven install

== Run the StockQuote sample application

  • By default, the sample applications require that the OSLC4JRegistry application be running on the Tomcat server running on port 8080 and the sample application running on the Tomcat server running on port 8081.
  • Go to the Server view (Window->Show View->Other and select Servers)
  • right click the server running on port 8080 and select Add and Remove
  • Add OSLC4JRegistry and start this server
  • Test that the server is running by going to this URL in a web browser: http://localhost:8080/OSLC4JRegistry/catalog. You should get an OSLC catalog document in response.
  • right click the server running on port 8081 and select Add and Remove
  • Add OSLC4JStockQuote and start this server
  • Test that the server is running by going to this URL in the web browser: http://localhost:8081/OSLC4JStockQuote/stockQuotes. You should get an OSLC response with some recent stock quotes (if you have internet connectivity).