History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-23723
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Anton Makeev
Reporter: B
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Maven Import does not find projects

Created: 27 Jun 07 16:58   Updated: 06 Dec 07 18:58
Component/s: Maven Integration
Fix Version/s: Selena 7.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive maven_bug.zip (6 kb)


Build: 7,027
Fixed in build: 7,589
Severity: High


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
Vladislav Kaznacheev - 03 Jul 07 14:50
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 - 17 Jul 07 17:49
Is anything going on with this bug...I can't use this version if I can't import from maven

B - 15 Aug 07 12:17
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?


Vladislav Kaznacheev - 31 Aug 07 09:11
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.


Vladislav Kaznacheev - 31 Aug 07 09:15
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 - 31 Aug 07 15:11
I fix this with installing project by maven and copy files with version "correction"

If it needed, I can publish this script.


Dan Allen - 18 Oct 07 22:13 - edited
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 - 20 Oct 07 01:24
maven embedded has problems with resolving artifacts with variables.
you can use scripts which I has published in IDEADEV-22126

Anton Makeev - 12 Nov 07 17:22
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 - 05 Dec 07 15:43
Fix will be available right AFTER 7.0.2