Hello,

Here is a working version of the problem (note the addition of the
fork="true" attribute, which was necessary for me to make it work).

<project default="war:webapp"
  xmlns:j="jelly:core"
  xmlns:m="maven"
  xmlns:deploy="deploy"
  xmlns:ant="jelly:ant">
  
    <goal name="hsql:start-server">
        <echo>Starting HSQLDB Server</echo>
        <ant:java classname="org.hsqldb.Server"
            classpathref="maven.dependency.classpath"
            fork="true">
            <arg value="-database.0"/>
            <arg value="${maven.hsql.server.database.0}"/>
            <arg value="-dbname.0"/> 
            <arg value="${maven.hsql.server.dbname.0}"/>
        </ant:java>
        <echo>HSQLDB Server Started</echo>
    </goal>
  
        <goal name="hsql:start-manager">
        <echo>Starting HSQLDB Database Manager</echo>
        <ant:java classname="org.hsqldb.util.DatabaseManager"
            classpathref="maven.dependency.classpath"
            fork="true"/>
        <echo>HSQLDB Server Started</echo>
    </goal>
</project>  


It could be interesting to have a hsqldb plugin, since hsqldb is a full java
rdbms ?
What about it ?

Do you know if there is an effort already made in this direction, even if
not yet in a "publishable" state ?



-----Message d'origine-----
De : Laurent PETIT [mailto:[EMAIL PROTECTED]
Envoy� : lundi 20 d�cembre 2004 17:37
� : 'Maven Users List'
Objet : RE: maven as a tool to launch hsqldb server ?


Thanks a lot Pascal, 

This solution looks good for me (of course I'll clean up and put some
variables from build.properties file, but the main idea of using an ant task
deserves interest).

cu,

-- 
Laurent

-----Message d'origine-----
De : Pascal Thivent [mailto:[EMAIL PROTECTED]
Envoy� : lundi 20 d�cembre 2004 17:01
� : Maven Users List
Objet : Re: maven as a tool to launch hsqldb server ?


Hi,

On Mon, 20 Dec 2004 13:16:14 -0200, Felipe Leme <[EMAIL PROTECTED]> wrote:
> On Mon, 2004-12-20 at 12:46, Laurent PETIT wrote:
> 
> > is there a way to start some main() method of a class via a maven xxx
call ?

It should be easy to call the org.hsqldb.Server from maven using the
ant <java> task. Something like that in your maven.xml :

    <goal name="hsql:start">
        <echo>Starting HSQLDB</echo>
        <ant:java classname="org.hsqldb.Server"
            classpathref="maven.dependency.classpath">
            <arg line="-database.0 mydb"/>
            <arg line="-dbname.0 xdb"/>
        </ant:java>
        <echo>HSQLDB Started</echo>
    </goal>

This is a starting point and is absolutly not finished. Nothing is
dynamic, location of database file need to be customized...

> 
> Take a look on the test cases for the hibernate plugin, they use hsqldb
> (and hence start the server).

I may be wrong but I think they are executing HSQLDB in "In-Process
(Standalone) Mode".

> 
> I was thinking about writing an hsqdlb plugin some time ago, but haven't
> had the time to play with it though...
> 
> -- Felipe
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to