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 Philip Mark Donaghy <ph...@gmail.com> on 2007/01/25 00:31:44 UTC

Resolved the Maven 2 build error with the Derby embedded database

Hi, It seems the maven ant plugin requires that properties be declared
in the build file to be acknowledged. Example,

    <target name="help" if="mytest">

The property mytest doesn't need to be declared when running this
target with Ant. The command,

ant -Dmytest=true help

will execute the target help.

Yet the target help will never execute using the maven plugin unless
there is a property declaration.

    <property name="mytest" value=""/>

There are a number of properties used in the etc/build.xml that are
not declared. This is preventing the target sql-execute-derby from
running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
properties will fix this.

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

This and copying the derby jar to tomcat are blocking the maven 2
build. At the moment I don't know where that should be done.
-- 
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


Re: Resolved the Maven 2 build error with the Derby embedded database

Posted by David Sean Taylor <da...@bluesunrise.com>.
Philip Mark Donaghy wrote:
[snip]
>> There are a number of properties used in the etc/build.xml that are
>> not declared. This is preventing the target sql-execute-derby from
>> running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
>> properties will fix this.
> 
> This issue probably needs some testing for each database as Mikko has
> pointed out it breaks the build for other databases. See related
> thread "MySQL fails with Maven2.. on derby execute".
> 

Yes, this project could desperately use a nightly multiplatform 
multidatabase multimaven multicustombuild procedure. Any volunteers?
Im busy trying to do my part in putting out the 2.1 release on time.
Maybe SpikeSource will volunteer some help ...

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


Re: Resolved the Maven 2 build error with the Derby embedded database

Posted by Mikko Wuokko <mi...@evtek.fi>.
Hi.

Yes, that seems to be the cause. Could there be someway to create those 
properties in a conditional way? Or move them to settings.xml. Anyway 
they should be declared only if derby db is used. Probably same goes for 
the hsqldb I believe.

-Mikko

Philip Mark Donaghy wrote:
> Hi,
> 
> On 1/25/07, Philip Mark Donaghy <ph...@gmail.com> wrote:
>> Hi, It seems the maven ant plugin requires that properties be declared
>> in the build file to be acknowledged. Example,
>>
>>     <target name="help" if="mytest">
>>
>> The property mytest doesn't need to be declared when running this
>> target with Ant. The command,
>>
>> ant -Dmytest=true help
>>
>> will execute the target help.
>>
>> Yet the target help will never execute using the maven plugin unless
>> there is a property declaration.
>>
>>     <property name="mytest" value=""/>
>>
>> There are a number of properties used in the etc/build.xml that are
>> not declared. This is preventing the target sql-execute-derby from
>> running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
>> properties will fix this.
> 
> This issue probably needs some testing for each database as Mikko has
> pointed out it breaks the build for other databases. See related
> thread "MySQL fails with Maven2.. on derby execute".
> 
> Philip
> 
>>
>>         <property name="org.apache.jetspeed.database.is.derby" 
>> value="" />
>>         <property 
>> name="org.apache.jetspeed.database.is.derby.embedded" value="" />
>>
>> This and copying the derby jar to tomcat are blocking the maven 2
>> build. At the moment I don't know where that should be done.
>> -- 
>> 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


Re: Resolved the Maven 2 build error with the Derby embedded database

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

On 1/25/07, Philip Mark Donaghy <ph...@gmail.com> wrote:
> Hi, It seems the maven ant plugin requires that properties be declared
> in the build file to be acknowledged. Example,
>
>     <target name="help" if="mytest">
>
> The property mytest doesn't need to be declared when running this
> target with Ant. The command,
>
> ant -Dmytest=true help
>
> will execute the target help.
>
> Yet the target help will never execute using the maven plugin unless
> there is a property declaration.
>
>     <property name="mytest" value=""/>
>
> There are a number of properties used in the etc/build.xml that are
> not declared. This is preventing the target sql-execute-derby from
> running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
> properties will fix this.

This issue probably needs some testing for each database as Mikko has
pointed out it breaks the build for other databases. See related
thread "MySQL fails with Maven2.. on derby execute".

Philip

>
>         <property name="org.apache.jetspeed.database.is.derby" value="" />
>         <property name="org.apache.jetspeed.database.is.derby.embedded" value="" />
>
> This and copying the derby jar to tomcat are blocking the maven 2
> build. At the moment I don't know where that should be done.
> --
> 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
>


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


Re: Resolved the Maven 2 build error with the Derby embedded database

Posted by Philip Mark Donaghy <ph...@gmail.com>.
On 1/26/07, Hajo Birthelmer <Ha...@bluesunrise.com> wrote:
> I guess I found the real solution to our little "derby" problem.

I've tested this with derby, hsql, and mysql. The issue is now resolved..

I realize now that I made a mistake in the title of this thread.
Resolved was not the right word :(

Thanks for your help Hajo,
Philip

>
> In the build xml:
>
> <target name="sql-test-database-classpath"> determines whether the EMBEDDED
> driver is used or not.
> In the current version, for derby (as for hsql) it checks
> <equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
> Unfortunately that is never true since the settings.xml requires a valid
> <org.apache.jetspeed.production.database.jdbc.drivers.path> setting,
> otherwise the mvn main build fails!!! Whoops....
>
> The solution is changing the above test to use the driver itself and test:
> <equals arg1="${org.apache.jetspeed.database.driver}"
> arg2="org.apache.derby.jdbc.EmbeddedDriver"/>
>
> That works and should NOT have any negative impact on any other db.
>
> I would assume that HSQLDB has a similar problem but I have trouble (for
> whatever reason) to get any test going on HSQLDB - plus I don't want to take
> the all the fun of testing away from you....
>
> In the patch I will submit tomorrow to DST I will just comment out the
> driver.path check for HSQLDB.
>
> Note that the same fix has to be applied to the artifact for custom build.
>
> Again: here is the new target:
>
>   <target name="sql-test-database-classpath">
>
>         <condition property="org.apache.jetspeed.database.use.drivers.path">
>             <and>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/></not>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.default.name}" arg2="derby"/></not>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.default.name}" arg2="hsql"/></not>
>             </and>
>         </condition>
>         <condition
> property="org.apache.jetspeed.database.is.derby.embedded">
>             <and>
>                 <equals arg1="${org.apache.jetspeed.database.default.name}"
> arg2="derby"/>
>                 <equals arg1="${org.apache.jetspeed.database.driver}"
> arg2="org.apache.derby.jdbc.EmbeddedDriver"/>
>             </and>
>         </condition>
>         <condition property="org.apache.jetspeed.database.is.hsql.embedded">
>             <and>
>                 <equals arg1="${org.apache.jetspeed.database.default.name}"
> arg2="hsql"/>
> <!--
>                                 <equals
> arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
> -->
>             </and>
>         </condition>
>     </target>
>
>
> Hajo Birthelmer
>
> hajo@bluesunrise.com
> office     : +01.707.773.4646
> cell        : +01.707.318.9275
>
>
> -----Original Message-----
> From: Hajo Birthelmer [mailto:Hajo@BlueSunrise.com]
> Sent: Thursday, January 25, 2007 11:12 PM
> To: 'Jetspeed Developers List'
> Subject: RE: Resolved the Maven 2 build error with the Derby embedded
> database
>
> Hi folks...
>
> This is also related to Mark's and Mikko's email thread " Resolved the Maven
> 2 build error with the Derby embedded database"...
>
> From http://ant.apache.org/manual/index.html :
> Ant will only check whether the property has been set, the value doesn't
> matter. A property set to the empty string is still an existing property.
> For example:
>
>     <target name="build-module-A" if="module-A-present"/>
>
>     <target name="build-own-fake-module-A" unless="module-A-present"/>
>
> In the first example, if the module-A-present property is set (to any value,
> e.g. false), the target will be run. In the second example, if the
> module-A-present property is set (again, to any value), the target will not
> be run.
>
>
> Having said that, setting the property below is not what we should do, since
> it would (let me get rid of the conditional - it does) break everything else
> since now the build file thinks that derby is always set.
> Mark is right in that the property needs to be set for derby (to anything
> for that matter) and only if derby is the database, but we need to find out
> why the condition to do so doesn't get executed
>
>
>
> Hajo Birthelmer
>
> hajo@bluesunrise.com
> office     : +01.707.773.4646
> cell        : +01.707.318.9275
>
>
> -----Original Message-----
> From: Philip Mark Donaghy [mailto:philip.donaghy@gmail.com]
> Sent: Wednesday, January 24, 2007 3:32 PM
> To: Jetspeed Developers List
> Subject: Resolved the Maven 2 build error with the Derby embedded database
>
> Hi, It seems the maven ant plugin requires that properties be declared
> in the build file to be acknowledged. Example,
>
>     <target name="help" if="mytest">
>
> The property mytest doesn't need to be declared when running this
> target with Ant. The command,
>
> ant -Dmytest=true help
>
> will execute the target help.
>
> Yet the target help will never execute using the maven plugin unless
> there is a property declaration.
>
>     <property name="mytest" value=""/>
>
> There are a number of properties used in the etc/build.xml that are
> not declared. This is preventing the target sql-execute-derby from
> running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
> properties will fix this.
>
>         <property name="org.apache.jetspeed.database.is.derby" value="" />
>         <property name="org.apache.jetspeed.database.is.derby.embedded"
> value="" />
>
> This and copying the derby jar to tomcat are blocking the maven 2
> build. At the moment I don't know where that should be done.
> --
> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Resolved the Maven 2 build error with the Derby embedded database

Posted by Philip Mark Donaghy <ph...@gmail.com>.
On 1/26/07, Hajo Birthelmer <Ha...@bluesunrise.com> wrote:
> I guess I found the real solution to our little "derby" problem.
>
> In the build xml:
>
> <target name="sql-test-database-classpath"> determines whether the EMBEDDED
> driver is used or not.
> In the current version, for derby (as for hsql) it checks
> <equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
> Unfortunately that is never true since the settings.xml requires a valid
> <org.apache.jetspeed.production.database.jdbc.drivers.path> setting,
> otherwise the mvn main build fails!!! Whoops....
>
> The solution is changing the above test to use the driver itself and test:
> <equals arg1="${org.apache.jetspeed.database.driver}"
> arg2="org.apache.derby.jdbc.EmbeddedDriver"/>
>
> That works and should NOT have any negative impact on any other db.
>
> I would assume that HSQLDB has a similar problem but I have trouble (for
> whatever reason) to get any test going on HSQLDB - plus I don't want to take
> the all the fun of testing away from you....

I've set up a testing environment for derby embedded, derby network,
mysql, and hsql.
It uses maven 2 profiles. I'll be committing a new settings.xml.sample
to include these profiles.

>
> In the patch I will submit tomorrow to DST I will just comment out the
> driver.path check for HSQLDB.

The solution sounds good. I'll test it.

Philip

