threads / rfc / 13781

[JGIT RFC] Mavenized JGit

Subject: [JGIT RFC] Mavenized JGit

## tl;dr

17 messages between Jun 3, 2008 and Jun 6, 2008.

replies: 16people: 5as markdown or json

Imran M Yousuf· Jun 3, 2008, 14:42 UTC · lore
Hi,

I have successfully Mavenized JGit (at least partially :)) to make it independent of IDE to develop on. I will also add a code-file format checker soon. Please have a look at it and let me know what you think and how it can be improved. If its helpful I will surely send out a patch in this regard. The one thing that I did not configure is the external test (exttst), doing that and the code format checker is my next step. The 'jgit-mavenize' branch of my fork of egit contains it. (http://repo.or.cz/w/egit/imyousuf.git?a=shortlog;h=refs/heads/jgit-mavenize).

Best regards,
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Robin Rosenberg· Jun 3, 2008, 16:56 UTC · re: Imran M Yousuf · lore

Re: [JGIT RFC] Mavenized JGit

tisdagen den 3 juni 2008 16.42.33 skrev Imran M Yousuf:
Show 11 quoted lines
> Hi,
> 
> I have successfully Mavenized JGit (at least partially :)) to make it
> independent of IDE to develop on. I will also add a code-file format
> checker soon. Please have a look at it and let me know what you think
> and how it can be improved. If its helpful I will surely send out a
> patch in this regard. The one thing that I did not configure is the
> external test (exttst), doing that and the code format checker is my
> next step.
> The 'jgit-mavenize' branch of my fork of egit contains it.
> (http://repo.or.cz/w/egit/imyousuf.git?a=shortlog;h=refs/heads/jgit-mavenize).

An abvious problem is that JGit does not handle symbolic links and those do not work well (if at all) under git on windows either. Cygwin will not do here, unless you accompany it with a cygwin java build (if such a thing exists). Mingw also does not support them.

-- robin
Shawn O. Pearce· Jun 3, 2008, 22:54 UTC · re: Robin Rosenberg · lore

Re: [JGIT RFC] Mavenized JGit

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
Show 15 quoted lines
> tisdagen den 3 juni 2008 16.42.33 skrev Imran M Yousuf:
> > I have successfully Mavenized JGit (at least partially :)) to make it
> > independent of IDE to develop on. I will also add a code-file format
> > checker soon. Please have a look at it and let me know what you think
> > and how it can be improved. If its helpful I will surely send out a
> > patch in this regard. The one thing that I did not configure is the
> > external test (exttst), doing that and the code format checker is my
> > next step.
> > The 'jgit-mavenize' branch of my fork of egit contains it.
> > (http://repo.or.cz/w/egit/imyousuf.git?a=shortlog;h=refs/heads/jgit-mavenize).
> 
> An abvious problem is that JGit does not handle symbolic links and those do
> not work well (if at all) under git on windows either. Cygwin will not do here,
> unless you accompany it with a cygwin java build (if such a thing exists). Mingw
> also does not support them.

I'm all for a change that widens the group of applications and users that can use jgit (heck, that's one reason we moved to it to a BSD license). But we really cannot abandon Windows users in that process, so yea, anything that tries to use symlinks is bad.

I don't think there is a Cygwin based version of the JVM. That would be a very interesting beast.

-- 
Shawn.
Robin Rosenberg· Jun 3, 2008, 23:30 UTC · re: Shawn O. Pearce · lore

Re: [JGIT RFC] Mavenized JGit

onsdagen den 4 juni 2008 00.54.18 skrev Shawn O. Pearce:
> I don't think there is a Cygwin based version of the JVM.  That would
> be a very interesting beast.

Looks like it could be possible to build it under Cygwin. http://download.java.net/jdk7/docs/build/README-builds.html#cygwin

-- robin
Imran M Yousuf· Jun 4, 2008, 03:52 UTC · re: Robin Rosenberg · lore

Re: [JGIT RFC] Mavenized JGit

The first version I mavenized JGit I moved the source code, but I thought that would come in for more criticism :), thus I chose the symlink option. Please let me know if a move based mavenizing would be welcomed or not.

Best regards,
Imran

