Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Duplicate
Assignee
Anton Makeev
Subsystem
Maven Integration
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Erik Pragt
    4 years ago (28 Aug 2007 02:04)
  • Updated by   Erik Pragt
    4 years ago (05 Dec 2007 13:21)
  • Jira: IDEA-14566
    (history, comments)
 
IDEA-14566 Facets lost when loading project from pom.xml
2
Issue is visible to: All Users
  The issue is visible to the selected user group only
I've created a project from an external model (Maven). For importing preferences, I checked the first option 'create temporary modules (re-import on project opening and synchronization'. After that, I added some Spring and Hibernate facets, and "all was well" (okay, it didn't work, but see my other bug reports (about Hibernate mappings not detected) for that). After closing IntelliJ, and reopening the project, the facets were gone. I added them, I closed IntelliJ, reopend it, and they were gone again.

So my guess is that IntelliJ is not saving this modules when loading from an Pom. If this is intended, it seems a bit useless, so I'm guessing it's a bug.

Issue was resolved
Comments (7)
 
History
 
Linked Issues (?)
 
Dmitry Jemerov
  Dmitry Jemerov
28 Aug 2007 13:30
4 years ago
Well, IntelliJ IDEA is behaving exactly as you tell it to. It can't save the facet information to pom.xml, and it can't save it to .iml files because you told it not to. So it doesn't save them anywhere.
Erik Pragt
  Erik Pragt
28 Aug 2007 14:06
4 years ago
Then it would be nice to know (somehow) which options are saved, and which aren't. There's not even a small remark about: if you make changes to your project settings, these will be lost. Using the pom.xml this way seems a bit useless this way...
Gabriel Dayley
  Gabriel Dayley
15 Nov 2007 22:03
4 years ago
I would have to agree with Erik on this one. The ramifications for choosing one option or another should either be completely obvious or at least explained. Regardless, not saving the settings, and facets would seem somewhat useless.
Henric Larsson
  Henric Larsson
23 Nov 2007 17:52
4 years ago
I agree with Erik and Gabriel on this.

Wouldn't it be sensible to use a combination of the poms and local project/module files. So that when the pom file is changed the project will pick the external change up but intellij project setting changes are still kept.
Anton Makeev
  Anton Makeev
04 Dec 2007 14:40
4 years ago
We will work on this in next bugfix release.
As a temporary workaround you can use 'create regular modules' import option.
Christian Nelson
  Christian Nelson
04 Dec 2007 21:17
4 years ago
Using build #7584, facets aren't lost (I haven't added or removed any of the ones detected by IDEA) but many of the facet settings are lost during maven synchronization. The attached screenshot shows before and after a maven synchronization.

Maven support is configured to create regular modules files. It seems to me that these settings should be saved in the imls that are generated. Upon synchronization, IDEA could merge the iml with any new data gleaned from pom changes.
Anton Makeev
  Anton Makeev
05 Dec 2007 13:21
4 years ago
please watch http://www.jetbrains.net/jira/browse/IDEADEV-20974.
we are working on this problem right now.