Skip to main content



      Home
Home » Archived » 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 12:43 Go to next message
Eclipse UserFriend
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 04:57] by Moderator

Re: Plugin development for Jenkins and Hudson (Json structure differs?!) [message #1525286 is a reply to message #1524820] Tue, 23 December 2014 18:58 Go to previous messageGo to next message
Eclipse UserFriend
The JSON you put for Jenkins is not correct. It has unclosed bracket. Can you please put the correct JSON.


Re: Plugin development for Jenkins and Hudson (Json structure differs?!) [message #1547227 is a reply to message #1525286] Mon, 05 January 2015 04:59 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 18:38:55 EDT 2025

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

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

Back to the top