You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Glen Mazza <gl...@gmail.com> on 2013/07/31 15:27:08 UTC

Proposed new Derby activator for our pom.xml

Team, I'd like to switch to Brian Matthew's inmemdb-maven-plugin 
(https://github.com/bmatthews68/inmemdb-maven-plugin) for our JUnit and 
mvn jetty:run testing.  It handles the in-memory Derby database that 
runs while we activate our tests.  This will allow us to delete the 
org.apache.roller.derby.ant.StartDerbyTask and .StopDerbyTask classes, 
as well as the maven-antrun-plugin activation of these classes in our 
pom.xml.

In its place, in app/pom.xml this is all we'll need to add (you can add 
this to the pom and test it now if you'd like, mvn clean install & mvn 
jetty:run -- but will need right now to use EclipseLink for the latter):

             <plugin>
<groupId>com.btmatthews.maven.plugins.inmemdb</groupId>
<artifactId>inmemdb-maven-plugin</artifactId>
                 <version>1.3.0</version>
                 <configuration>
                     <monitorKey>inmemdb</monitorKey>
                     <monitorPort>11527</monitorPort>
                 </configuration>
                 <executions>
                     <execution>
                         <id>run</id>
                         <phase>test-compile</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
                         <configuration>
                             <daemon>true</daemon>
                             <type>derby</type>
<database>rollerdb</database>
                             <username>APP</username>
                             <password>APP</password>
                             <port>3223</port>
                             <sources>
                                 <script>
<sourceFile>${pom.basedir}/target/dbscripts/derby/createdb.sql</sourceFile>
                                 </script>
                             </sources>
                         </configuration>
                     </execution>
                     <execution>
                         <id>stop</id>
                         <phase>package</phase>
                         <goals>
                             <goal>stop</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>

It runs almost 10% faster than the Ant stuff (mvn clean install 1:14 vs 
1:07 with EclipseLink, 1:24 vs. 1:16 with Hibernate on my machine), that 
said we could probably optimize our present start and stop classes to 
make that difference much smaller.

