It's all about the answers!

Ask a question

OSLC Create artefact in different component


BENANNOUNE Yacine (133) | asked Jul 27 '18, 6:07 a.m.

Hello,


I'm using Eclipse LYO, i want to create an artefact in a specific component into my project area
How are you doing this?

Thanks

Accepted answer


permanent link
Jim Amsden (29347) | answered Aug 08 '18, 10:13 a.m.

The eclipse/Lyo OSLC4J java client does not yet support OSLC configuration management. However, you may be able to specify the Configuration-Context to use for creating resources using a receptor to set the header. Try something like this:


Header header = new BasicHeader("Configuration-Context",  "https://some-context-uri");
List<Header> headers = new ArrayList<Header>();
headers.add(header);
RequestDefaultHeaders defaultHeaders = new RequestDefaultHeaders(headers);
((DefaultHttpClient)client.getHttpClient()).addRequestInterceptor(defaultHeaders);

BENANNOUNE Yacine selected this answer as the correct answer

One other answer



permanent link
BENANNOUNE Yacine (133) | answered Aug 30 '18, 10:38 a.m.
edited Aug 30 '18, 10:40 a.m.

 Thanks, it's working.


I had to update the HttpClient, i was using the version 2.1 of EclipseLyo with HttpClient4.
you need 4.3 and above.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.