Some thoughts about Intellij

I love it. I really enjoy using it. I am using 7.0.4 right now. There are a couple of things that I am not a big fan of however. And this is the biggest one I can think of is I have my IDE setup a certain way including the UI like how much of the find usages section at the bottom should occupy in terms of real estate, or the 'scroll from source' button clicked in the Project side tab etc etc. The annoying thing is when I do mvn idea:clean and then mvn idea:idea, all of that gets reset! Even the tomcat server I had configured under Remote gets cleaned out.

What I want to know is why? I dont understand the logic of that at all. Why do these things all have to get reset everytime I do a clean and recreate the .iml/,jpr files? For me at least those settings are not per project they are more global than anything else. I dont see why they should disappear at all. It just bugs me. Any thoughts? I wonder if this should have been posted in the community thread rather than here.

Cheers guys and seriously I am loving 7.0.4 with the new updated subversion. It works with the tortoisesvn latest version I have installed.

7 comments
Comment actions Permalink

Hi Surya,

if you're using maven 2 (as I assume, since you write "mvn"), why don't you use the build-in support for importing pom.xml files (File | open project | select pom.xml file)
But in this construction the iws (workspace) file is recreated to a default one. (in the idea:idea step AFAIK by head) A solution to this is to create pre-goal and post-goal tasks to copy the current iws to an external location and afterwards back again. (or a similar construction)

HTH,
Ruben

0
Comment actions Permalink

Yes we are indeed using Maven 2. I will try what you suggested. But my point is why these IDE related settings are considered project related. I mean to me these settings that I mentioned are rather related to how I want the IDE to behave regardless of whatever project I want to load. These are sort of global settings for the IDE itself and not for the code i am loading up. Does that make sense? I guess not because a lot of people do not seem to be bothered.

Also another thing I have noticed is that Intellij just does not like to compile the whole project and let me run the unit tests. It usually finds soemthing wrong in the project while there isnt because Eclipse is able to run it just fine.

As an example in a unit test for some reason they have the paths to the spring configuration files hardcoded...sort of like /director/someconfig.xml and so on and they are then loaded up in a String array. But I get a context loading error caused by a FileNotFoundException which is very interesting because running the same test in Eclipse it just works! Thats why I have to have 2 IDEs installed on my machine. One when unit tests break and I have to figure out how to fix them and that is reserved for Eclipse...and then everything else through Intellij. I guess I just dont know enough about the IDE. :(

0
Comment actions Permalink

I tried your suggestion and tried to import from the pom.xml in Intellij 8.0. Its all good but unfortunately I dont see where I can specify the Maven repository that is already existing. Should not that be allowed as something the user can specify when setting up the project through the project wizard? I see after it has downloaded everything again and used the default user dir which in the case of Windows is under Docs and Settings..(very retarded)..and the project has been loaded up I see that in the Maven Projects tab on the right I can specify the home but that seems very inefficient mainly because its redownloading the repository again.

Is there something I am doing wrong or is this something that no one else has faced?

Thanks for reading. Any suggestions would be really helpful.

Cheers!

0
Comment actions Permalink

As an example in a unit test for some reason they have the paths to
the spring configuration files hardcoded...sort of like
/director/someconfig.xml and so on and they are then loaded up in a
String array. But I get a context loading error caused by a
FileNotFoundException which is very interesting because running the
same test in Eclipse it just works! Thats why I have to have 2 IDEs


How are those configuration files being loaded? Have you tried eg setting
the appropriate working directory in the run configuration you're using for
your unit tests? This problem should be easy enough to solve once you figure
out exactly what's going wrong.


0
Comment actions Permalink

Surya,

Are you using an external Maven installation, or the integrated Maven that comes with IDEA? I personally, prefer to point IntelliJ to my external Maven that is configured once and for all. Yes, by default, Maven creates the local repository under "${user.home}/.m2/repository", which on Windows is the ":\Documents and Settings\username\.m2\repository" folder. You can also change the default in your ${user.home}/.m2/settings.xml: ... /path/to/local/repo/ ... ]]>

When you create a new IDEA project from external POMs, you can specify whether you want to use the embedded or external Maven. You can also change that setting later at any time in the Maven Settings/Runner tab (I assume you know that to get to Maven Settings you need to click the "wrench" icon at the top of the Maven Tab.

HTH,
Constantine

0
Comment actions Permalink

You may also configure the repository in the Maven Projects Tool Window->Maven Settings->General tab.

0
Comment actions Permalink


When you create a new IDEA project from external POMs, you can specify whether you want to use the embedded or external Maven. You can also change that setting later at any time in the Maven Settings/Runner tab (I assume you know that to get to Maven Settings you need to click the "wrench" icon at the top of the Maven Tab.


In 8.0 Build 9013 the option to switch to an external maven as opposed to embedded isn't there.

0

Please sign in to leave a comment.