google-code-export / ivyidea

Automatically exported from code.google.com/p/ivyidea
1 stars 0 forks source link

IvyIDEA puts user-specific stuff in .iml files. #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
My module.iml files have a "<library name='IvyIdea'>" entry, which contains 
entries of the form:

   <root url="jar://$USER_HOME$/.ivy2/....">

Is there a way to avoid putting this into the module.iml files?  I share these 
files with others (they're checked into version control) and so I don't want 
them to refer to things that aren't part of the project.

I'm not sure how you would do this, but maybe create "IvyIdea-modulename" 
Project-level libraries?  

Original issue reported on code.google.com by kan...@dropbox.com on 3 May 2012 at 4:14

GoogleCodeExporter commented 9 years ago
It would be very helpful if the libraries had the module name in them.  I have 
3 modules all configured separately with Ivy and the libraries show up as 
"IvyIDEA" in the Project Explorer's "External Libraries" with the same name 
making it impossible to tell which library goes with which module.

Original comment by geardad...@gmail.com on 17 May 2012 at 4:22

GoogleCodeExporter commented 9 years ago
geardad,

There's an option to do that.  Under IntelliJ settings, go to the IvyIDEA 
screen and check the "Include Module Name" option.

Original comment by kan...@dropbox.com on 17 May 2012 at 9:54

GoogleCodeExporter commented 9 years ago
The "Include Module Name" option doesn't actually change the fact that the 
contents of the generated libraries are stored in the .iml files.  This is 
definitely sub-optimal for people that have the .iml files checked into version 
control.  Ideally, .iml files should rarely change but with this storage method 
every resolve can potentially modify them.  IDEA also doesn't like them 
changing out from under it so switching branches and so forth can be a pain.  
I'm not sure what the options are for storing library contents, but getting 
them out of the .iml files and into files specific for that purpose would be a 
big win IMO.

Original comment by twbec...@gmail.com on 9 Dec 2013 at 7:00

GoogleCodeExporter commented 9 years ago
You're right.  I was just providing a solution for the issue you mentioned in 
your post.  I still would like it if IvyIDEA stopped putting user-specific 
paths in shared project files.

Original comment by kan...@dropbox.com on 17 Dec 2013 at 12:09

GoogleCodeExporter commented 9 years ago
As far a I know there is no way to store dependency information outside the 
.iml file. JetBrains should provide an API for this before IvyIDEA can 
implement this.

Original comment by maarten....@gmail.com on 7 Jan 2014 at 3:33

GoogleCodeExporter commented 9 years ago
It seems like a possible workaround would be for IvyIDEA to use project 
libraries rather than module ones.  Project libraries seem to be stored in 
dedicated files in .idea/libraries.  A simple convention of prefixing the libs 
with the module name would prevent collisions.  Thoughts?

Original comment by twbec...@gmail.com on 11 Feb 2014 at 6:37

GoogleCodeExporter commented 9 years ago
That's a real problem. Form the IntelliJ docs:
"Development teams, normally, share the .iml module files through version 
control."

We did this but we always get collisions since IvyIDEA adds the Ivy cache path 
to the list of libraries.

Whatever the solution might be, the user specific paths must be stored in 
.idea/ instead of the .iml file.

I was just thinking if it is necessary to store the cache paths in a file at 
all? 
We have the ivy.xml that specifies what dependencies we have and that should be 
enough. After resolving the dependencies, cache paths might just be stored in 
memory. Or does IntelliJ automatically store these paths without IvyIdea have 
any chance to prevent it?

Original comment by jan.we...@googlemail.com on 16 Jun 2014 at 9:21