>
> Note that the same fix has to be applied to the artifact for custom build.
>
> Again: here is the new target:
>
>   <target name="sql-test-database-classpath">
>
>         <condition property="org.apache.jetspeed.database.use.drivers.path">
>             <and>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/></not>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.default.name}" arg2="derby"/></not>
>                 <not><equals
> arg1="${org.apache.jetspeed.database.default.name}" arg2="hsql"/></not>
>             </and>
>         </condition>
>         <condition
> property="org.apache.jetspeed.database.is.derby.embedded">
>             <and>
>                 <equals arg1="${org.apache.jetspeed.database.default.name}"
> arg2="derby"/>
>                 <equals arg1="${org.apache.jetspeed.database.driver}"
> arg2="org.apache.derby.jdbc.EmbeddedDriver"/>
>             </and>
>         </condition>
>         <condition property="org.apache.jetspeed.database.is.hsql.embedded">
>             <and>
>                 <equals arg1="${org.apache.jetspeed.database.default.name}"
> arg2="hsql"/>
> <!--
>                                 <equals
> arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
> -->
>             </and>
>         </condition>
>     </target>
>
>
> Hajo Birthelmer
>
> hajo@bluesunrise.com
> office     : +01.707.773.4646
> cell        : +01.707.318.9275
>
>
> -----Original Message-----
> From: Hajo Birthelmer [mailto:Hajo@BlueSunrise.com]
> Sent: Thursday, January 25, 2007 11:12 PM
> To: 'Jetspeed Developers List'
> Subject: RE: Resolved the Maven 2 build error with the Derby embedded
> database
>
> Hi folks...
>
> This is also related to Mark's and Mikko's email thread " Resolved the Maven
> 2 build error with the Derby embedded database"...
>
> From http://ant.apache.org/manual/index.html :
> Ant will only check whether the property has been set, the value doesn't
> matter. A property set to the empty string is still an existing property.
> For example:
>
>     <target name="build-module-A" if="module-A-present"/>
>
>     <target name="build-own-fake-module-A" unless="module-A-present"/>
>
> In the first example, if the module-A-present property is set (to any value,
> e.g. false), the target will be run. In the second example, if the
> module-A-present property is set (again, to any value), the target will not
> be run.
>
>
> Having said that, setting the property below is not what we should do, since
> it would (let me get rid of the conditional - it does) break everything else
> since now the build file thinks that derby is always set.
> Mark is right in that the property needs to be set for derby (to anything
> for that matter) and only if derby is the database, but we need to find out
> why the condition to do so doesn't get executed
>
>
>
> Hajo Birthelmer
>
> hajo@bluesunrise.com
> office     : +01.707.773.4646
> cell        : +01.707.318.9275
>
>
> -----Original Message-----
> From: Philip Mark Donaghy [mailto:philip.donaghy@gmail.com]
> Sent: Wednesday, January 24, 2007 3:32 PM
> To: Jetspeed Developers List
> Subject: Resolved the Maven 2 build error with the Derby embedded database
>
> Hi, It seems the maven ant plugin requires that properties be declared
> in the build file to be acknowledged. Example,
>
>     <target name="help" if="mytest">
>
> The property mytest doesn't need to be declared when running this
> target with Ant. The command,
>
> ant -Dmytest=true help
>
> will execute the target help.
>
> Yet the target help will never execute using the maven plugin unless
> there is a property declaration.
>
>     <property name="mytest" value=""/>
>
> There are a number of properties used in the etc/build.xml that are
> not declared. This is preventing the target sql-execute-derby from
> running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
> properties will fix this.
>
>         <property name="org.apache.jetspeed.database.is.derby" value="" />
>         <property name="org.apache.jetspeed.database.is.derby.embedded"
> value="" />
>
> This and copying the derby jar to tomcat are blocking the maven 2
> build. At the moment I don't know where that should be done.
> --
> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
>
> ---------------------------------------------------------------------
> 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


RE: Resolved the Maven 2 build error with the Derby embedded database

Posted by Hajo Birthelmer <Ha...@BlueSunrise.com>.
I guess I found the real solution to our little "derby" problem.

In the build xml:

<target name="sql-test-database-classpath"> determines whether the EMBEDDED
driver is used or not.
In the current version, for derby (as for hsql) it checks 
<equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/> 
Unfortunately that is never true since the settings.xml requires a valid 
<org.apache.jetspeed.production.database.jdbc.drivers.path> setting,
otherwise the mvn main build fails!!! Whoops....

The solution is changing the above test to use the driver itself and test:
<equals arg1="${org.apache.jetspeed.database.driver}"
arg2="org.apache.derby.jdbc.EmbeddedDriver"/>

That works and should NOT have any negative impact on any other db.

I would assume that HSQLDB has a similar problem but I have trouble (for
whatever reason) to get any test going on HSQLDB - plus I don't want to take
the all the fun of testing away from you....

In the patch I will submit tomorrow to DST I will just comment out the
driver.path check for HSQLDB.

Note that the same fix has to be applied to the artifact for custom build.

Again: here is the new target:

  <target name="sql-test-database-classpath">

        <condition property="org.apache.jetspeed.database.use.drivers.path">
            <and>
                <not><equals
arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/></not>
                <not><equals
arg1="${org.apache.jetspeed.database.default.name}" arg2="derby"/></not>
                <not><equals
arg1="${org.apache.jetspeed.database.default.name}" arg2="hsql"/></not>
            </and>
        </condition>
        <condition
property="org.apache.jetspeed.database.is.derby.embedded">
            <and>
                <equals arg1="${org.apache.jetspeed.database.default.name}"
arg2="derby"/>
                <equals arg1="${org.apache.jetspeed.database.driver}"
arg2="org.apache.derby.jdbc.EmbeddedDriver"/>
            </and>
        </condition>
        <condition property="org.apache.jetspeed.database.is.hsql.embedded">
            <and>
                <equals arg1="${org.apache.jetspeed.database.default.name}"
arg2="hsql"/>
<!--                
				<equals
arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/> 
-->
            </and>
        </condition>
    </target>

 
Hajo Birthelmer

hajo@bluesunrise.com
office     : +01.707.773.4646
cell        : +01.707.318.9275
 

