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

< Lyo
(New page: = Building and Running the LDP reference implementation in Eclipse = == Prerequisites == * [http://eclipse.org/downloads Eclipse 3.6 or higher IDE] * [http://eclipse.org/egit/download/ EG...)
 
(Prerequisites)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
= Building and Running the LDP reference implementation in Eclipse =
 
= Building and Running the LDP reference implementation in Eclipse =
 +
 +
The Lyo LDP sample is a Java implementation of the [https://dvcs.w3.org/hg/ldpwg/raw-file/default/ldp.html W3C Linked Data Platform 1.0 Candidate Recommendation] using JAX-RS ([http://cxf.apache.org/ Apache CXF]) and [http://jena.apache.org/documentation/tdb/ Jena TDB]. It is meant to be a reference implementation, but could be the basis for real LDP servers.
 +
 +
See the [http://w3c.github.io/ldp-testsuite/report/ldp.html Lyo LDP Implemntation Report] for capabilities and conformance.
  
 
== Prerequisites ==
 
== 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
 
* 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  ==
+
See [[Lyo/prereqs]].
 +
 
 +
== LDP Sample Application runtimes  ==
  
 
The LDP reference implementation uses a Jetty app server as the default runtime.
 
The LDP reference implementation uses a Jetty app server as the default runtime.
Line 29: Line 31:
 
* Select the projects:
 
* Select the projects:
 
** org.eclipse.lyo.ldp.build
 
** org.eclipse.lyo.ldp.build
** org.eclipse.lyo.ldp.sample
+
** org.eclipse.lyo.ldp.sample.loaders
** org.eclipse.lyo.ldp.sampe.bugtracker
+
** org.eclipse.lyo.ldp.sample.networth
+
 
** org.eclipse.lyo.ldp.server
 
** org.eclipse.lyo.ldp.server
 
** org.eclipse.lyo.ldp.server.jena
 
** org.eclipse.lyo.ldp.server.jena
Line 52: Line 52:
 
* Go to Run->Run Configurations
 
* Go to Run->Run Configurations
 
* Expand the Maven Build section
 
* Expand the Maven Build section
* Select '''Launch LDP Server with Sample Data''' and click Run
+
* Select '''Launch LDP Server''' and click Run
 
* Test that the server is running by going to this URL in the web browser:  http://localhost:8080/ldp
 
* Test that the server is running by going to this URL in the web browser:  http://localhost:8080/ldp
 +
 +
<blockquote>'''NOTE:''' The LDP Server now supports Basic Authentication, and needs to run with the following default username ''ldpuser'' and password ''ldpuser''.</blockquote>
 +
 +
= Building and Running the LDP reference implementation from Command Line =
 +
 +
* Fetch the source code
 +
<pre>$ git clone http://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.ldp.git</pre>
 +
* Step into source directory
 +
<pre>$ cd org.eclipse.lyo.ldp</pre>
 +
* Build the source
 +
<pre>$ mvn -f org.eclipse.lyo.ldp.build/pom.xml install </pre>
 +
* Run the server (not it runs in the foreground process, so you may want to bg it)
 +
<pre>$ mvn -f org.eclipse.lyo.ldp.webapp/pom.xml jetty:run</pre>
 +
* Start using it, load URL in browser or
 +
<pre>$ curl -u ldpuser:ldpuser http://localhost:8080/ldp/resources</pre>
 +
 +
= References =
 +
* [[Lyo/LDPImpl | LDP implementation (progress and details)]]
 +
* [https://github.com/w3c/ldp-testsuite W3C **Official** Test Suite on github]
 +
* [[Lyo/LDPTestSuiteExploration | LDP Test Suite (exploration)]]

Latest revision as of 12:49, 13 January 2015

Building and Running the LDP reference implementation in Eclipse

The Lyo LDP sample is a Java implementation of the W3C Linked Data Platform 1.0 Candidate Recommendation using JAX-RS (Apache CXF) and Jena TDB. It is meant to be a reference implementation, but could be the basis for real LDP servers.

See the Lyo LDP Implemntation Report for capabilities and conformance.

Prerequisites

See Lyo/prereqs.

LDP Sample Application runtimes

The LDP reference implementation uses a Jetty app server as the default runtime.

Note: If you're running these examples on Windows, make sure you don't have spaces in your workspace path. The samples might not launch.

Clone the Lyo LDP git repositories

This example assumes EGit is being used

  • 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 the LDP reference implementation projects from the git repository

  • In the Git Repositories view, right click org.eclipse.lyo.ldp and select Import Projects
  • Select the Import Existing Projects wizard and click next
  • Select the projects:
    • org.eclipse.lyo.ldp.build
    • org.eclipse.lyo.ldp.sample.loaders
    • org.eclipse.lyo.ldp.server
    • org.eclipse.lyo.ldp.server.jena
    • org.eclipse.lyo.ldp.webapp

Build all projects

To build the projects.

  • Expand the org.eclipse.lyo.ldp.build project
  • Right click pom.xml -> Run As -> Maven clean
  • Right click pom.xml -> 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:

Run the LDP samples

  • Go to Run->Run Configurations
  • Expand the Maven Build section
  • Select Launch LDP Server and click Run
  • Test that the server is running by going to this URL in the web browser: http://localhost:8080/ldp
NOTE: The LDP Server now supports Basic Authentication, and needs to run with the following default username ldpuser and password ldpuser.

Building and Running the LDP reference implementation from Command Line

  • Fetch the source code
$ git clone http://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.ldp.git
  • Step into source directory
$ cd org.eclipse.lyo.ldp
  • Build the source
$ mvn -f org.eclipse.lyo.ldp.build/pom.xml install 
  • Run the server (not it runs in the foreground process, so you may want to bg it)
$ mvn -f org.eclipse.lyo.ldp.webapp/pom.xml jetty:run
  • Start using it, load URL in browser or
$ curl -u ldpuser:ldpuser http://localhost:8080/ldp/resources

References

Back to the top