best way to refer to image locations in jelly files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

best way to refer to image locations in jelly files

bwestrich
Sorry if this is a FAQ.

I just noticed that the Perforce plugin icons no longer display. It
appears the plugin directory name changed at some point from "plugin"
to "plugins", and since this directory reference is hardcoded in the
jelly file, the icons are no longer accessible.

Questions:

1. did this directory name indeed change, or is this issue due to
something else?
2. is there a way to specify the plugins directory in a jelly file
such that the jelly file needs no or minimal updating when this
directory name changes?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: best way to refer to image locations in jelly files

Kohsuke Kawaguchi
Administrator
Brian Westrich wrote:

> Sorry if this is a FAQ.
>
> I just noticed that the Perforce plugin icons no longer display. It
> appears the plugin directory name changed at some point from "plugin"
> to "plugins", and since this directory reference is hardcoded in the
> jelly file, the icons are no longer accessible.
>
> Questions:
>
> 1. did this directory name indeed change, or is this issue due to
> something else?
I don't think it changed, actually. It has always been plugin (as backed
by Hudson.getPlugin method)

> 2. is there a way to specify the plugins directory in a jelly file
> such that the jelly file needs no or minimal updating when this
> directory name changes?

This URL is supposed to be very stable, so we don't have any variable to
cover this.

But I think you have a good point that we could use a better way to
refer to static resources like image. I think it wold be very convenient
to have a way to say "image files in the same directory as this jelly
file" for example.

Hmm, let me think about this...


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: best way to refer to image locations in jelly files

bwestrich
The following appears to indicate the plugin directory is currently
named "plugins".

This code in PluginManager:
    public PluginManager(ServletContext context) {
        this.context = context;
        rootDir = new File(Hudson.getInstance().getRootDir(),"plugins");

"plugins" is also the directory mentioned on the
http://localhost:8080/managePlugins page I see when I run Hudson in
Jetty via the maven hudson plugin.


On Nov 29, 2007 8:54 PM, Kohsuke Kawaguchi <[hidden email]> wrote:

> Brian Westrich wrote:
> > Sorry if this is a FAQ.
> >
> > I just noticed that the Perforce plugin icons no longer display. It
> > appears the plugin directory name changed at some point from "plugin"
> > to "plugins", and since this directory reference is hardcoded in the
> > jelly file, the icons are no longer accessible.
> >
> > Questions:
> >
> > 1. did this directory name indeed change, or is this issue due to
> > something else?
>
> I don't think it changed, actually. It has always been plugin (as backed
> by Hudson.getPlugin method)
>
> > 2. is there a way to specify the plugins directory in a jelly file
> > such that the jelly file needs no or minimal updating when this
> > directory name changes?
>
> This URL is supposed to be very stable, so we don't have any variable to
> cover this.
>
> But I think you have a good point that we could use a better way to
> refer to static resources like image. I think it wold be very convenient
> to have a way to say "image files in the same directory as this jelly
> file" for example.
>
> Hmm, let me think about this...
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: best way to refer to image locations in jelly files

bwestrich
Just noticed that the reason the plugin is not seeing the icons is
that the hpi file does not contain all the icons. (!)  I'm hoping a
re-release will fix this...

When I copy the icons manually into the "plugins" directory,
everything works well (I did not test whether the "plugin" directory
would also work). So the question of whether we use "plugin" or
"plugins" now seems more academic.

On Dec 4, 2007 2:43 AM, Brian Westrich <[hidden email]> wrote:

> The following appears to indicate the plugin directory is currently
> named "plugins".
>
> This code in PluginManager:
>     public PluginManager(ServletContext context) {
>         this.context = context;
>         rootDir = new File(Hudson.getInstance().getRootDir(),"plugins");
>
> "plugins" is also the directory mentioned on the
> http://localhost:8080/managePlugins page I see when I run Hudson in
> Jetty via the maven hudson plugin.
>
>
>
> On Nov 29, 2007 8:54 PM, Kohsuke Kawaguchi <[hidden email]> wrote:
> > Brian Westrich wrote:
> > > Sorry if this is a FAQ.
> > >
> > > I just noticed that the Perforce plugin icons no longer display. It
> > > appears the plugin directory name changed at some point from "plugin"
> > > to "plugins", and since this directory reference is hardcoded in the
> > > jelly file, the icons are no longer accessible.
> > >
> > > Questions:
> > >
> > > 1. did this directory name indeed change, or is this issue due to
> > > something else?
> >
> > I don't think it changed, actually. It has always been plugin (as backed
> > by Hudson.getPlugin method)
> >
> > > 2. is there a way to specify the plugins directory in a jelly file
> > > such that the jelly file needs no or minimal updating when this
> > > directory name changes?
> >
> > This URL is supposed to be very stable, so we don't have any variable to
> > cover this.
> >
> > But I think you have a good point that we could use a better way to
> > refer to static resources like image. I think it wold be very convenient
> > to have a way to say "image files in the same directory as this jelly
> > file" for example.
> >
> > Hmm, let me think about this...
> >
> >
> > --
> > Kohsuke Kawaguchi
> > Sun Microsystems                   [hidden email]
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]