On Wed, Jun 4, 2008 at 5:30 AM, Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:

Show 14 quoted lines
> onsdagen den 4 juni 2008 00.54.18 skrev Shawn O. Pearce:
>> I don't think there is a Cygwin based version of the JVM.  That would
>> be a very interesting beast.
> Looks like it could be possible to build it under Cygwin.
> http://download.java.net/jdk7/docs/build/README-builds.html#cygwin
>
> -- robin
>
>
>
>
>
>
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Shawn O. Pearce· Jun 4, 2008, 04:27 UTC · re: Imran M Yousuf · lore

Re: [JGIT RFC] Mavenized JGit

Imran M Yousuf <imyousuf@gmail.com> wrote:
> The first version I mavenized JGit I moved the source code, but I
> thought that would come in for more criticism :), thus I chose the
> symlink option. Please let me know if a move based mavenizing would be
> welcomed or not.
[please don't top-post on this list]

I'd rather us moving the code into a subdirectory than require a symlink. For Eclipse this is easy to change the directory that the code is in, we just have to edit the .classpath to move the source folder lower in the tree.

But this shows one reason why I don't use Maven I think. The fact that we need a "java" directory to hold our java code. What if another build system wants a different name? Grumble.

For the most part git-merge-recursive can handle a merge through
this sort of rename.  But we'd like to do this sort of thing at
some relatively stable point in time to try and minimize the impact
it has.
 
Show 7 quoted lines
> On Wed, Jun 4, 2008 at 5:30 AM, Robin Rosenberg
> <robin.rosenberg.lists@dewire.com> wrote:
> > onsdagen den 4 juni 2008 00.54.18 skrev Shawn O. Pearce:
> >> I don't think there is a Cygwin based version of the JVM.  That would
> >> be a very interesting beast.
> > Looks like it could be possible to build it under Cygwin.
> > http://download.java.net/jdk7/docs/build/README-builds.html#cygwin
-- 
Shawn.
Nigel Magnay· Jun 4, 2008, 06:40 UTC · re: Shawn O. Pearce · lore

Re: [JGIT RFC] Mavenized JGit

Show 5 quoted lines
>
> But this shows one reason why I don't use Maven I think.  The
> fact that we need a "java" directory to hold our java code.
> What if another build system wants a different name?  Grumble.
>

You don't. Just set the appropriate config item in pom.xml (sourceDirectory possibly, but my memory isn't good this morning) and you can use 'src' as it is currently. src/main/java is just the default.

Imran M Yousuf· Jun 4, 2008, 06:46 UTC · re: Nigel Magnay · lore

Re: [JGIT RFC] Mavenized JGit

On Wed, Jun 4, 2008 at 12:40 PM, Nigel Magnay <nigel.magnay@gmail.com> wrote:
Show 10 quoted lines
>>
>> But this shows one reason why I don't use Maven I think.  The
>> fact that we need a "java" directory to hold our java code.
>> What if another build system wants a different name?  Grumble.
>>
>
> You don't. Just set the appropriate config item in pom.xml
> (sourceDirectory possibly, but my memory isn't good this morning) and
> you can use 'src' as it is currently. src/main/java is just the
> default.

You are absolutely right in fact (your memory did not betray ;)) its <project><build><sourceDirectory>.

>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Shawn O. Pearce· Jun 4, 2008, 19:59 UTC · re: Imran M Yousuf · lore

Re: [JGIT RFC] Mavenized JGit

Imran M Yousuf <imyousuf@gmail.com> wrote:
Show 14 quoted lines
> On Wed, Jun 4, 2008 at 12:40 PM, Nigel Magnay <nigel.magnay@gmail.com> wrote:
> >>
> >> But this shows one reason why I don't use Maven I think.  The
> >> fact that we need a "java" directory to hold our java code.
> >> What if another build system wants a different name?  Grumble.
> >>
> >
> > You don't. Just set the appropriate config item in pom.xml
> > (sourceDirectory possibly, but my memory isn't good this morning) and
> > you can use 'src' as it is currently. src/main/java is just the
> > default.
> 
> You are absolutely right in fact (your memory did not betray ;)) its
> <project><build><sourceDirectory>.

