roller-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <gregh3...@gmail.com>
Subject Re: Persistent Database - build configuration option
Date Tue, 16 Aug 2011 19:57:05 GMT
Edd,

There is a setting in roller.properties

themes.reload.mode=false

which needs to be set to true, which will cause the PageServlet to
check the template folder the weblog is using for changes, and reload
if needed.

This should work with the mavern build process, (correct me if I am
wrong) which I think creates the weblogger-webapp folder and inside is
the themes folder which jetty uses (copied from the
weblogger-web/src/main/resources/themes folder).  If you change a
template here for the weblog theme it should reload the changes as the
PageServlet will look here.

Make sure there is no custom style sheet on the weblog ie check the db
webpage file and delete it if necessary.

The reloading is driven from the vm template so to reload the
ApplicationResources.properties a template must be changed.

The changes need then to be copied from weblogger-webapp to
weblogger-web before rebuilding the project otherwise the changes will
be lost.

Its a shame there seems to be so much copying structure/files, going
off to the repositories etc, etc.  Time is money!

##

Alternatively, another way is to setup roller to run in eclipse, ie
create dynamic web project and then using the release build copy the
files into the correct structure/folders etc.  Create a server
instance for tomcat (or use the old sysdeo plugin) and make sure it
starts and runs.

ie

roller
  src
  WebContent
    roller-ui
    .. ..
    themes
    WEB-INF
      lib
      .. ..

Then, when you change the template that the weblog is using it will
check the WebContent/themes folder and it will reload the theme if the
file time/stamp has changed.

The downside of this any src changes made in eclipse is impossible to
get back into the trunk, but you can just copy over the theme folder
as is.  But the upside you have the eclipse build process & debugger.

Cheers Greg.

On 16 August 2011 08:43, Edd Grant <edd@eddgrant.com> wrote:
> Hi Greg,
>
> Your approach sounds really interesting, can you expand a little on the
> theme reloading option you mention? I wasn't aware that this existed, how
> exactly is it configured?
>
> Many thanks,
>
> Edd
>
> On 16 August 2011 08:07, Greg Huber <gregh3269@gmail.com> wrote:
>
>> Edd,
>>
>> I have some very complex themes, and after a while the whole 2-4 steps
>> becomes very tiresome, so I deploy roller into eclipse (using a
>> distro) and use the theme reloading option and eclipse to maintain the
>> build (restart container for signature changes though).  I know this
>> breaks the mavern thinking but saves a whole heap of time.
>>
>> cheers.
>>
>> On 15 August 2011 09:30, Edd Grant <edd@eddgrant.com> wrote:
>> > Hi All,
>> >
>> > I've recently been doing a bit of spring cleaning on my Roller theme, one
>> of
>> > the things I find really useful is the ability to set up some user and
>> entry
>> > data in the Roller Database then use mvn jetty:run to view that data
>> under
>> > my current theme, what's really useful is to have the data persist across
>> > multiple maven executions so I can see how my theme tweaks change things
>> > without having to re-enter the data each time I start Roller.
>> >
>> > I find something like the following allows me to make and review changes
>> to
>> > my theme quite quickly:
>> >
>> >   1. Add some user and entry content to the Roller Database - including
>> >   specific things I want to test whilst editing my theme
>> >   2. Make change to theme files
>> >   3. Start roller using mvn jetty:run
>> >   4. Look at changes
>> >   5. Stop jetty
>> >   6. Repeat steps 2 to 4 until happy with theme
>> >
>> > There's a snag however - at the moment the Roller build understandably
>> needs
>> > to clean down the Derby Database as it executes various goals, for the
>> > purpose of theme development this can be quite frustrating as it means I
>> > have to re-create users and entry data each time I make a tweak to my
>> theme,
>> > which can add a lot of time on to an otherwise simple theme tweak. To
>> this
>> > end I have made a small local modification to some of the maven POMs and
>> the
>> > StartDerbyTask class, my changes add a maven boolean property which can
>> then
>> > be configured to make the Database content persistent (or not) across
>> maven
>> > executions, the default is to not make the Database content persistent so
>> > that anyone can still check out the Roller source code without
>> modification
>> > and perform a mvn clean install with exactly the same results as they
>> would
>> > do today.
>> >
>> > I have found this change to be a really useful aid in my theme tweaking
>> so I
>> > thought I would email to see if anyone else might be interested in it? If
>> > anyone is then I'd be happy to send my changes to one of the committers
>> for
>> > review in case it could be contributed back to the main project.
>> >
>> > Cheers,
>> >
>> > Edd
>> >
>> > Web: http://www.eddgrant.com/
>> > Blog: http://www.eddgrant.com/blog
>> > Email: edd@eddgrant.com
>> > Mobile: +44 (0) 7861 394 543
>> >
>>
>
>
>
> --
> Web: http://www.eddgrant.com
> Email: edd@eddgrant.com
> Mobile: +44 (0) 7861 394 543
>

Mime
View raw message