* [http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE

* [http://www.eclipse.org/m2e/download/ m2eclipse] for Maven support in the Eclipse IDE

Line 10:

Line 10:

The OSLC4J sample applications now use a Jetty app server as the default runtime. The samples will also work in an Eclipse IDE using a Tomcat runtime. See [http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.server.ui.doc.user%2Ftopics%2Ftomcat.html the Eclipse documentation] for instructions on creating a Tomcat server.

The OSLC4J sample applications now use a Jetty app server as the default runtime. The samples will also work in an Eclipse IDE using a Tomcat runtime. See [http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.server.ui.doc.user%2Ftopics%2Ftomcat.html the Eclipse documentation] for instructions on creating a Tomcat server.

+

== Options for running the OSLC4J Samples ==

+

+

You can develop and run OSLC4J samples one of 2 ways

+

+

* Build OSLC4J and samples from source

+

* Download the OSLC4J package with its dependencies [http://eclipse.org/lyo/download.php here] and add the jars to the classpath of your project

+

+

The remainder of this document explains the process for building from source.

* Test that the server is running by going to this URL in the web browser: http://localhost:8080/OSLC4JStockQuote/stockQuotes. You should get an OSLC response with some ChangeRequest resources.

+

* Test that the server is running by going to this URL in the web browser: http://localhost:8080/OSLC4JStockQuote/stockQuotes. You should get an OSLC response with some recent stock quotes (if you have internet connectivity).

** The OSLC Catalog entry for this application can be found at http://localhost:8080/OSLC4JRegistry/catalog/singleton

** The OSLC Catalog entry for this application can be found at http://localhost:8080/OSLC4JRegistry/catalog/singleton

Line 52:

Line 60:

'''Note:''' the sample UIs for the Change Management sample provider have not yet been committed to Eclipse. The delegated selection and creation dialogs will not work yet

'''Note:''' the sample UIs for the Change Management sample provider have not yet been committed to Eclipse. The delegated selection and creation dialogs will not work yet

* From the Git Repository view, right click the <tt>git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git</tt> repository (browse it also [http://git.eclipse.org/c/lyo/org.eclipse.lyo.rio.git/ on line]) and import projects :

* From the Git Repository view, right click the <tt>git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.rio.git</tt> repository (browse it also [http://git.eclipse.org/c/lyo/org.eclipse.lyo.rio.git/ on line]) and import projects :

−

** Select the OSLC4JChangeManagement, OSLC4JChangeManagementCommon and OSLC4JChangeManagementTest projects. The other projects in the rio repository are unrelated to OSLC4J. See [[Lyo/LyoRio|Lyo RIOs]] for information on these other reference implementations.

+

** Select the OSLC4JChangeManagement, OSLC4JChangeManagementCommon and OSLC4JChangeManagementTest projects. The other projects in the rio repository are unrelated to OSLC4J. See [[Lyo/LyoRIO|Lyo RIOs]] for information on these other reference implementations.

* Build each CM project by right clicking its pom.xml and selecting Run As->Maven install. Build them in this order:

* Build each CM project by right clicking its pom.xml and selecting Run As->Maven install. Build them in this order:

* OSLC4JChangeManagementCommon

* OSLC4JChangeManagementCommon

Line 60:

Line 68:

* Expand the Maven Build section

* Expand the Maven Build section

* Select '''Launch OSLC4JChangeManagement''' and click Run

* Select '''Launch OSLC4JChangeManagement''' and click Run

−

* Test that the server is running by going to this URL in the web browser: http://localhost:8080/OSLC4JChangeManagement/changeRequests. You should get an OSLC response with some recent stock quotes (if you have internet connectivity).

+

* Test that the server is running by going to this URL in the web browser: http://localhost:8080/OSLC4JChangeManagement/changeRequests. You should get an OSLC response with some ChangeRequest resources.

** The OSLC Catalog entry for this application can be found at http://localhost:8080/OSLC4JRegistry/catalog/singleton

** The OSLC Catalog entry for this application can be found at http://localhost:8080/OSLC4JRegistry/catalog/singleton

Line 88:

Line 96:

−

== OSLC4JRegistry web application ==

+

= The OSLC4JRegistry web application =

The OSLC4J StockQuote, Test, ChangeManagement and QualityManagement all use the OSLC4JRegistry web application as an OSLC Catalog. When each application starts, it registers its OSLC service provider details with OSLC4JRegistry.

The OSLC4J StockQuote, Test, ChangeManagement and QualityManagement all use the OSLC4JRegistry web application as an OSLC Catalog. When each application starts, it registers its OSLC service provider details with OSLC4JRegistry.

Line 94:

Line 102:

* Edit the pom.xml for the sample application and remove the following lines:

* Edit the pom.xml for the sample application and remove the following lines:

Prerequisites

OSLC4J 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.

OSLC4J Sample Application runtimes

The OSLC4J sample applications now use a Jetty app server as the default runtime. The samples will also work in an Eclipse IDE using a Tomcat runtime. See the Eclipse documentation for instructions on creating a Tomcat server.

Options for running the OSLC4J Samples

You can develop and run OSLC4J samples one of 2 ways

Build OSLC4J and samples from source

Download the OSLC4J package with its dependencies here and add the jars to the classpath of your project

The remainder of this document explains the process for building from source.

Select the OSLC4JChangeManagement, OSLC4JChangeManagementCommon and OSLC4JChangeManagementTest projects. The other projects in the rio repository are unrelated to OSLC4J. See Lyo RIOs for information on these other reference implementations.

Build each CM project by right clicking its pom.xml and selecting Run As->Maven install. Build them in this order:

Select the OSLC4JQualityManagement, OSLC4JQualityManagementCommon and OSLC4JQualityManagementTest projects. The other projects in the rio repository are unrelated to OSLC4J. See Lyo RIOs for information on these other reference implementations.

Build each QM project by right clicking its pom.xml and selecting Run As->Maven install. Build them in this order:

Run the Quality Management JUnit tests

Expand the OSLC4JQualityManagementTest project down to the Java source

Right click AllTests.java -> Run As -> JUnit test

Results will appear in the JUnit view

The OSLC4JRegistry web application

The OSLC4J StockQuote, Test, ChangeManagement and QualityManagement all use the OSLC4JRegistry web application as an OSLC Catalog. When each application starts, it registers its OSLC service provider details with OSLC4JRegistry.

The sample applications are currently configured to automatically launch the OSLC4JRegistry in the same application server as the sample application and register with this local OSLC4JRegistry instance. If you wish to change this behavior and have the applications register with a remote OSLC4JRegistry, two changes are required.

Edit the pom.xml for the sample application and remove the following lines: