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

    [Nukes] Theme deployment question

    rgimbel

      Hello-
      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:

      /cvs/nukes/mytheme/src/main/org/jboss/nukes/addons/themes
      
      `-- 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>
      <server>
       <!-- Declare the template module as a JBoss service -->
       <mbean
       code="org.jboss.nukes.theme.ThemeTemplate"
       name="nukes.themes:name=mytheme"
       xmbean-dd=""
       xmbean-code="org.jboss.nukes.component.NukesMBean">
       <depends>nukes.modules:name=core</depends>
       <depends>nukes.modules:name=html</depends>
       <constructor>
       <arg type="boolean" value="true"/>
       </constructor>
       <xmbean>
       <attribute name="Id">jar:/theme.html</attribute>
       <attribute name="Root">org/jboss/nukes/addons/themes/mytheme</attribute>
       </xmbean>
       </mbean>
      </server>



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

      -Rob

        • 1. Re: [Nukes] Theme deployment question
          rgimbel

          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
            rgimbel

            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:

            /root/cvs/nukes/template/src/resources/nukes-template-lib-jar/org/jboss/nukes/addons/themes/mytheme

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

            • 3. Re: [Nukes] Theme deployment question
              theute

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

              /cvs/nukes/mytheme/src/bin/org/jboss/nukes/addons/themes/mytheme/images

              • 4. Re: [Nukes] Theme deployment question
                rgimbel

                Thank you!

                • 5. Re: [Nukes] Theme deployment question
                  rgimbel

                  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
                    rgimbel

                    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."
                     depends="_default:compile-classes,
                     _default:compile-etc,
                     _default:compile-bin,
                     _default:compile-resources">
                     <!-- Add module specific elements here. -->
                     </target>


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

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



                    • 7. Re: [Nukes] Theme deployment question
                      rgimbel

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

                      • 8. Re: [Nukes] Theme deployment question
                        rgimbel

                        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!