IDE project setup

  • Anonymous - 2012-03-16

    Hi all.

    Do you have any suggestions on how to setup the Moqui project in an IDE (I use
    Idea, but Eclipse or other would be fine):

    • what IDE (if any) are you using?
    • what kind of setup do you use (classpaths, git plugins, gradle plugins etc...)?
    • how do you manage the files from the various git repositories (Core, Mantle, PopCommerce)?

    I use Idea, that has a plugin for Gradle; in theory it should be able to
    setup a project by reading the build.gradle file but unfortunately this
    doesn't work with, at least with the build.gradle file in Moqui.

    Unfortunately, Idea is not doing a good job setting up the project because it
    hides a lot of useful resources... I will have to spend more time on Idea
    setup but if any of you have suggestions I would greatly appreciate.



  • David E. Jones

    David E. Jones - 2012-03-16

    I use IntelliJ IDEA (just the Community Edition) and have the project setup
    manually (I haven't tried setting it up based on the gradle files... and not
    sure what they need to be like for that to work).

    Basically I just have two library directories configured for the project
    (framework/lib and framework/lib/fop). I have 4 source directories setup (all
    under framework/src): api/java, main/java, main/groovy, and start/java (all
    under a single "module" in the project).

    I've been using command-line git on OS X, and I've tried a tool called
    "SourceTree" which is a more visual git client for Mac, but I very rarely use
    it. I haven't tried committing, pushing or pulling through IDEA, but I suppose
    it would support it.

    For mantle I just have the git root directory for it sitting right in the
    moqui/runtime directory, and for PopCommerce I have the checked out git root
    directory sitting in the moqui/runtime/component directory. The runtime/mantle
    directory is in the .gitignore file so you won't see command line complaints
    for that, but when I do a "git status" it always lets me know that the
    PopCommerce directory is unknown to that git repo, but if you go into that
    directory you can do git stuff in that separate repo just fine.

    IDEA complains about "invalid git roots" or something like that, but other
    than the error message I haven't run into any problems... of course I don't
    use IDEA for the git operations so if you do there may be issues with that.

    As I understand it, in a local git repository you can import code from
    multiple other git repositories and push/pull with each just fine, but I
    haven't tried that yet. I think that's the "correct" way to do it though, and
    chances are IDEA would work better that way.

    In IDEA make sure you're using the "Project" or "Project Files" browser and
    not the "Packages" or other things (these are selected in the drop-down just
    above the expanding tree area in that little window on the left, or wherever
    you have it).

  • David E. Jones

    David E. Jones - 2012-03-16

    I'd also be interested in hearing what others are using and what their
    experiences have been...

  • Joe Eckard

    Joe Eckard - 2012-03-16

    IDEA complains about "invalid git roots" or something like that

    I would see that as well any time I created a project that had git submodules,
    but it was fairly easy to fix - just go to preferences > Version Control (top
    level, not Git specific).

    I don't use IDEA for the git operations so if you do there may be issues
    with that

    I tried out basic git operations in the IDE - it works fine but I prefer the
    command line as well - maybe that's just a habit from how I learned to use git
    (and svn / cvs). The same applies for building and running projects using ant
    / maven - it works fine in the IDE, but just feels much faster to have a
    terminal open and use the command line.

  • Anonymous - 2012-03-16

    Thank you, it really helps!

    David, I have now mostly the same setup: IDEA CE with one project (2 lib, 4
    source folders, one module); I use the command line for gradle and git.

    And now a silly question: how do I browse non source folders and files, e.g.
    the ones in the "runtime" folder?

    Even if I use the Project/Project Files view Idea doesn't show me them.

    By the way, thank you; I am going to start my experiment/study with this


  • David E. Jones

    David E. Jones - 2012-03-16

    That's weird about the runtime folder and such not showing up... I've never
    run into that.

    Is the moqui/framework directory the root directory for the IDEA project
    instead of the moqui directory?

  • Anonymous - 2012-03-17

    Yes, the root folder was right: I fixed this by editing the project settings
    by "Adding a content root" for the "runtime" folder.

    Now I am all set up, thanks


  • Jacques Le Roux

    Jacques Le Roux - 2012-03-18

    Thanks guys,

    I did not get a chance (or the energy) to look seriously at Moqui, nor to use
    recent versions of IntelliJ and did not use much Git. This will hopefully give
    me an easier way of doing it...


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks