Recomended way to use IntelliJ and Maven

Hi

do anyone have advices on how to use IntelliJ and Maven when having the following things in mind:

- We want our Maven pom's to be the master configuration.
- But we also want to share (have in verision control) our ipr/iml-files.

Should I create new project by importing from external model or should I choose open project and point to the projects pom?

Thanks
Jørund

4 comments
Comment actions Permalink

isn't this contradictory ?

If you keep both in version control you end up having two different project definitions that may very well be (or become) different.
How would you expect the conflicts (dependencies for example) to be sorted out ?

0
Comment actions Permalink

Well, I was hoping it would work:
- You load the project by opening the ipr-file.
- IntelliJ recognises any changes in the poms and changes the ipr-file if necessary... then the first one to detect ipr changes commits them.

I thought this will give advantage because you then could share settings like: Run configs, Error settings, Inspections settings. And also you can create Inspections builds with TeamCity (cause it needs the ipr).

Does anyone work in this way I have explained?

Thanks.

0
Comment actions Permalink

Jørund,

Yes, you may use the 'auto-reimport' option to make IDEA automatically recognize changes in pom and modify ipr files correspondingly. This options is available during initial project importing and in the Maven options->Import dialog.

You may also use manual reimport if you prefer so.

0
Comment actions Permalink

Yes, it works! All ipr and iml files are in version control now.

Thanks a lot!

0

Please sign in to leave a comment.