[MOBY-dev] Re: Ant tasks

Yan Wong ywong at infobiogen.fr
Tue Mar 22 10:30:05 UTC 2005


Martin Senger wrote:

>>How about some ant tasks that would make registration to the central 
>>possible in a build file?
>>
>>    
>>
>   It is surely possible, but Ant is not helpful too much in this case - 
>at least I think:
>   The registration can be achieved by calling MobyCmdLineClient - and
>this can be done perfectly from Ant (Ant task can easily set CLASSPATH and
>call a Java application - MobyCmdLineClient is a Java application, of
>course). The problem starts with the parameters for this application (and
>there may be really *many* parameters for the registration). I have not
>find a way how to pass to an Ant target parameters from the Ant's
>command-line (let me know please if anybody knows how to do it).  
>Therefore, you have to expressed all parameters as Java properties, let
>Ant to put them in a file and then feed an application (it can be again a
>slightly modified MobyCmdLineClient, here is no problem) from this file. 
>So you have to do a lot of writing (setting properties) before you invoke 
>Ant - perhaps the same amount but I guess even more than writing a short 
>script where you can put all your registration parameters directly.
>   That's why I think that Ant is not too helpful for making registration. 
>But if people think that it should be there I can make such Ant target.
>
>   Cheers,
>   Martin
>
>  
>
I thought it was possible to add registration tasks as bioMoby 
registration requests are XML.

Something like could exit in an ant build file:

Maybe we do not need to fully translate a request in an ant like syntax 
but make the ant task understand the moby request

An ant task would look like this:

<target name="register" depends="init, compile, build-jar" 
description="Register the service on the bioMoby directory">
<registerService url="http://my.biomoby-directory.url">
<Category>moby</Category>
<serviceName>PhytoprotGetByAGICode</serviceName>
<serviceType>Retrieval</serviceType>
<authURI>genoplante-info.infobiogen.fr</authURI>
<URL>http://genoplante-info.infobiogen.fr/webservices/phytoprot-planet.py</URL>
<contactEmail>gpsupport at infobiogen.fr</contactEmail>
<authoritativeService>0</authoritativeService>
<Description>Access to Phytoprot's clusters, by accession 
number</Description>
<Input>
<Simple articleNameName="">
<objectType>Object</objectType>
<Namespace>AGI_LocusCode</Namespace>
</Simple>
</Input>
<Output>
<Collection>
<Simple articleName="">
<objectType>Object</objectType>
<Namespace>AGI_LocusCode</Namespace>
</Simple>
</Collection>
</Output>
<secondaryArticles>
<Parameter articleName='db_used'>
<datatype>String</datatype>
<default>AvsA</default>
<enum>AvsA</enum>
<enum>AvsP</enum>
</Parameter>
</secondaryArticles>
</registerService>
</target>

It would use the existant bioMoby XML syntax to describes tasks/parameters.

Regards

Yan




More information about the MOBY-dev mailing list