java - Obtaining list views in Jenkins from nested view plugin -


i have developed plugin has extension point listviewcolumn have run problems when combining plugin, nested view plugin.

my plugin enables 1 select jobs in current view , make modifications 1 button press. when view resides inside nested view, can't find view (from java code , jelly scripts) , no modification can made. in columnheader.jelly execute

${it.getheadertext(view.name)} 

where getheadertext() defines as

public string getheadertext(string viewname) {     hudson.getinstance().getview(viewname);     // access jobs return object of .getview(viewname)     return viewname; } 

this works fine regular list views whenever enter nested view's list view, getview(viewname) returns null.

upon further investigation i've noticed nested views show when calling

hudson.getinstance().getviews(); 

which returns views in toplevel of whole jenkins instance (no views inside nested views). here have nested view shows , instance of hudson.plugins.nested_view.nestedview. don't seem able object.

therefore i'm wondering how go list views jenkins instance?

i believe have define dependency in pom.xml file such

<dependencies>   <dependency>     <groupid>nested_view.plugins.hudson</groupid>     <artifactid>nested-view</artifactid>     <version>1.526</version>     <optional>true</optional>   </dependency> </dependencies> 

in order able make use of objects instances of hudson.plugins.nested_view.nestedview. when adding pom.xml, doesn't seem work. hovering above dependency tag (second line of code block above) message

missing artifact hudson.plugins.nested_view:nested-view:jar:1.526

i rather find way views via core methods , objects. if have add dependency in order list views , jobs inside nested views, how work?


sidenote:

this issue want getviews() returns view objects not contain view objects. also, want in java. not me @ all...

// bogge

i found work-around problem!

since have access jobs individually in current view without knowing view in, add each job list in backend , scan url see if changed view (then clear , re-add jobs again).

it still appreciated if had answer how access objects of other plugins , how add depencencies correctly though.

cheers!


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -