[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...
|
In response to the question about jarring up the database directory, I have
always been using the derby database without making the database a jar file.
Since I wasn't the creator of this script, I'm not sure what is the purpose
of this step. There may be a derby feature that allows the database
directory to be jarred up. But it is safe to ignore that error, or remove
the step for jarring up the database directory. I will open a bug to
address this problem.
Thanks,
Hubert
"David Whiteman" <david_whiteman@xxxxxxxxxx> wrote in message
news:f9coan$3ob$1@xxxxxxxxxxxxxxxxxxxx
> Michael Moser wrote:
>>
>> "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.
>
> I run them within Eclipse too, but when you run an Ant script there, it
> shows up as a launch configuration. So I edit the launch configuration on
> the Run... menu to set any command line arguments. I'm not convinced
> setting it as an Ant property is the same as setting a command line
> argument.
>
>> 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?
>
> I'll have to defer to one of the data collection experts on these
> questions...
>
> David