Thanks so much, Dave for sharing insights.

Please see my comments inline.

On Sun, Sep 1, 2019 at 5:32 PM Dave <snoopd...@gmail.com> wrote:
>
> The problem is that the Maven-Jetty setup uses an in memory database, you
> can see it in the jetty.xml file:
>       jdbc:derby://localhost:4224/memory:rollerdb;create=true
>
> Docs for Derby's in-memory are here:
> https://db.apache.org/derby/docs/10.9/devguide/cdevdvlpinmemdb.html
>
> There are a variety of ways to fix this, one way is to write some code that
> launches and embedded Derby, then add a Jetty "plugin" to launch it when
> Jetty starts.That's what we used to do back in 2010 we had a DerbyLifeCycle
> class that do exactly that. I'm not sure why we decided to switch to an
> in-memory database.
>
> If we did that, we could also use the same code to launch Derby in Roller's
> JUnit tests. That would be better than what we do now becuase we would be
> able to run and debug tests from with an IDE and not just in Maven.

Big +1 for this approach, we should include in our roadmap.
Not necessarily we do it immediately but we should keep it in our future plans,
since it is very critical in terms of attracting new adoptors (Devs) to Roller.

>
> When I do development I usually run Roller in Tomcat with a local Postgres
> or MySQL database and I have Tomcat configured to point to Roller in
> ./app/target/roller. I use IntelliJ's debugger and "attach" to that process
> when I need to step through something.
>
> Hope that helps.

Thanks so much for the instructions, I will have a look into this.
I am sure this will be helpful.

>
> Dave
>
>
>
>
>
>
>
>
>
>
> On Thu, Aug 29, 2019 at 9:41 AM Swapnil M Mane <swapnilmm...@apache.org>
> wrote:
>
> > Hello team,
> >
> > I followed the steps mentioned in this document to build the Roller
> > https://cwiki.apache.org/confluence/display/ROLLER/How+to+build+Roller
> >
> > Thanks for the document, everything worked as expected.
> >
> > Can somebody please suggest me what is the best practice to build and
> > verify the changes.
> >
> > So, I have done something like this,
> >
> > 1. Start the server from command mvn jetty:run
> > 2. Created admin user and some content
> > 2. Edit the 'roller/app/src/main/webapp/themes/basic/_day.vm' file
> > 3. To see the changes, restart the sever run mvn jetty:run
> >
> > These steps deleted my content which I have created earlier like user,
> > blog, etc.
> > Due to this, to verify my change, I have to create the above content again.
> >
> > As mentioned in the above document,
> > mvn jetty:run starts with empty Roller database
> >
> > >>>> Note the blog information stored during each mvn jetty:run session
> > will be lost once you stop Jetty (i.e., each mvn jetty:run starts with
> > empty Roller database tables),
> >
> > Is there any way to persist my changes and what are the process
> > generally followed by developers.
> >
> >
> > Thanks & regards,
> > Swapnil M Mane,
> > www.apache.org
> >

Reply via email to