You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by LukeS <lu...@gmail.com> on 2009/11/25 17:58:47 UTC
Ant API
I'm interested in embedding Ant into an application and would like to use the
Ant api.
I want to do this because there are a few tasks I want to perform (CVS
integration, connecting to DB) and it seems like it it would be easier to
call Ant to do this:
http://api.dpml.net/ant/1.7.0/index.html?overview-summary.html
I was wondering if anyone could refer me to some sort of documentation or
references with some examples of best practice for using this API.
Thanks!
--
View this message in context: http://old.nabble.com/Ant-API-tp26516343p26516343.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant API
Posted by Robert Anderson <ri...@gmail.com>.
For scp, Ant uses jsch... http://www.jcraft.com/jsch/
There are several examples in the source, or you could look at the scp ant
tasks source.
-Rob Anderson
On Thu, Nov 26, 2009 at 8:13 AM, Rebhan, Gilbert <
Gilbert.Rebhan@huk-coburg.de> wrote:
>
>
> -----Original Message-----
> From: LukeS [mailto:luke.shannon@gmail.com]
> Sent: Thursday, November 26, 2009 4:50 PM
> To: user@ant.apache.org
> Subject: Re: AW: Ant API
>
> /*
> Based on your answer and the one previous I might do CVS and SVN
> integration
> with APIs rather than Ant. However I still feel with file transfer with SCP
> will be best done with Ant via Leaf Cutter.
> */
>
> i searched for a simple to use ssh library some time ago
> and ended with Trilead ssh, which was very simple to use.
> Unfortunately Trilead ssh ain't developed / supported anymore.
>
> but there are two other promising java ssh libraries =
> http://www.zehon.com/index.html which has a bunch of examples
> or
> http://www.appgate.com/index/products/mindterm/
> which is free for limited use (25 users).
>
> i looked also on JSch http://www.jcraft.com/jsch/ , but didn't like it.
>
>
> Regards, Gilbert
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
RE: Ant API
Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
-----Original Message-----
From: LukeS [mailto:luke.shannon@gmail.com]
Sent: Thursday, November 26, 2009 4:50 PM
To: user@ant.apache.org
Subject: Re: AW: Ant API
/*
Based on your answer and the one previous I might do CVS and SVN integration
with APIs rather than Ant. However I still feel with file transfer with SCP
will be best done with Ant via Leaf Cutter.
*/
i searched for a simple to use ssh library some time ago
and ended with Trilead ssh, which was very simple to use.
Unfortunately Trilead ssh ain't developed / supported anymore.
but there are two other promising java ssh libraries =
http://www.zehon.com/index.html which has a bunch of examples
or
http://www.appgate.com/index/products/mindterm/
which is free for limited use (25 users).
i looked also on JSch http://www.jcraft.com/jsch/ , but didn't like it.
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: Ant API
Posted by LukeS <lu...@gmail.com>.
Thanks Jan!
Very very useful.
It seems with Leaf Cutter having a Project instance would not be required,
at least looking at the samples they have shown in their docs.
Based on your answer and the one previous I might do CVS and SVN integration
with APIs rather than Ant. However I still feel with file transfer with SCP
will be best done with Ant via Leaf Cutter.
Luke
Jan.Materne wrote:
>
> Have a look at JavaFront
> http://svn.apache.org/repos/asf/ant/sandbox/javafront/
>
> Maybe Leafcutter will help too
> https://leafcutter.dev.java.net/
>
> When using Ant as library you should have a oata.Project instance given to
> the tasks. Many problems
> occur because this is not present.
>
>
> Jan
>
>>-----Ursprüngliche Nachricht-----
>>Von: LukeS [mailto:luke.shannon@gmail.com]
>>Gesendet: Donnerstag, 26. November 2009 04:12
>>An: user@ant.apache.org
>>Betreff: Re: Ant API
>>
>>
>>Thank you.
>>
>>I will check out this API. On my list of things to support
>>are: SVN, SCP,
>>CVS, Database connectivity, creating folders and zip and
>>unzipping archives.
>>You are right, I could be doing this directly with Java,
>>however it just
>>seems easier through Ant (I have a build file that does
>>everything I want
>>right now, it would take a while to write java code to do the same).
>>
>>I am fine with the CVS and SVN integration requiring the cvs binaries
>>installed in the system for now.
>>
>>I did find this which pretty much explains what I was looking for:
>>
>>http://onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=3
>>
>>
>>Robert Anderson-6 wrote:
>>>
>>> Actually the cvs ant task system.execs the cvs binary. You
>>can probably
>>> find
>>> pure java cvs api to use. A quick search turned up this...
>>> http://www.jcvs.org/
>>>
>>> For the database, I'm not sure what you are doing but there are some
>>> really
>>> great persistance layers worth looking at, like hibernate and ibatis.
>>> Otherwise just use the built in java.sql stuff for running
>>queries. Take a
>>> look at the source code for the Ant sql task, maybe it will
>>be usefull to
>>> you.
>>>
>>> -Rob Anderson
>>>
>>> On Wed, Nov 25, 2009 at 8:58 AM, LukeS
>><lu...@gmail.com> wrote:
>>>
>>>>
>>>> I'm interested in embedding Ant into an application and
>>would like to use
>>>> the
>>>> Ant api.
>>>>
>>>> I want to do this because there are a few tasks I want to
>>perform (CVS
>>>> integration, connecting to DB) and it seems like it it
>>would be easier to
>>>> call Ant to do this:
>>>>
>>>> http://api.dpml.net/ant/1.7.0/index.html?overview-summary.html
>>>>
>>>> I was wondering if anyone could refer me to some sort of
>>documentation or
>>>> references with some examples of best practice for using this API.
>>>>
>>>> Thanks!
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Ant-API-tp26516343p26516343.html
>>>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>> For additional commands, e-mail: user-help@ant.apache.org
>>>>
>>>>
>>>
>>>
>>
>>--
>>View this message in context:
>>http://old.nabble.com/Ant-API-tp26516343p26523798.html
>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/Ant-API-tp26516343p26531326.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: Ant API
Posted by Ja...@rzf.fin-nrw.de.
Have a look at JavaFront
http://svn.apache.org/repos/asf/ant/sandbox/javafront/
Maybe Leafcutter will help too
https://leafcutter.dev.java.net/
When using Ant as library you should have a oata.Project instance given to the tasks. Many problems
occur because this is not present.
Jan
>-----Ursprüngliche Nachricht-----
>Von: LukeS [mailto:luke.shannon@gmail.com]
>Gesendet: Donnerstag, 26. November 2009 04:12
>An: user@ant.apache.org
>Betreff: Re: Ant API
>
>
>Thank you.
>
>I will check out this API. On my list of things to support
>are: SVN, SCP,
>CVS, Database connectivity, creating folders and zip and
>unzipping archives.
>You are right, I could be doing this directly with Java,
>however it just
>seems easier through Ant (I have a build file that does
>everything I want
>right now, it would take a while to write java code to do the same).
>
>I am fine with the CVS and SVN integration requiring the cvs binaries
>installed in the system for now.
>
>I did find this which pretty much explains what I was looking for:
>
>http://onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=3
>
>
>Robert Anderson-6 wrote:
>>
>> Actually the cvs ant task system.execs the cvs binary. You
>can probably
>> find
>> pure java cvs api to use. A quick search turned up this...
>> http://www.jcvs.org/
>>
>> For the database, I'm not sure what you are doing but there are some
>> really
>> great persistance layers worth looking at, like hibernate and ibatis.
>> Otherwise just use the built in java.sql stuff for running
>queries. Take a
>> look at the source code for the Ant sql task, maybe it will
>be usefull to
>> you.
>>
>> -Rob Anderson
>>
>> On Wed, Nov 25, 2009 at 8:58 AM, LukeS
><lu...@gmail.com> wrote:
>>
>>>
>>> I'm interested in embedding Ant into an application and
>would like to use
>>> the
>>> Ant api.
>>>
>>> I want to do this because there are a few tasks I want to
>perform (CVS
>>> integration, connecting to DB) and it seems like it it
>would be easier to
>>> call Ant to do this:
>>>
>>> http://api.dpml.net/ant/1.7.0/index.html?overview-summary.html
>>>
>>> I was wondering if anyone could refer me to some sort of
>documentation or
>>> references with some examples of best practice for using this API.
>>>
>>> Thanks!
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Ant-API-tp26516343p26516343.html
>>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>
>>
>
>--
>View this message in context:
>http://old.nabble.com/Ant-API-tp26516343p26523798.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant API
Posted by LukeS <lu...@gmail.com>.
Thank you.
I will check out this API. On my list of things to support are: SVN, SCP,
CVS, Database connectivity, creating folders and zip and unzipping archives.
You are right, I could be doing this directly with Java, however it just
seems easier through Ant (I have a build file that does everything I want
right now, it would take a while to write java code to do the same).
I am fine with the CVS and SVN integration requiring the cvs binaries
installed in the system for now.
I did find this which pretty much explains what I was looking for:
http://onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=3
Robert Anderson-6 wrote:
>
> Actually the cvs ant task system.execs the cvs binary. You can probably
> find
> pure java cvs api to use. A quick search turned up this...
> http://www.jcvs.org/
>
> For the database, I'm not sure what you are doing but there are some
> really
> great persistance layers worth looking at, like hibernate and ibatis.
> Otherwise just use the built in java.sql stuff for running queries. Take a
> look at the source code for the Ant sql task, maybe it will be usefull to
> you.
>
> -Rob Anderson
>
> On Wed, Nov 25, 2009 at 8:58 AM, LukeS <lu...@gmail.com> wrote:
>
>>
>> I'm interested in embedding Ant into an application and would like to use
>> the
>> Ant api.
>>
>> I want to do this because there are a few tasks I want to perform (CVS
>> integration, connecting to DB) and it seems like it it would be easier to
>> call Ant to do this:
>>
>> http://api.dpml.net/ant/1.7.0/index.html?overview-summary.html
>>
>> I was wondering if anyone could refer me to some sort of documentation or
>> references with some examples of best practice for using this API.
>>
>> Thanks!
>> --
>> View this message in context:
>> http://old.nabble.com/Ant-API-tp26516343p26516343.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Ant-API-tp26516343p26523798.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant API
Posted by Robert Anderson <ri...@gmail.com>.
Actually the cvs ant task system.execs the cvs binary. You can probably find
pure java cvs api to use. A quick search turned up this...
http://www.jcvs.org/
For the database, I'm not sure what you are doing but there are some really
great persistance layers worth looking at, like hibernate and ibatis.
Otherwise just use the built in java.sql stuff for running queries. Take a
look at the source code for the Ant sql task, maybe it will be usefull to
you.
-Rob Anderson
On Wed, Nov 25, 2009 at 8:58 AM, LukeS <lu...@gmail.com> wrote:
>
> I'm interested in embedding Ant into an application and would like to use
> the
> Ant api.
>
> I want to do this because there are a few tasks I want to perform (CVS
> integration, connecting to DB) and it seems like it it would be easier to
> call Ant to do this:
>
> http://api.dpml.net/ant/1.7.0/index.html?overview-summary.html
>
> I was wondering if anyone could refer me to some sort of documentation or
> references with some examples of best practice for using this API.
>
> Thanks!
> --
> View this message in context:
> http://old.nabble.com/Ant-API-tp26516343p26516343.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>