You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Mikko Wuokko <mi...@evtek.fi> on 2007/01/25 11:11:16 UTC

MySQL fails with Maven2.. on derby execute

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?

-Mikko

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


Re: MySQL fails with Maven2.. on derby execute

Posted by David Sean Taylor <da...@bluesunrise.com>.
Philip Mark Donaghy wrote:
> Hi Mikko,
> 
>> 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 :) .

Thats it! We are all suffering from chronic MASA!
Do you think we can get workmans comp from Apache?

> 
> 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.
> 
I've been faithfully applying patches here, but I must admit I am 
confused about this extra property.
Can't we just go with this existing well-known property:

org.apache.jetspeed.production.database.default.name

Or is that somehow lost in the MASA phenomena?

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


Re: MySQL fails with Maven2.. on derby execute

Posted by Philip Mark Donaghy <ph...@gmail.com>.
Hi Mikko,

On 1/25/07, Mikko Wuokko <mi...@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.

Philip

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