Idea Selena Bug with Maven2 generated iml’s


Idea Selena can’t read Maven2 generated iml files! I’ve been stumbling over the problem for a while and if it hit you recently I’m gonna help you out. The trick is to generate the file with Selena and overwrite it with Maven2. I’ll be specific.

What I used to do:

  • Run “mvn archetype:create -DgroupId=blah -DartifactId=wha …” and generate a Java or web project in the current directory.
  • Run “mvn idea:module” to generate the module descriptor for Idea
  • “Import existing module” in Idea, find the generated iml file using that spiffy file dialog.
  • Let stand for 10-30 seconds, enjoy

What I started doing:

  • Run “createMyJavaProj com.cliff.myproj myproj” (a linux script I wrote the combines the above two steps and removes the ugly system property setting syntax.)
  • “Import existing module” in Idea, find the generated iml file using that spiffy file dialog.
  • Let stand for 10-30 seconds, enjoy

What I now do:

  • Run “mvn archetype:create -DgroupId=blah -DartifactId=wha …” and generate a Java or web project in the current directory.
  • “Create new module” in Idea, find the generated project folder using that same spiffy file dialog.
  • Let stand for 10-30 seconds
  • Run “mvn idea:module” (via an Idea external tool setting mapped to my F10 key so really I just hit F10) to rewrite the module descriptor for Idea
  • Let stand for 30 seconds, enjoy

Better M2 support in Selena would be a big plus here but for now that’s what it takes. If you hit a similar issue and want to vent about it fill in the box below. Your name and contact info will be kept confidential, entrusted to the webservers and kind folks at WordPress. (Although that Matt character looks a little shady, I dunno.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 238 other followers

%d bloggers like this: