On 11/11/2009, at 7:36 PM, Ольга Ткачева wrote:
> 2009/11/11 Aristedes Maniatis <ar..aniatis.org>
>
>>
>> I'd never have guessed some of the above. Are you saying that the
>> file
>> needs to look *exactly* like the above, including the string
>> "path-to-hsql-db-files"?
>>
>>
> you can write instead string "path-to-hsql-db-files" any path, as
> example I
> write now this path as derby.jdbc.url =
> jdbc:derby:/home/olga/derbyFiles;create=true, it works.
Sure, except Ari's question is about not hardcoding this path but
allowing maven to define it. And so long as that file is under /src/
test/resources/... and filtering is enabled for test resources then
the answer is yes.
use something like:
jdbc:derby:${derby.dir} etc
in your pom profile put any relevant properties to be used when
filtering resource file(s).
<profile>
...
<properties>
<derby.dir>some.default.value</derby.dir>
...
</properties>
</profile>
or just use default properties like:
${project.build.directory} (i.e., path to target dir)
http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
mvn .... -Dderby.dir=myCustomValueIfWantingNonDefault
with regards,
--Lachlan Deck
This archive was generated by hypermail 2.0.0 : Wed Nov 11 2009 - 14:30:37 EST