portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Mark Donaghy" <philip.dona...@gmail.com>
Subject Re: MySQL fails with Maven2.. on derby execute
Date Thu, 25 Jan 2007 11:52:49 GMT
Hi Mikko,

On 1/25/07, Mikko Wuokko <mikko.wuokko@evtek.fi> wrote:
> Hi.
> I tried to build the trunk version for awhile and it would seem that it
> fails with MySQL (and propably with any other than derby) on the
> "sql-execute-derby" target in etc/build.xml line 349.
> I don't know if this could should or not be run with every db setup, but
> now it is. The property value
> org.apache.jetspeed.database.is.derby.embedded is checked if it should
> be run. This was added with empty string value in the commit
> http://svn.apache.org/viewvc?view=rev&rev=499195
> build.xml:23 <property
> name="org.apache.jetspeed.database.is.derby.embedded" value="" />
> I tried out commenting it out and then it did pass the spot. It would
> seem that empty string means that it is set and the if condition will be
> true.
> Can you tell if the "sql-execute-derby" target is needed for some other
> parts?

Yes the default build creates and populates a derby database. Which is
a little special in that there are database locks that stick around if
the database is not forked and shutdown properly.

The issue is Maven 2 ant plugin. Maven Again Stricks Again ( we can
call this phenomena a MASA :) .

And I made a mistake regarding the if attribute of an Ant target.

I just tested using the setting in build.xml,

<property name="org.apache.jetspeed.database.is.derby.embedded" value="false" />

And as you said the target attribute if is not boolean. The task is
executed if the property exists with any value including "" or false.
As Ant says "It is a property and not a variable".

So the build.xml needs conditional sub targets to prevent the target
"sql-execute-derby" from executing.

What you want to do as a work around is remove as you said the
o.a.j.is.derby.embedded declaration and specify the database using the
maven 2 property. Or write the conditional target and put a depends in
the sql-execute-derby.

We need to add the other missing properties so that maven can Get It,

        <property name="org.apache.jetspeed.database.is.mssql" value="" />
        <property name="org.apache.jetspeed.database.is.mysql" value="" />
        <property name="org.apache.jetspeed.database.is.oracle" value="" />
        <property name="org.apache.jetspeed.database.is.hsql" value="" />
        <property name="org.apache.jetspeed.database.is.postgres" value="" />
        <property name="org.apache.jetspeed.database.is.sapdb" value="" />
        <property name="org.apache.jetspeed.database.is.hsql.embedded"
value="" />

The alternative is rewrite the target sql-execute which actually
execute sql for both derby and hsql databases.

Let me look into this. Removing the property <property
name="org.apache.jetspeed.database.is.derby.embedded" value="" /> is
the best bet for the moment.


> -Mikko
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

Philip Donaghy
donaghy.blogspot.com del.icio.us/donaghy/philip
Skype: philipmarkdonaghy
Office: +33 5 56 60 88 02
Mobile: +33 6 20 83 22 62

To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message