[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.cosmos] Re: Failed trying to regenerate the samples - some handholding required...


"David Whiteman" <david_whiteman@xxxxxxxxxx> wrote in message news:f98aa9$uiq$1@xxxxxxxxxxxxxxxxxxxx
>...
> Try setting the value of derby.system.home on the command line of the
> Ant launch script to the location of your derby database directory.  For
> example:
>
> -Dderby.system.home=C:\apache-tomcat-5.5.23\webapps\database

I was actually trying to run these scripts from within eclipse (i.e. right-clicking on them in the Package explorer and then Run as... => ANT build), not on the command line.
So I first tried the corresponding equivalent of the above definition and added "derby.system.home" as an additional ANT property (using Windows => Preferences => Ant => Runtime => Properties tab). Alas, that didn't change anything.

However, analyzing the script a bit further I figured out, that the failing operation is actually the very last anyway. I.e. after the creation of the DB its content is for some reason zip-ed up as a jar which is placed into the project's home directory.
I don't quite understand what that's good for (backup of the virgin DB?) but if I understand this correct, then this line shouldn't change anything anyway with respect to the later running tomcat, serving data from that DB, should it?
 
What I thus did was prefixing the basedir-value with the above property, i.e.:

<target name="jarup">
<zip destfile="cosmosdb.jar"
basedir="${derby.system.home}/cosmosdb"/>
<echo message="Finished building cosmosdb"/>
</target>

And after that change I indeed got:
Buildfile: C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.cosmos.dc.local.registry\persistence_setup\build.xml
buildschema:
jarup:
[zip] Building zip: C:\JavaDevt\org.eclipse.cosmos\data-collection\org.eclipse.cosmos.dc.local.registry\persistence_setup\cosmosdb.jar
[echo] Finished building cosmosdb
cosmosdb:
BUILD SUCCESSFUL
Total time: 4 seconds

So, can you confirm that I didn't modify the semantic here, i.e. that
this script still does what the original script has been intended to do?
Why is the freshly created DB zipped up and copied over to the project's directory? Who or what tool is supposed to use it there?

Regards,
Michael