Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Plugin development for Jenkins and Hudson (Json structure differs?!)
Plugin development for Jenkins and Hudson (Json structure differs?!) [message #1524820] Tue, 23 December 2014 17:43 Go to next message
Ivo Carola is currently offline Ivo CarolaFriend
Messages: 5
Registered: March 2010
Junior Member
Hi,
I'm developing a plugin to integrate an external application via CLI and it should work for both Jenkins and Hudson, the problem I'm having is that the Json (formData):

Descriptor.newInstance(StaplerRequest req, JSONObject formData)

has a different structure, so the @DataboundConstructor's either works for Hudson or for Jenkins but not for both. Could this be related to the two particular versions of hudson and Jenkins?

I'm building for Hudson 3.2.1 and Jenkins 1.532.3.

The problem is specific to radioBlocks, in Hudson I get:


"generateSettings": {
"generateMode": {
"value": "openApplication"
},
"applicationFile": "wef"
}


the value attribute is inside the generateMode radioblock but the entries are inline.

and in Jenkins I get:

"generateSettings": {
"generateMode": {
"value": "openApplication",
"applicationFile": "wef"
}
}

The inside the radio block are placed inside the radioblock generateMode.

this is the jelly:

...
<f:radioBlock name="generateMode" value="openApplication" title="Open application file"
checked="${instance.cliSettings.generateSettings.generateMode == 'openApplication'}" inline="false">
<f:entry field="cli.applicationFile" title="Application file" description="(.paf, .dsw, .sln, .ewf, .epf)">
<f:textbox name="cli.applicationFile" value="${instance.cliSettings.generateSettings.applicationFile}"/>
</f:entry>
</f:radioBlock>
...

I have tried inline true and false and in hudson it has no effect, in Jekins it works as expected but I can never get the same Json.

Any thoughts?

Kind regards,
Ivo.

[Updated on: Mon, 05 January 2015 09:57]

Report message to a moderator

Re: Plugin development for Jenkins and Hudson (Json structure differs?!) [message #1525286 is a reply to message #1524820] Tue, 23 December 2014 23:58 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
The JSON you put for Jenkins is not correct. It has unclosed bracket. Can you please put the correct JSON.




Winston Prakash
Eclipse Hudson team
Re: Plugin development for Jenkins and Hudson (Json structure differs?!) [message #1547227 is a reply to message #1525286] Mon, 05 January 2015 09:59 Go to previous message
Ivo Carola is currently offline Ivo CarolaFriend
Messages: 5
Registered: March 2010
Junior Member
Winston Prakash wrote on Tue, 23 December 2014 18:58
The JSON you put for Jenkins is not correct. It has unclosed bracket. Can you please put the correct JSON.




Copy/paste mistake, I've added the missing bracket.
Previous Topic:Embedded Status Badge
Next Topic:ANN: Google Login Plugin (Beta)
Goto Forum:
  


Current Time: Sun Sep 23 11:52:09 GMT 2018

Powered by FUDForum. Page generated in 0.03106 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top