- 1 Building and Running the Lyo SharePoint Sample in Eclipse
- Eclipse 3.6 or 3.7 IDE
- EGit team provider for git (recommended) or git command line package.
- m2eclipse for Maven support in the Eclipse IDE
Clone the Lyo Server git repository
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.server.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 Eclipse projects from the git repository
- In the Git Repositories view, right click org.eclipse.lyo.server and select Import Projects
- Select the Import Existing Projects wizard and click Next
- Import the following projects:
- [Optional] Add the projects to a new working set.
Find and open the sharepoint.properties file.
Modify the values in the following key/value pairs:
The adapter_uri is used to specify the OSLC adapter which will sit between Microsoft SharePoint and Rational Team Concert (RTC). It should be a working URI for the OSLC adapter servlet, e.g. http://localhost:8080/OSLCSharepoint. This servlet provides an OSLC Catalog, Service provider, an example of Creation and Selection dialogs and a delegated UI for sharepoint documents.
Next, specify the Microsoft SharePoint service for OData by updating sharepoint_uri, usually this is specified by appending "_vti_bin/listdata.svc" to your Sharepoinnt server. (e.g.: http://www.sharepointserver.com:20001/_vti_bin/listdata.svc_.
Next, specify the basic authentication (userid, password) for accessing the SharePoint server at the address for sharepoint_uri.
Build the projects
- In the Eclipse Package Explorer view, select all the projects you've imported, right click, and select Maven->Update Project Configuration. Click OK.
- Run Maven Install on each project in this order,
- To run Maven Install,
- Expand the project
- Right click pom.xml and select 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
This SharePoint adapter looks through the sharepoint OData collections for collections where the ContentType is defined as "Document". For each SharePoint library that contains documents, an OSLC service provider is created with the basic services for OSLC Delegated dialogs for selection and creation as well as listing the documents with a UI preview.
- First, edit the sharepoint.properties with the URL and credentials for your SharePoint server. NOTE: The SharePoint IIS server must be configured to allow basic authentication.
- 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 org.eclipse.lyo.samples.sharepoint and start this server
- Test that the server is running by going to this URL in a web browser: http://localhost:8080/OSLCSharepoint. You should get the home page for your adapter. If sharepoint.properties is configured correctly, you should be able to select the catalog and see a list of SharePoint collections
In this scenario, there are three participants with these roles:
- Project Manager
- Design Architect
- Software Engineer
Rational Team Concert is widely recognized as a tool to manage the lifecycle processes for software: defect tracking, quality assurance, requirements management, and much more. In this scenario, a project manager has determined a customer request will require an architectural design change, and once the design change has been approved the modifications will be worked on by a software engineer.
Before the use of the Lyo SharePoint adapter: The Project Manager consults and discusses the customer's requested architecture change with a Design Architect who works for a business partner. The Design Architect manages design document changes using Microsoft Sharepoint and Microsoft Word in a separate system. The Project Manager and the Software engineer utilize RTC to manage the changes to the software. In this case, once the Project Manager discusses and approves the work to be completed by the Design Architect, he opens a workitem in RTC and assigns it to a Software Engineer. The Software Engineer has to email, IM or call the Design Architect until he/she determines the design changes have been approved.
After adding the Lyo SharePoint adapter: After the Project Manager consults with the Design Manager, he opens a workitem in RTC, and adds a link to the workitem which will allow the Software Engineer to readily determine the approval state of the design document kept in Sharepoint.
Before working with this scenario you will need to set-up your environment for the Lyo SharePoint adapter and modify the sharepoint.properties file.
First, configure the adapter as a "Friend" to RTC and connect your RTC project area to a SharePoint collection. Note: This requires JazzAdmin authority. You may need your RTC administrator's assistance.
- In the RTC administration pages, go to Application administration
- Configure Friends
- Add the SharePoint adapter as a friend. The URL should be https://hostname:8080/OSLCSharepoint/rootservices. Complete the wizard
- Go to Project Area administration and select the appropriate project area
- Under Associations, click Add
- Select the SharePoint Adapter friend
- Select Provides Change Requests as the association type
- Select the collection to associate with this project area and then Save the project area
Then you should be ready to try this adapter with RTC.
- Open a workitem in RTC.
- Navigate to the workitem.
- Select the Links tab
- Add Related Artefacts
- In the Resource URL, type or paste the URL from the Lyo SharePoint Adapter perspective. Usually, this will consists of the adapter_uri+"/resource/"+SharePoint Library+"/"+an identifier for the document in SharePoint. For example: http://localhost:8080/OSLCSharepoint/resource/Empire/22, would refer to the SharePoint document library and 22 is the identifier for the one of the saved documents.
- Save the workitem
If everything works correctly, when you hover over the workitem link you added above you should see a UI preview of a SharePoint document.
You should be able to select Show More and Show Less links in the hover dialog.
You should be able to select this link which will take you to the document in Microsoft SharePoint, and from there, you can open the document with Microsoft Word.
The Lyo SharePoint adapter also provides a catalog of services, a service provider for each document library in the ShareSharePointoint instance, an example of Delegated UI for Creation and Selection dialogs, as well as a list of documents saved in the SharePoint instance.
To access the catalog of services: http://localhost:8080/OSLCSharepoint/catalog
To access a service provider: http://localhost:8080/OSLCSharepoint/provider?collection=DocLib
To list all of the documents in the SharePoint document library: http://localhost:8080/OSLCSharepoint/list/resource?collection=DocLib
To access a service provider delegated selection UI: http://localhost:8080/OSLCSharepoint/selector?collection=DocLib
To access a service provider delegated creation UI: http://localhost:8080/OSLCSharepoint/creator?collection=DocLib
To access a single document as a resource: http://localhost:8080/OSLCSharepoint/resource/DocLib/22
Note: "DocLib" should be substituted for the the actual SharePoint instance document library.