You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-dev@maven.apache.org by Jason van Zyl <ja...@maven.org> on 2004/01/15 21:56:24 UTC
Single point of entry
Hi Emmanuel,
What is the plan as far as a single point of entry to the API, I'm
finding it a little cumbersome at the moment.
Really, all I want to do is hand off the repository information and go.
I don't want to know anything about commands or wrappers I just want
something like:
Scm scm = factory.createScm( new MavenRepositoryAdapter( project ) );
Now I should have everything that I need to checkout, update, or
whatever else.
scm.checkout( directory );
scm.update( directory );
I'll take a closer look at the API while I'm trying to use it in
Continuum. If you've got stuff like this already I'll whip up some xdocs
if you give me the relevent examples.
--
jvz.
Jason van Zyl
jason@maven.org
http://maven.apache.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
Re: Single point of entry
Posted by Jason van Zyl <ja...@maven.org>.
On Fri, 2004-01-16 at 10:45, Emmanuel Venisse wrote:
> ----- Original Message -----
> From: "Jason van Zyl" <ja...@maven.org>
> To: <sc...@maven.apache.org>
> Sent: Thursday, January 15, 2004 9:56 PM
> Subject: Single point of entry
>
>
> > Hi Emmanuel,
> >
> > What is the plan as far as a single point of entry to the API, I'm
> > finding it a little cumbersome at the moment.
> >
> > Really, all I want to do is hand off the repository information and go.
> > I don't want to know anything about commands or wrappers I just want
> > something like:
> >
> > Scm scm = factory.createScm( new MavenRepositoryAdapter( project ) );
> >
> > Now I should have everything that I need to checkout, update, or
> > whatever else.
> >
> > scm.checkout( directory );
> >
> > scm.update( directory );
> >
> > I'll take a closer look at the API while I'm trying to use it in
> > Continuum. If you've got stuff like this already I'll whip up some xdocs
> > if you give me the relevent examples.
> >
>
> You can write something like this :
>
> MavenScmInfoAdapter adapter = new MavenScmInfoAdapter( project );
> adapter.setPassword( "apassword" ); //if it's necessary for the connection
> scmManager = new DefaultScmManager( adapter );
> Command cmd = scmManager.getCommand(CheckOutCommand.NAME); // or
> UpdateCommand.NAME ...
> cmd.setWorkingDirectory(directory);
> cmd.execute();
Ok, I will work with that but I will simplify things a little in my
Plexus component and then I'll show it to you.
> Emmanuel
--
jvz.
Jason van Zyl
jason@maven.org
http://maven.apache.org
the course of true love never did run smooth ...
-- Shakespeare
Re: Single point of entry
Posted by Emmanuel Venisse <em...@venisse.net>.
----- Original Message -----
From: "Jason van Zyl" <ja...@maven.org>
To: <sc...@maven.apache.org>
Sent: Thursday, January 15, 2004 9:56 PM
Subject: Single point of entry
> Hi Emmanuel,
>
> What is the plan as far as a single point of entry to the API, I'm
> finding it a little cumbersome at the moment.
>
> Really, all I want to do is hand off the repository information and go.
> I don't want to know anything about commands or wrappers I just want
> something like:
>
> Scm scm = factory.createScm( new MavenRepositoryAdapter( project ) );
>
> Now I should have everything that I need to checkout, update, or
> whatever else.
>
> scm.checkout( directory );
>
> scm.update( directory );
>
> I'll take a closer look at the API while I'm trying to use it in
> Continuum. If you've got stuff like this already I'll whip up some xdocs
> if you give me the relevent examples.
>
You can write something like this :
MavenScmInfoAdapter adapter = new MavenScmInfoAdapter( project );
adapter.setPassword( "apassword" ); //if it's necessary for the connection
scmManager = new DefaultScmManager( adapter );
Command cmd = scmManager.getCommand(CheckOutCommand.NAME); // or
UpdateCommand.NAME ...
cmd.setWorkingDirectory(directory);
cmd.execute();
Emmanuel