git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Newbie questions regarding jgit
@ 2008-11-12 22:37 Robin Rosenberg
  0 siblings, 0 replies; 15+ messages in thread
From: Robin Rosenberg @ 2008-11-12 22:37 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: Farrukh Najmi, git

(resend without HTML)
tisdag 11 november 2008 22:37:40 skrev Jonas Fonseca:
> On Tue, Nov 11, 2008 at 21:44, Farrukh Najmi
> <farrukh@wellfleetsoftware.com> wrote:
> > Hi all,
> 
> Hello,
> 
> > I am git newbie and looking to use jgit in a servlet endpoint.
> 
> Sounds interesting. I have been thinking about how hard it would be to
> write a very simpe jgitweb kind of thing and am very interested to
> hear more about your experiences.

Consider this: 
http://www.jgit.org/cgi-bin/gitweb/gitweb.cgi?p=EGIT-jee.git;a=shortlog;h=rr/jeegitweb

It's an toy experiment with taglibs. Unfortunately the JSP doesn't even compile (!) anymore,
maybe someone can spot the error. Something very close to this did work a while ago.

The example jsp is here:
http://www.jgit.org/cgi-bin/gitweb/gitweb.cgi?p=EGIT-jee.git;a=blob;f=org.spearce.jeegit web/WebContent/index.jsp;h=d065d9f5a725a161a640e58e3be4d5b3a0666b5e;hb=fabffb50f0a020ff9b1653c090675bbd56dcc80a

-- robin

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Newbie questions regarding jgit
@ 2008-11-12 22:36 Robin Rosenberg
  0 siblings, 0 replies; 15+ messages in thread
From: Robin Rosenberg @ 2008-11-12 22:36 UTC (permalink / raw)
  To: Farrukh Najmi; +Cc: git

(resend without HTML)
tisdag 11 november 2008 22:12:58 skrev Farrukh Najmi:
> 
> I should clarify that I am not using eclipse nor am I using any GUI. My 
> objective is to have Java API access to git from within a servlet using 
> jgit. At present, all I have to go on is javadoc and its not clear where 
> to begin if I simply wish to create, read and update files in a git repo 
> from within the servlet java code.
>
We do not have a tutorial. The JUnit tests are the best examples on 
how to use the API today. I did some experiement wit J2EE and created
some jsp tags, but that's for JSP only and mostly experimental. To
comply with the JEE spec one should create a resource manager for
Git to deal with scalability when many users try to access repos.

> > I am git newbie and looking to use jgit in a servlet endpoint.
> >
> > Where can I find a public maven repo for gjit? It seems there is one 
> > somewhere because of the following file in src tree:
> >
> > jgit-maven/jgit/pom.xml

We do not use maven ourselves right now, though that might change, so
there is not public maven repository for jgit just yet. What do I need to
do to set it up?

> >
> > For now I have built the jar using /make_jgit.sh and installed the pom 
> > manually using m
> >
> > mvn install:install-file -DpomFile=jgit-maven/jgit/pom.xml 
> > -Dfile=jgit.jar

The pom.xml works for building jgit. cd to the mave dir and type mvn
and watch it build (and run unit tests if you ask it to).

-- robin

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Newbie questions regarding jgit
@ 2008-11-11 20:44 Farrukh Najmi
  2008-11-11 21:12 ` Farrukh Najmi
  2008-11-11 21:37 ` Jonas Fonseca
  0 siblings, 2 replies; 15+ messages in thread
From: Farrukh Najmi @ 2008-11-11 20:44 UTC (permalink / raw)
  To: git


Hi all,

I am git newbie and looking to use jgit in a servlet endpoint.

Where can I find a public maven repo for gjit? It seems there is one 
somewhere because of the following file in src tree:

jgit-maven/jgit/pom.xml

For now I have built the jar using /make_jgit.sh and installed the pom 
manually using m

mvn install:install-file -DpomFile=jgit-maven/jgit/pom.xml -Dfile=jgit.jar

I have added the following dependency to my maven project's pom.xml:

   <dependency>
     <groupId>org.spearce</groupId>
     <artifactId>jgit</artifactId>
     <version>0.4-SNAPSHOT</version>
   </dependency>

Now I am wondering where to begin to learn how to do the equivalent of 
the following commands via the gjit Java API:

    * git add /file/
    * git rm /file/
    * git mv /file
    * Whatever is the git way to get a specific version of a file


I am hoping that there aremore docs, samples, tutorials etc. somewhere 
that I am missing. Thanks for any help you can provide. Some pointers or 
code fragments would be terrific.

-- 
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-11-12 22:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 22:37 Newbie questions regarding jgit Robin Rosenberg
  -- strict thread matches above, loose matches on Subject: below --
2008-11-12 22:36 Robin Rosenberg
2008-11-11 20:44 Farrukh Najmi
2008-11-11 21:12 ` Farrukh Najmi
2008-11-11 21:37 ` Jonas Fonseca
2008-11-11 21:44   ` Shawn O. Pearce
2008-11-11 22:01     ` Jonas Fonseca
2008-11-11 23:11       ` Shawn O. Pearce
2008-11-12  2:24         ` Imran M Yousuf
2008-11-12 12:51       ` Farrukh Najmi
2008-11-12 14:05   ` Farrukh Najmi
2008-11-12 14:33     ` Farrukh Najmi
2008-11-12 17:56       ` Farrukh Najmi
2008-11-12 18:30         ` Jonas Fonseca
2008-11-12 19:29         ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).