If we can avoid doing this rename and instead just configure Maven to use the existing directory it would be better. Then we don't have to bother everyone's branches with this rename business.

-- 
Shawn.
Imran M Yousuf· Jun 5, 2008, 02:31 UTC · re: Shawn O. Pearce · lore

Re: [JGIT RFC] Mavenized JGit

On Thu, Jun 5, 2008 at 1:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 20 quoted lines
> Imran M Yousuf <imyousuf@gmail.com> wrote:
>> On Wed, Jun 4, 2008 at 12:40 PM, Nigel Magnay <nigel.magnay@gmail.com> wrote:
>> >>
>> >> But this shows one reason why I don't use Maven I think.  The
>> >> fact that we need a "java" directory to hold our java code.
>> >> What if another build system wants a different name?  Grumble.
>> >>
>> >
>> > You don't. Just set the appropriate config item in pom.xml
>> > (sourceDirectory possibly, but my memory isn't good this morning) and
>> > you can use 'src' as it is currently. src/main/java is just the
>> > default.
>>
>> You are absolutely right in fact (your memory did not betray ;)) its
>> <project><build><sourceDirectory>.
>
> If we can avoid doing this rename and instead just configure Maven
> to use the existing directory it would be better.  Then we don't
> have to bother everyone's branches with this rename business.
>
Will give it a try and let all know.
Best regards,
Imran
> --
> Shawn.
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Imran M Yousuf· Jun 6, 2008, 05:28 UTC · re: Shawn O. Pearce · lore

Re: [JGIT RFC] Mavenized JGit

On Thu, Jun 5, 2008 at 1:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 19 quoted lines
> Imran M Yousuf <imyousuf@gmail.com> wrote:
>> On Wed, Jun 4, 2008 at 12:40 PM, Nigel Magnay <nigel.magnay@gmail.com> wrote:
>> >>
>> >> But this shows one reason why I don't use Maven I think.  The
>> >> fact that we need a "java" directory to hold our java code.
>> >> What if another build system wants a different name?  Grumble.
>> >>
>> >
>> > You don't. Just set the appropriate config item in pom.xml
>> > (sourceDirectory possibly, but my memory isn't good this morning) and
>> > you can use 'src' as it is currently. src/main/java is just the
>> > default.
>>
>> You are absolutely right in fact (your memory did not betray ;)) its
>> <project><build><sourceDirectory>.
>
> If we can avoid doing this rename and instead just configure Maven
> to use the existing directory it would be better.  Then we don't
> have to bother everyone's branches with this rename business.

I have just tested it and it works fine. Now maven is configured to use the existing locations for source and it builds fine.

Best regards,
Imran
PS: This is the link to the commit
http://repo.or.cz/w/egit/imyousuf.git?a=commit;h=7c69b95cee245edd0701e09d5f0357f7ffbbd9ea
>
> --
> Shawn.
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Robin Rosenberg· Jun 6, 2008, 11:59 UTC · re: Imran M Yousuf · lore

Re: [JGIT RFC] Mavenized JGit

fredagen den 6 juni 2008 07.28.59 skrev Imran M Yousuf:
> I have just tested it and it works fine. Now maven is configured to
> use the existing locations for source and it builds fine.

I squashed the two commits involving pom.xml into a new branchy and it works here to. Still you have a duplicate of the test directory. Can that be fixed too?

-- robin
Imran M Yousuf· Jun 6, 2008, 12:40 UTC · re: Robin Rosenberg · lore

Re: [JGIT RFC] Mavenized JGit

On Fri, Jun 6, 2008 at 5:59 PM, Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:

> Still you have  a duplicate of the test directory. Can that be fixed too?

Actually I will give it a try checking what happens if the files are in maven test resources, will give it a try this weekend and update you all.

Best regards,
Imran
>
> -- robin
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Imran M Yousuf· Jun 4, 2008, 06:45 UTC · re: Shawn O. Pearce · lore

Re: [JGIT RFC] Mavenized JGit

