Sharing *.iml efficiency: keeping lines ordered

Hi,

we've been sharing *.iml files for years in my team.
It works well, but we always get some annoying updates due to XML
element reordering.

Basically is seems that some lines just change place, leading to a
change in the file, and then to a commit if one doesn't pay attention
to what exactly has changed.

Our project are all maven based, and it seems that that the refreshing
of the Maven config also causes unneeded changes in the sourceFolder
section.
This occurs very frequently in our case.

Do others face the same problem in sharing the IDEA config?

Could get a little focus on this problem for 10.5.x coming bug fixes?

That'd be awesome!

8 comments
Comment actions Permalink

Hi, Nodje.
Our team constantly encounters this porblem. Although we don't use Maven and synchronization doesn't impact us, but we do use different version of intellij within the team. Opening the same project in different version of idea brings modifications to project files, especially in inspection profiles, run configurations, iml files.

regards, Alex

0
Comment actions Permalink

Hi Alex,

good to know I'm not alone in my daily struggle.
I'm afraid yours is even more of a hardship, as you don't even have hope to get older version of IDEA change their behavior...

Could we get a little bit of attention for that problem in the next bug fix releases please?

--nodje

0
Comment actions Permalink
good to know I'm not alone in my daily struggle.

It's my pleasure :)

In practice, i created a dedicated change list "idea project files" and track there all the files to not pollute other changelists. and only if i know i have something to share (say new library added) then i commit it. This makes life easier.

regards, Alex

0
Comment actions Permalink

One more thing makes share project more difficult. In config files where are lot of references like:

<antReference name="Apache Ant version 1.8.2" />

in ant.xml or reference to tomcat:

APPLICATION_SERVER_NAME=\"Tomcat 6\">

i can't figure out how to provide portability for such references accross the team.

0
Comment actions Permalink

Go to Settings->Path Variables and create entries for any external path you need.

I use an entry "JAVA_DEV_PATH" pointing to my development dir, and my tomcat entries point to that: ...$JAVA_DEV_PATH/../tomcat/...

0
Comment actions Permalink

Hi, Carlos.
The problem is it's not a path, it's a reference to a system object. even if i replace it with some path variable, it will have obvious drawbacks:

  • it won't be clear for user which value he have to put where ($IDEA_ANT_16_NAME$ or $IDEA_TOMCAT_NAME$ aren't clear compare to $MAVEN_HOME$)
  • even if user realizes what to put there, he have no way to pickup values at project startup
my 
tomcat entries point to that: ...$JAVA_DEV_PATH/../tomcat/...

clarify please this. In which file did you put it? I assumed run configurations and ant.xml.

Thank you, Alex

Message was edited by: Alexander Ashitkin

0
Comment actions Permalink

Please see:
http://youtrack.jetbrains.net/issue/IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates

0
Comment actions Permalink

Sorry for the late reply, but have been offline a lot (and will be again too...)


... it won't be clear for user which value he have to put where ($IDEA_ANT_16_NAME$ or $IDEA_TOMCAT_NAME$ aren't clear compare to $MAVEN_HOME$)
... even if user realizes what to put there, he have no way to pickup values at project startup
... clarify please this. In which file did you put it? I assumed run configurations and ant.xml.


It seems you don't know how path variables work... I didn't put path variables anywhere, idea does all the work for me.

I have a dev directory something like this:

.../java
.../java/web/tomcat -7.0.11
.../java/lib/sources
.../java/lib/docs
etc

I created a JAVA_DEV path variable pointing to .../java and Idea by itself in all the configuration files (such as run configurations) substitutes paths starting with .../java/... with the path variable. For example, in workspace.xml a tomcat run option contains: <option name="SCRIPT" value="$JAVA_DEV$/web/apache-tomcat-7.0.11/bin/catalina.bat" /> all the work of idea. The only thing another developer has to do is create a JAVA_DEV path variable (and have the same dev directory structure of course)  and Idea goes to work with no problem. Note that this also works for the sources and docs for libs used by the projects: Idea stores the lib entries for sources and docs all prefixed with the $JAVA_DEV$ variable so that in another computer they also resolve to the right paths.

Of course, if every developer has it's own directory structure  (different from everyone else)  one path variable won't be enough and you will have to create a lot of them, but IMHO, some compatible structure (such as that enforced by maven) should be agreed upon and only the path to the root of the structure should be necessary.

Also ant will be an exception, mainly because it should work without Idea support. I have no problem with this, because all the files necessary for building my projects are inside the projects, so I don't need path variables. If I need files outside the project for an ant build, I almost always set a system  environment variable for this usage.

0

Please sign in to leave a comment.