I tested it on Saturday and submitted a couple of improvement requests 
(ability to specify port and to suppress the empty derby.log file 
generated), which were quickly incorporated and a new release version 
put on Central (1.3) today.  This new version has two minor drawbacks 
(which I just submitted two more issues on #12 and #13 here: [1]), it 
unfortunately requires Maven 3.0.5 as the minimum, which Jenkins handles 
but would require some people to upgrade on their machine.  Also, I 
requested that an option to still generate the  derby.log file in case 
we ever need to activate Derby SQL statement logging during the tests 
(right now the fallback is to use version 1.2 when we need that level of 
debugging.)

WDYT?

Regards,
Glen

[1] https://github.com/bmatthews68/inmemdb-maven-plugin/issues


Re: Proposed new Derby activator for our pom.xml

Posted by Dave <sn...@gmail.com>.
You can unsubscribe by sending an empty email (from the address which you
used to subscribe) to the address: dev-unsubscribe@roller.apache.org

- Dave



On Thu, Aug 1, 2013 at 11:44 AM, Gerard Chelak - XTB
<ge...@gsa.gov>wrote:

>  Is there anyway you can get me off this distribution list?  We have
> discontinued our use of the roller application.  I tried the normal
> method but I still get all these emails.  Thank you.
>
>
> ---------- Forwarded message ----------
> From: Dave <sn...@gmail.com>
> Date: Thu, Aug 1, 2013 at 11:38 AM
> Subject: Re: Proposed new Derby activator for our pom.xml
> To: dev@roller.apache.org
>
>
> +1 deleting those Ant tasks sounds good to me.
>
> - Dave
>
>
>
> On Wed, Jul 31, 2013 at 9:27 AM, Glen Mazza <gl...@gmail.com> wrote:
>
> > Team, I'd like to switch to Brian Matthew's inmemdb-maven-plugin (
> > https://github.com/**bmatthews68/inmemdb-maven-**plugin<
> https://github.com/bmatthews68/inmemdb-maven-plugin>)
> > for our JUnit and mvn jetty:run testing.  It handles the in-memory Derby
> > database that runs while we activate our tests.  This will allow us to
> > delete the org.apache.roller.derby.ant.**StartDerbyTask and
> > .StopDerbyTask classes, as well as the maven-antrun-plugin activation of
> > these classes in our pom.xml.
> >
> > In its place, in app/pom.xml this is all we'll need to add (you can add
> > this to the pom and test it now if you'd like, mvn clean install & mvn
> > jetty:run -- but will need right now to use EclipseLink for the latter):
> >
> >             <plugin>
> > <groupId>com.btmatthews.maven.**plugins.inmemdb</groupId>
> > <artifactId>inmemdb-maven-**plugin</artifactId>
> >                 <version>1.3.0</version>
> >                 <configuration>
> >                     <monitorKey>inmemdb</**monitorKey>
> >                     <monitorPort>11527</**monitorPort>
> >                 </configuration>
> >                 <executions>
> >                     <execution>
> >                         <id>run</id>
> >                         <phase>test-compile</phase>
> >                         <goals>
> >                             <goal>run</goal>
> >                         </goals>
> >                         <configuration>
> >                             <daemon>true</daemon>
> >                             <type>derby</type>
> > <database>rollerdb</database>
> >                             <username>APP</username>
> >                             <password>APP</password>
> >                             <port>3223</port>
> >                             <sources>
> >                                 <script>
> > <sourceFile>${pom.basedir}/**target/dbscripts/derby/**
> > createdb.sql</sourceFile>
> >                                 </script>
> >                             </sources>
> >                         </configuration>
> >                     </execution>
> >                     <execution>
> >                         <id>stop</id>
> >                         <phase>package</phase>
> >                         <goals>
> >                             <goal>stop</goal>
> >                         </goals>
> >                     </execution>
> >                 </executions>
> >             </plugin>
> >
> > It runs almost 10% faster than the Ant stuff (mvn clean install 1:14 vs
> > 1:07 with EclipseLink, 1:24 vs. 1:16 with Hibernate on my machine), that
> > said we could probably optimize our present start and stop classes to
> make
> > that difference much smaller.
> >
> > I tested it on Saturday and submitted a couple of improvement requests
> > (ability to specify port and to suppress the empty derby.log file
> > generated), which were quickly incorporated and a new release version put
> > on Central (1.3) today.  This new version has two minor drawbacks (which
> I
> > just submitted two more issues on #12 and #13 here: [1]), it
> unfortunately
> > requires Maven 3.0.5 as the minimum, which Jenkins handles but would
> > require some people to upgrade on their machine.  Also, I requested that
> an
> > option to still generate the  derby.log file in case we ever need to
> > activate Derby SQL statement logging during the tests (right now the
> > fallback is to use version 1.2 when we need that level of debugging.)
> >
> > WDYT?
> >
> > Regards,
> > Glen
> >
> > [1] https://github.com/**bmatthews68/inmemdb-maven-**plugin/issues<
> https://github.com/bmatthews68/inmemdb-maven-plugin/issues>
> >
> >
>
>
> --
> Gerard Chelak
> Acting Director, Infrastructure Division
> Office of Citizen Services and Innovative Technologies (OCSIT)
> One Constitution Square
> 1275 First Street, NE
> Washington DC 20002-3370
> Office  202 219 1118
> Primary Cell 202 580 9792
> gerard.chelak@gsa.gov
>

Re: Proposed new Derby activator for our pom.xml

Posted by Dave <sn...@gmail.com>.
+1 deleting those Ant tasks sounds good to me.

- Dave



On Wed, Jul 31, 2013 at 9:27 AM, Glen Mazza <gl...@gmail.com> wrote:

> Team, I'd like to switch to Brian Matthew's inmemdb-maven-plugin (
> https://github.com/**bmatthews68/inmemdb-maven-**plugin<https://github.com/bmatthews68/inmemdb-maven-plugin>)
> for our JUnit and mvn jetty:run testing.  It handles the in-memory Derby
> database that runs while we activate our tests.  This will allow us to
> delete the org.apache.roller.derby.ant.**StartDerbyTask and
> .StopDerbyTask classes, as well as the maven-antrun-plugin activation of
> these classes in our pom.xml.
>
> In its place, in app/pom.xml this is all we'll need to add (you can add
> this to the pom and test it now if you'd like, mvn clean install & mvn
> jetty:run -- but will need right now to use EclipseLink for the latter):
>
>             <plugin>
> <groupId>com.btmatthews.maven.**plugins.inmemdb</groupId>
> <artifactId>inmemdb-maven-**plugin</artifactId>
>                 <version>1.3.0</version>
>                 <configuration>
>                     <monitorKey>inmemdb</**monitorKey>
>                     <monitorPort>11527</**monitorPort>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <id>run</id>
>                         <phase>test-compile</phase>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                         <configuration>
>                             <daemon>true</daemon>
>                             <type>derby</type>
> <database>rollerdb</database>
>                             <username>APP</username>
>                             <password>APP</password>
>                             <port>3223</port>
>                             <sources>
>                                 <script>
> <sourceFile>${pom.basedir}/**target/dbscripts/derby/**
> createdb.sql</sourceFile>
>                                 </script>
>                             </sources>
>                         </configuration>
>                     </execution>
>                     <execution>
>                         <id>stop</id>
>                         <phase>package</phase>
>                         <goals>
>                             <goal>stop</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>
> It runs almost 10% faster than the Ant stuff (mvn clean install 1:14 vs
> 1:07 with EclipseLink, 1:24 vs. 1:16 with Hibernate on my machine), that
> said we could probably optimize our present start and stop classes to make
> that difference much smaller.
>
> I tested it on Saturday and submitted a couple of improvement requests
> (ability to specify port and to suppress the empty derby.log file
> generated), which were quickly incorporated and a new release version put
> on Central (1.3) today.  This new version has two minor drawbacks (which I
> just submitted two more issues on #12 and #13 here: [1]), it unfortunately
> requires Maven 3.0.5 as the minimum, which Jenkins handles but would
> require some people to upgrade on their machine.  Also, I requested that an
> option to still generate the  derby.log file in case we ever need to
> activate Derby SQL statement logging during the tests (right now the
> fallback is to use version 1.2 when we need that level of debugging.)
>
> WDYT?
>
> Regards,
> Glen
>
> [1] https://github.com/**bmatthews68/inmemdb-maven-**plugin/issues<https://github.com/bmatthews68/inmemdb-maven-plugin/issues>
>
>