reusable/master project files for a trunks branches?

Hi There,

The short of it: When you make a new branch with 99% of the same file structure and libraries within it, how can you use another branch's IDEA project files?

Not quite sure what the proper forum is for this :-/

Our codebase is a large J2EE, Spring, Hibernate web-app and we use BitKeeper for source control.

We store libraries/dependencies within branches (thus any branch will have all it needs with relative path under its root).

BitKeeper is very distributed, so we're very often making branches and later pulling them into the main trunk. This is really easy with BK, but I can't get working IPR, IML, and IWS files that I can port around whenever I make my own branch.

My goal is to get all the Facets all working (that alone is about 4,000 discussion posts away for me), but for now, I just want a project I can port around so I don't have to wizard a new one every time.

I've tried (of course) copying the \*.i\* to the new branch's root directory. I seem to remember this working for Idea6. Now (on 7.0.4), however, it opens a project with the directory structure apparently intact, but each directory reports empty (i.e. it thinks there's no files in the whole tree). I can't explore to anything nor Ctrl-Shift-N.

I've tried clicking the synchronize buttons (though, honestly, these rarely seem to do anything for me) and they do nothing, and I tried clearing the cache, which, upon reload, seemed to scan a lot of the lib jars, but never any of my source code; same result.

I don't see any xml in the iml and ipr files to force it to rescan?

Please help! I love IDEA and I want to be able to use it across repositories. Again the goal is eventually perfect facet functionality and the \*.i\* files under source control, but this would be a start!

Thanks again,
John Marnell

Comment actions Permalink

Are the ipr and iml files in trunk? If so why don't they make it into the branches?

Also, you don't want iws in version control it is a personal workspace, just ipr and iml.

Comment actions Permalink

hi michael,

thanks for the reply. they're not currently in the trunk, but even if they were, this should be equivalent of copying them to any new branch root, no? what i'm currently doing now is this:
1) iml and ipr's are only local to a developer, not in BitKeeper source control.
2) locally on a dev box will be something like the following dir tree:
/projects/branch1/src //src is the entire code tree, all contained in source control
/projects/branch1/idea.ipr, idea.iml //these work if i create them from scratch, and point them to the src-controled (outside of IDEA, tho)
//src tree directory with relative path structure, e.g. MODULE_DIR$/src etc

now it comes time to branch and work on something else, so i do, and i end up with:
/projects/branch2/src //src controlled, as before
and so i'll copy the IDEA files to
/projects/branch2/idea.ipr, idea.iml

again, the ipr and iml are all relative paths, so, in theory, they should work out of the box, but what happens is that they don't see any files, just an empty directory tree; i can't explore nor search for .java or xml, even after trying to resync / clear the cache.

why won't this work? what am i doing wrong here?
and what diference would keeping the iml and ipr in src control (again, this is this goal later, but it shouldn't fix the problem i'm currently having, correct?)

thanks so much!


Please sign in to leave a comment.