Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Anton Makeev 
Subsystem
Maven Integration 
Affected versions
Fixed in
Fixed in build
Next build 
Build
7027
Fixed in build
7589
Severity
0
  • Submitted by   B
    2 years ago (27 Jun 2007 16:58)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:48)
  • Jira: IDEA-39513
    (history, comments)

IDEA-39513

Maven Import does not find projects

When I import a project from the maven and give it the root directory of my application source, no projects/modules are found. There are plenty of POM in subdirectories beneath the root and yet nothing is found (even after exhaustive search).

The directory structure is as seen in the zip (there are a lot more poms in the project!)

The assembly pom uses properties defined in the global_build pom.xml (the global_build pom.xml is the parent). The assembly pom includes all the modules in our app. Each module contains sub-modules etc.

I tried defining the root directory as the parent directory of the directories in the zip (i.e. maven_bug would be the top dir). I also defined just the directory of the assembly as the root directory.

Attached is the global pom, assembly pom and an example of some module poms. Note that nothing is detected when I import the project.



Issue was resolved
Comments (10)
 
History (1)
 
Links
 
Exception Robot
  Exception Robot
03 Jul 2007 14:50
(2 years ago)
#permalink
For some reason Maven Embedder refuses to parse those files. I suspect it has something to do with properties (values in {}). I will investigate
B
  B
17 Jul 2007 17:49
(2 years ago)
#permalink
Is anything going on with this bug...I can't use this version if I can't import from maven
B
  B
15 Aug 2007 12:17
(2 years ago)
#permalink
Furthermore if I try to create the modules using mvn idea:idea, this new version will not open claiming that it has undefined variables. So basically no way to use IntelliJ 7.0 in our project.

Nice job, and good customer support.

What I understand from here is either stick to version 6.0 or to Eclipse 3.3, am I correct?
Exception Robot
  Exception Robot
31 Aug 2007 09:11
(2 years ago)
#permalink
Sorry about keeping you waiting. I know how you must feel, but please do not give up on us yet: this is not a release version, remember? :)

I have consulted with the author of Maven (Jason van Zyl). In fact Jason is sitting right beside me as I am typing this.

So here is what he said:
The Maven Embedder code included into IDEA integration does not support references to environment variables (${env.*), so your pom.xml files cannot even be validated.
Exception Robot
  Exception Robot
31 Aug 2007 09:15
(2 years ago)
#permalink
Sorry, that's not all (had hit Enter too soon).
The good news is that Jason is going to fix that in the Embedder, so we will have it fixed in the release version.
Nasokin Arseny
  Nasokin Arseny
31 Aug 2007 15:11
(2 years ago)
#permalink
I fix this with installing project by maven and copy files with version "correction"

If it needed, I can publish this script.
Dan Allen
  Dan Allen
18 Oct 2007 22:13
(2 years ago)
#permalink
build 7,361

I am finding that if a profiles.xml descriptor is present at all, the Maven Embedder chokes and IDEA fails to discover the Maven project. Since the profiles.xml cannot be used (I move it to the side), several properties don't get assigned, which then causes the first problem, unresolved variables. Unresolved variables also cause the Maven Embedder to choke, and IDEA fails to find the projects.

So what am I doing?

I have a profiles.xml with <activeProfile> declarations
I have matching profiles that set properties, such as <jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
I have dependencies that use these values, such as <artifactId>${jdbc.artifactId}</artifactId>

This is used all over the place in the Appfuse project, so it is pretty important to get fixed if you want to support those users, as well as others that have picked up on that usage of Maven 2.

Sadly, this all worked in 7M2
Nasokin Arseny
  Nasokin Arseny
20 Oct 2007 01:24
(2 years ago)
#permalink
maven embedded has problems with resolving artifacts with variables.
you can use scripts which I has published in IDEA-40982
Anton Makeev
  Anton Makeev
12 Nov 2007 17:22
(2 years ago)
#permalink
The problem with env.* vars has been solved. Please next eap or bugfix release.

As for your pom files - after fixing several issues with <parent> properties (i've repointed from global_build/dev/pom.xml to global_build/pom.xml and have added relativePath to parent into servers/pom.xml) it was correctly imported.
Anton Makeev
  Anton Makeev
05 Dec 2007 15:43
(2 years ago)
#permalink
Fix will be available right AFTER 7.0.2