-----Original Message-----
From: Hajo Birthelmer [mailto:Hajo@BlueSunrise.com] 
Sent: Thursday, January 25, 2007 11:12 PM
To: 'Jetspeed Developers List'
Subject: RE: Resolved the Maven 2 build error with the Derby embedded
database

Hi folks...

This is also related to Mark's and Mikko's email thread " Resolved the Maven
2 build error with the Derby embedded database"...

>From http://ant.apache.org/manual/index.html :
Ant will only check whether the property has been set, the value doesn't
matter. A property set to the empty string is still an existing property.
For example:

    <target name="build-module-A" if="module-A-present"/>

    <target name="build-own-fake-module-A" unless="module-A-present"/>

In the first example, if the module-A-present property is set (to any value,
e.g. false), the target will be run. In the second example, if the
module-A-present property is set (again, to any value), the target will not
be run.


Having said that, setting the property below is not what we should do, since
it would (let me get rid of the conditional - it does) break everything else
since now the build file thinks that derby is always set.
Mark is right in that the property needs to be set for derby (to anything
for that matter) and only if derby is the database, but we need to find out
why the condition to do so doesn't get executed 


 
Hajo Birthelmer

hajo@bluesunrise.com
office     : +01.707.773.4646
cell        : +01.707.318.9275
 

-----Original Message-----
From: Philip Mark Donaghy [mailto:philip.donaghy@gmail.com] 
Sent: Wednesday, January 24, 2007 3:32 PM
To: Jetspeed Developers List
Subject: Resolved the Maven 2 build error with the Derby embedded database

Hi, It seems the maven ant plugin requires that properties be declared
in the build file to be acknowledged. Example,

    <target name="help" if="mytest">

The property mytest doesn't need to be declared when running this
target with Ant. The command,

ant -Dmytest=true help

will execute the target help.

Yet the target help will never execute using the maven plugin unless
there is a property declaration.

    <property name="mytest" value=""/>

There are a number of properties used in the etc/build.xml that are
not declared. This is preventing the target sql-execute-derby from
running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
properties will fix this.

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

This and copying the derby jar to tomcat are blocking the maven 2
build. At the moment I don't know where that should be done.
-- 
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



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



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


RE: Resolved the Maven 2 build error with the Derby embedded database

Posted by Hajo Birthelmer <Ha...@BlueSunrise.com>.
Hi folks...

This is also related to Mark's and Mikko's email thread " Resolved the Maven
2 build error with the Derby embedded database"...

>From http://ant.apache.org/manual/index.html :
Ant will only check whether the property has been set, the value doesn't
matter. A property set to the empty string is still an existing property.
For example:

    <target name="build-module-A" if="module-A-present"/>

    <target name="build-own-fake-module-A" unless="module-A-present"/>

In the first example, if the module-A-present property is set (to any value,
e.g. false), the target will be run. In the second example, if the
module-A-present property is set (again, to any value), the target will not
be run.


Having said that, setting the property below is not what we should do, since
it would (let me get rid of the conditional - it does) break everything else
since now the build file thinks that derby is always set.
Mark is right in that the property needs to be set for derby (to anything
for that matter) and only if derby is the database, but we need to find out
why the condition to do so doesn't get executed 


 
Hajo Birthelmer

hajo@bluesunrise.com
office     : +01.707.773.4646
cell        : +01.707.318.9275
 

-----Original Message-----
From: Philip Mark Donaghy [mailto:philip.donaghy@gmail.com] 
Sent: Wednesday, January 24, 2007 3:32 PM
To: Jetspeed Developers List
Subject: Resolved the Maven 2 build error with the Derby embedded database

Hi, It seems the maven ant plugin requires that properties be declared
in the build file to be acknowledged. Example,

    <target name="help" if="mytest">

The property mytest doesn't need to be declared when running this
target with Ant. The command,

ant -Dmytest=true help

will execute the target help.

Yet the target help will never execute using the maven plugin unless
there is a property declaration.

    <property name="mytest" value=""/>

There are a number of properties used in the etc/build.xml that are
not declared. This is preventing the target sql-execute-derby from
running. Declaring the o.a.j.is.derby and o.a.j.is.derby.embedded
properties will fix this.

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

This and copying the derby jar to tomcat are blocking the maven 2
build. At the moment I don't know where that should be done.
-- 
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



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