Difference between revisions of "Lyo/BuildLDPSample"
(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...)
Revision as of 16:03, 26 July 2013
Building and Running the LDP reference implementation in Eclipse
- Eclipse 3.6 or higher IDE
- EGit team provider for git (recommended) or git command line package.
- 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
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
- Open the Git Repositories view in Eclipse and click the Clone Git Repository icon
- Use git://git.eclipse.org/gitroot/lyo/org.eclipse.lyo.ldp.git as the URI (browse it also on line). User/Password are not required.
- 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:
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:
- Download 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
Run the LDP samples
- Go to Run->Run Configurations
- Expand the Maven Build section
- Select Launch LDP Server with Sample Data and click Run
- Test that the server is running by going to this URL in the web browser: http://localhost:8080/ldp