| Summary: | [build] create Hudson JAXB model | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Markus Knittig <markus> | ||||||||||
| Component: | Mylyn | Assignee: | Markus Knittig <markus> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | enhancement | ||||||||||||
| Priority: | P3 | CC: | steffen.pingel | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | 0.7 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Markus Knittig
Created attachment 168550 [details]
ant build
Created attachment 168552 [details]
primary xml schema for Hudson
Created attachment 168554 [details]
OSGi jaxb dependency
Dependecies for the ant build: http://knittig.de/temp/ant-dependencies.zip Contains the following jars (all from public Maven repositories): * jaxb-api-2.0.jar * jaxb-impl-2.0.jar * jaxb-xjc-2.0.jar * stax-api-1.0.jar * activation-1.1.jar Created attachment 168572 [details]
ant build
Better replace 'model' with 'primaryview' since there are more than one schema for the Hudson API. Thanks. I was able to generate the source files locally but I'll need to check with the legal team if there are any concerns with committing the generated files to CVS. Can you take a look at http://download.eclipse.org/tools/orbit/downloads/drops/S20100514103823/ and let me know which of the Orbit bundles (e.g. com.sun.xml.bind) we would need? Do you have any experience with Apache JaxMe which is also available in Orbit? (In reply to comment #7) > Thanks. I was able to generate the source files locally but I'll need to check > with the legal team if there are any concerns with committing the generated > files to CVS. Can you take a look at > http://download.eclipse.org/tools/orbit/downloads/drops/S20100514103823/ and > let me know which of the Orbit bundles (e.g. com.sun.xml.bind) we would need? com.sun.xml.bind, which is already used by Mylyn. > Do you have any experience with Apache JaxMe which is also available in Orbit? No, but since it's just another JAXB implementation, there shouldn't be much difference. Thanks. I have requested CQs for the 2.2 versions of the javax.xml.bind and com.sun.xml.bind Orbit bundles. Did you create the xsd yourself or did that come from Hudson? Can you post a short example what a repository connection through JAXB would look like? (In reply to comment #9) > Thanks. I have requested CQs for the 2.2 versions of the javax.xml.bind and > com.sun.xml.bind Orbit bundles. Ups, sorry, com.sun.xml.bind isn't needed, only javax.xml.bind. > Did you create the xsd yourself or did that come from Hudson? From Hudson (created by JAXB from the model I guess). > Can you post a short example what a repository connection > through JAXB would look like? Like this (simplified): GetMethod jobsRequest = new GetMethod(hudsonUrl + "/api/xml"); String response = httpClient.executeMethod(jobsRequest); JAXBContext ctx = JAXBContext.newInstance(HudsonModelHudson.class); Unmarshaller unmarshaller = ctx.createUnmarshaller(); JAXBElement<HudsonModelHudson> hudsonRoot = unmarshaller.unmarshal(new StringReader(response), HudsonModelHudson.class); HudsonModelHudson hudson = hudsonRoot.getValue(); Thanks. Can you point me at the URL where you got the XSD? I need to verify if we can actually commit this to CVS or not. (In reply to comment #11) > Thanks. Can you point me at the URL where you got the XSD? I need to verify if > we can actually commit this to CVS or not. Well, they are available on every Hudson instance e.g. http://deadlock.netbeans.org/hudson/api/schema I see. Can you come up with a list of schemas and corresponding URLs that would be relevant to the Hudson integration? I would like to come up with a consistent schema for the namespaces, e.g.: /hudson -> org.eclipse.mylyn.internal.hudson.core.model /hudson/job -> org.eclipse.mylyn.internal.hudson.core.model.job What are your thoughts on that? (In reply to comment #13) > I see. Can you come up with a list of schemas and corresponding URLs that would > be relevant to the Hudson integration? Not sure I missed a URL: <baseurl>/api/schema -> needed <baseurl>/queue/api/schema -> not sure, probably not for now <baseurl>/overallLoad/api/schema -> not needed (at least for now) <baseurl>/job/<jobname>/api/schema -> looks like all attributes are also included in the primary schema <baseurl>/job/<jobname>/<buildnumber>/api/schema -> needed since some attributes are unique <baseurl>/people/api/schema -> not sure, but useful if we need a list of all people available <baseurl>/computer/api/schema -> not needed for now <baseurl>/computer/(<computername>)/api/schema -> not needed for now > I would like to come up with a > consistent schema for the namespaces, e.g.: > /hudson -> org.eclipse.mylyn.internal.hudson.core.model > /hudson/job -> org.eclipse.mylyn.internal.hudson.core.model.job > > What are your thoughts on that? We defintely need that. The "core" is missing in my suggested namespace. Also I'm not sure "rest" is the right prefix... Thanks. What confuses me slightly is the overlap models between the different schemas. In the end most things available under /job/api/schema are the same as what is available under /api/schema. Should we map all of that to the same Java package or does that need to go into different namespaces? I would like to make progress here to unblock you. I am thinking of mapping /hudson/api/schema to org.eclipse.mylyn.internal.hudson.core.model for now and then we can take it from there. Let me know if you want me to do something else. I have generated and committed code from the following schemas into a single package in the o.e.m.hudson.core plug-in as a start: https://build.eclipse.org/hudson/api/schema https://build.eclipse.org/hudson/people/api/schema https://build.eclipse.org/hudson/job/epp-mpc-nightly/api/schema https://build.eclipse.org/hudson/job/epp-mpc-nightly/62/api/schema Marking resolved. We can reopen if additional schemas are needed or if it turns out that the different namespaces need to be in their own packages. |