On Wed, Jun 4, 2008 at 10:27 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 6 quoted lines
> Imran M Yousuf <imyousuf@gmail.com> wrote:
>> The first version I mavenized JGit I moved the source code, but I
>>...
>> welcomed or not.
>
> [please don't top-post on this list]
Sorry, but I thought that I was proposing something new and thus top-posted :)
Show 9 quoted lines
>
> I'd rather us moving the code into a subdirectory than require
> a symlink.  For Eclipse this is easy to change the directory that
> the code is in, we just have to edit the .classpath to move the
> source folder lower in the tree.
>
> But this shows one reason why I don't use Maven I think.  The
> fact that we need a "java" directory to hold our java code.
> What if another build system wants a different name?  Grumble.

I am sorry for my ignorance, I thought that maven was the most widely accepted java build tool, but what you said is a possibility.

Show 5 quoted lines
>
> For the most part git-merge-recursive can handle a merge through
> this sort of rename.  But we'd like to do this sort of thing at
> some relatively stable point in time to try and minimize the impact
> it has.

When I was working with the moved source code git detected the renames and propagated the changes, but I had to scrape it because of my stupidity my mavenized jgit was in jgit folder that clashed with the jgit shell script :). I would say once the move is done it would be safe to continue.

>
> --
> Shawn.
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Ittay Dror· Jun 5, 2008, 03:23 UTC · re: Imran M Yousuf · lore

Re: [JGIT RFC] Mavenized JGit

Imran M Yousuf wrote:
> I am sorry for my ignorance, I thought that maven was the most widely
> accepted java build tool, but what you said is a possibility.
>   

For what it's worth, Ant is the most popular build tool. Ant + Ivy (a dependency manager) is a great choice. My Next Best Thing (TM) is Gradle (www.gradle.org). I wouldn't choose Maven because it makes creating custom logic harder and some functionality (like assembly) is no mature. I can elaborate on the subject, if people are interested.

Ittay
-- 
Ittay Dror <ittayd@tikalk.com>
Tikal <http://www.tikalk.com>
Tikal Project <http://tikal.sourceforge.net>
Imran M Yousuf· Jun 5, 2008, 03:33 UTC · re: Ittay Dror · lore

Re: [JGIT RFC] Mavenized JGit

On Thu, Jun 5, 2008 at 9:23 AM, Ittay Dror <ittayd@tikalk.com> wrote:
Show 14 quoted lines
>
>
> Imran M Yousuf wrote:
>>
>> I am sorry for my ignorance, I thought that maven was the most widely
>> accepted java build tool, but what you said is a possibility.
>>
>
> For what it's worth, Ant is the most popular build tool. Ant + Ivy (a
> dependency manager) is a great choice. My Next Best Thing (TM) is Gradle
> (www.gradle.org). I wouldn't choose Maven because it makes creating custom
> logic harder and some functionality (like assembly) is no mature. I can
> elaborate on the subject, if people are interested.
>
Ah, thanks for shedding some light on it.
Best regards,
Imran
Show 8 quoted lines
> Ittay
>
> --
> Ittay Dror <ittayd@tikalk.com>
> Tikal <http://www.tikalk.com>
> Tikal Project <http://tikal.sourceforge.net>
>
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Imran M Yousuf· Jun 6, 2008, 05:31 UTC · re: Ittay Dror · lore

Re: [JGIT RFC] Mavenized JGit

On Thu, Jun 5, 2008 at 9:23 AM, Ittay Dror <ittayd@tikalk.com> wrote:
Show 6 quoted lines
>
> For what it's worth, Ant is the most popular build tool. Ant + Ivy (a
> dependency manager) is a great choice. My Next Best Thing (TM) is Gradle
> (www.gradle.org). I wouldn't choose Maven because it makes creating custom
> logic harder and some functionality (like assembly) is no mature. I can
> elaborate on the subject, if people are interested.

I have heard of Ant + Ivy but never got the chance to use it. And what I do for the messy-maven stuffs is I use Ant from maven. But there are few features of maven (which IMHO is not the discussion topic of this list) I like. Will checkout Gradle as well. Thanks for the hints :).

Best regards,
Imran
Show 9 quoted lines
>
> Ittay
>
> --
> Ittay Dror <ittayd@tikalk.com>
> Tikal <http://www.tikalk.com>
> Tikal Project <http://tikal.sourceforge.net>
>
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

← back to recent threads