In src/main/resources create a package called the same as your class

my.package.MyMenuExtension

in that package create a index.jelly file and fill that with content.


Robert Sandell
Software Tools Engineer - SW Environment and Product Configuration
Sony Mobile Communications

From: [email protected] [mailto:[email protected]] On 
Behalf Of Roberto Minelli
Sent: den 31 januari 2013 11:44
To: [email protected]
Cc: Mark Waite
Subject: Re: Simple Jenkins plug-in hooked on the left menu

Hi,

I understood, looking at some plugins that a good extension point is 
hudson.model.RootAction.

Looking at the ui-samples plugin, I implemented an extension such as:


@Extension

public class MyMenuExtension implements RootAction {



                  public String getIconFileName() {

                      return "gear.png";

                  }



                  public String getDisplayName() {

                      return "My menu";

                  }



                  public String getUrlName() {

                      return "ui-samples";

                  }



}

My problem is now on the getUrlName. By reading the doc I'd like to have a new 
page relative to the context path of the Jenkins webapp, as ui-samples does.

i.e.,

                  public String getUrlName() {

                      return "my-page";

                  }

which goes to http://localhost:8080/my-page/

The question is "how do I compose my-page?".

Any help is appreciated.

Cheers,
RM

On Wednesday, January 30, 2013 2:30:22 PM UTC+1, Mark Waite wrote:
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial is a good place to 
start, though it may be even better to review the existing plugins and see if 
there is one of the hundreds which more closely matches your needs.

Mark Waite

________________________________
From: Roberto Minelli <[email protected]<javascript:>>
To: [email protected]<javascript:>
Cc: Mark Waite <[email protected]<javascript:>>
Sent: Wednesday, January 30, 2013 5:38 AM
Subject: Re: Simple Jenkins plug-in hooked on the left menu

Thanks a lot, I'll look at that!

Then how can I proceed to allow admin editing and stuff like that?

Cheers,
RM

On Wednesday, January 30, 2013 1:34:15 PM UTC+1, Mark Waite wrote:
You could consider starting with the HTML Publisher plugin, since it allows you 
to create a hyperlink from the left hand side meny to an HTML page.  It doesn't 
allow only admin edits to the resulting page, but may give a good starting 
place.

Mark Waite

________________________________
From: Roberto Minelli <[email protected]<mailto:[email protected]>>
To: [email protected]<mailto:[email protected]>
Sent: Wednesday, January 30, 2013 5:22 AM
Subject: Simple Jenkins plug-in hooked on the left menu

Hi,

I'm new to both Maven and Jenkins and I need to develop a very simple Jenkins 
plug-in but I don't know exactly how to start.

I already went through the Wiki (i.e., https://wiki.jenkins- 
ci.org/display/JENKINS/Plugin+ 
tutorial<https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial>) but this 
does not help much.

My plug-in is essentially a simple entry on the left hand side menu (i.e., 
where 'New Job', 'Manage Jenkins', etc. are located) that should bring the user 
to a sort of HTML table that only the admin is able to edit.

Do you have any suggestion? Where I can start?

Thanks in advance,
RM
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-de...@ googlegroups.com.
For more options, visit https://groups.google.com/ 
groups/opt_out<https://groups.google.com/groups/opt_out>.



--
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected]<javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to