8 Replies Latest reply on Aug 26, 2004 7:34 PM by Robert Gimbel

    [Nukes] Theme deployment question

    Robert Gimbel Newbie

      I am working on creating my first theme for JBoss nukes and have deployed the theme that I have created so far. Once I apply the theme to my site all the graphics show up as broken links, but the scripts and style sheets come through fine. The graphic files are in the jar file and when I view the source of the web page the img links appear just like the sample themes. Can someone point me in the right direction as to why the graphic images are not being picked up when the theme is applied?

      Currently running Jboss-3.2.3 with Nukes-1.1RC3:

      I copied the module template and added the themes section instead of modules. So my path to my source is as follows:

      `-- mytheme
       |-- favicon.ico
       |-- images
       | |-- BLbubble.gif
       | |-- BRbubble.gif
       | |-- Bbubble.gif
       | |-- Ldesk.gif
       | |-- Lmenu.gif
       | |-- Rbubble.gif
       | |-- Rdesk.gif
       | |-- TLbubble.gif
       | |-- TRbubble.gif
       | |-- cw-16.ico
       | |-- cw-footer-logo.gif
       | |-- cw-header-logo.gif
       | |-- keys.gif
       | |-- matrix.gif
       | |-- menu_right.gif
       | |-- patchcbl.gif
       | |-- spacer.gif
       | `-- suits.gif
       |-- scripts
       | |-- HM_Arrays.js
       | |-- HM_Loader.js
       | `-- HM_ScriptDOM.js
       |-- style
       | `-- style.css
       `-- theme.html

      and my jboss-service.xml file:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server>
       <!-- Declare the template module as a JBoss service -->
       <arg type="boolean" value="true"/>
       <attribute name="Id">jar:/theme.html</attribute>
       <attribute name="Root">org/jboss/nukes/addons/themes/mytheme</attribute>

      Any direction that you can point me in is appreciated as I am running in circles now!! :)


        • 1. Re: [Nukes] Theme deployment question
          Robert Gimbel Newbie

          I have discovered that the GIF images seem to be getting corrupted during the build process. I can view the images fine in the src/resources/mytheme-lib-jar/org/jboss/nukes/addon/themes/mytheme/images, but after the build I go to use the same file viewer and I get the following error:

          GIF file was missing some data (perhaps it was truncated somehow?)
          GIF file was missing some data (perhaps it was truncated somehow?)
          GIF image contained a frame appearing outside the image bounds.

          I have looked in the build.xml file but don't see anything that would have tweeked these files from the src location to the output directory. I am going to copy the images directly to the output directory and see if I can build a sar file that will deploy working images.

          • 2. Re: [Nukes] Theme deployment question
            Robert Gimbel Newbie

            That fixed it.. Something in the build process was breaking my GIF images. I copied the original GIF's from the src directory over top of the files in the output directory and rebuilt the sar file and deployed.. the graphic images came right up like they are suppose to.

            So this leads me to my next question. Where should these files be placed I have them in my copied template directory as such:


            Is this not the best place to put these files? or is there a better place?

            • 3. Re: [Nukes] Theme deployment question
              Thomas Heute Master

              You need to put the binary files in the bin directory and create the same path as in src


              • 5. Re: [Nukes] Theme deployment question
                Robert Gimbel Newbie

                When I moved the images into the bin directory and ran the build.sh the binary directory does not make it into the output directory and consequently doesn't make it into the .sar file. The build script is pulled out of the current nukes cvs tree. Is there something more that I need to do to the build file so that ant knows to pick up this directory?

                Thanks in advance.

                • 6. Re: [Nukes] Theme deployment question
                  Robert Gimbel Newbie

                  Got it.. After disecting the build.xml file I needed to add a couple entries in the default build.xml

                  I added the line in the _default:compile-bin in the compile target.

                  <target name="compile"
                   description="Compile all source files."
                   <!-- Add module specific elements here. -->

                  and the following line in the output target in the jar file section.

                  <fileset dir="${build.bin}" includes="**/*"/>

                  • 7. Re: [Nukes] Theme deployment question
                    Robert Gimbel Newbie

                    I lied.. that broke my images again...

                    • 8. Re: [Nukes] Theme deployment question
                      Robert Gimbel Newbie

                      Hopefully this will be my last post in this topic and hopefully someone else finds value in this.

                      The only line I needed to ad was in the output target and this line in the jar section:

                      <fileset dir="${source.bin}" includes="**/*"/>

                      boy am I a putz!

                      All is good now!