IntelliJ + Maven + TeamCity

Hi all!

We are currently using Maven for project configuration and TeamCity for building and testing our project. Our project is a web-app project and we have had most success with generating IDEA probject files with using mvn idea:idea. We are not sharing the ipr and iml files either.

But now we want to share the ipr/iml files by commiting them to SVN, so that we can be able to use TeamCity Inpections build.

1. What is the recommended approach to integrate Maven when you also want to share the ipr/iml files?. I am thinking of using the New Project -> Import from external model (Maven).
2. Should we only share the ipr or do we have to share the iml module files too?
3. I have noticed that in the iml-files the dependency paths is dependent on where maven is installed. How can we get IDEA to use a PATH VARIABLE for reaching the local maven repository. Or is it not common to share iml-files?

6 comments
Comment actions Permalink

Hi, Jørund,

If you simply want to run Maven build in TeamCity, you may use it's Maven build configurations.

If you still want to maintain your project files in the version control system, you have to share both ipr and iml files. Built-in Maven integration will automatically create a path variable for the local repository on initial project importing.

Why are you using idea:idea instead on built-in Maven integration by the way?

Thanks,
Anton Makeev

0
Comment actions Permalink

Hi Anton

I think you misunderstood me a little. Let me try to clarify...

We have currently been using mvn idea:idea. But we want to go away from that - we want to use IDEAs integrated Maven support instead.

Yes, we are using TeamCity's Maven build support already. But we want to put our IPR-files in version control so that we can also use the TeamCity Inspections runner.

Thanks Anton.

Edited by: Jørund Vier Skriubakken on Aug 4, 2008 6:58 PM

0
Comment actions Permalink

Hello,

BTW you may run Teamcity Inspections over your pom.xml (since version 3).

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hi Anton

I think you misunderstood me a little. Let me try to clarify...

We have currently been using mvn idea:idea. *But we want to go away
from that - we want to use IDEAs integrated Maven support instead.*

Yes, we are using TeamCity's Maven build support already. *But we want
to put our IPR-files in version control so that we can also use the
TeamCity Inspections runner.*

Thanks Anton.

Edited by: Jørund Vier Skriubakken on Aug 4, 2008 6:58 PM



0
Comment actions Permalink

Well, you may start using built-in integration right away and put your iml/ipr files in the version control. It should not require any special steps to perform.

Feel free to ask if you have questions about Maven integration.

Thanks.

0
Comment actions Permalink

Hi Anton

Yes I have made it work now. The clue was to commit all ipr and iml files and set eol-style = native on each ipr and iml file. Now we are sharing Module setup, Errors setup and Code Style, which is great!

The only thing left is to share the Tomcat run configuration. But as you can see it make us have to have same file structure:
]]>

0
Comment actions Permalink

You may use Path Variables to work this problem.
Just add a variable that points on your tomcat installation and all the patch will be saved with this variable at the beginning.

0

Please sign in to leave a comment.