|
Project
|
IntelliJ IDEA
|
|
Priority
|
Critical |
|
Type
|
Bug |
|
Fix versions
|
No Fix versions |
|
State
|
Fixed |
|
Assignee
|
Anton Makeev |
|
Subsystem
|
Maven Integration |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
108.65 |
<root POM> module1/<pom> module2/<pom> .. module5/<pom> group/<pom> group/gr-module1/<pom> group/gr-module2/<pom> specialGroup/<pom> specialGroup/sg-module1/<pom> specialGroup/sg-module2/<pom>
Here is my parent pom.xml: http://svn.codehaus.org/trails/trunk/trails/pom.xml
You can download the whole project from there.
The reason is that this project does not validate with the latest versions of Maven (try running validate goal).
If your replace references to ${hsqldb.version} with actual version number, I will import OK
I will try replacing the references to ${hsqldb.version} and I will get back to you.
BTW, It's working fine on 7274.
I use same version names, but do following to `resolve' them (works fine with eclipse, EAP 7274)
1. mvn install -D... (enable all profiles to install all modules)
2. make links in local maven repository (just copy) from <real version> to the '${version.name}' (dirs & jar/pom/sha) to get correct resolving 'group:artifact:${version}' (without resoulution of variable)
3. import project in Idea.
Scripts for 'patching' maven repository:
(this scripts can be run under the bash or BSD sh, small patching may be needed, under windows I use MinGW)
#!/bin/zsh rootdir=$1 fromexpr=$2 toexpr=$3 cmd=$(echo "s/${fromexpr}/${toexpr}/g") find ${rootdir} -type f | while read infile; do outfile=$(echo "$infile"|sed -e "${cmd}") [[ "$infile" == "$outfile" ]] && continue ; outdir=$(dirname $outfile) [[ -d "${outdir}" ]] || { rm -rf ${outdir}; mkdir -p "${outdir}"} ; rm -f "${outfile}" cp -v "${infile}" "${outfile}" done#!/bin/zsh PROJECT=~/projects/MyProject cat ${PROJECT}/project-fix | while read line;do dir=${MVN_REPOSITORY}/`echo $line|awk -F: '{print $1}'`; ver=`echo $line|awk -F: '\{print $2}'`; realver=`grep -h "<${ver}>" ${PROJECT}/pom.xml | sed -e 's/^.*>\([^<]*\)<.*$/\1/'`; patchdir "$dir" "$realver" "\${$ver}" done- in 7346 build*:
While importing from maven, modules are added to the maven structure correctly. but there're no modules in project structure.local maven is 2.0.7
2007-10-15 11:45:39,336 [ 38933] INFO - aven.project.MavenProjectModel -
If you do it would be great if you attach pom files so i could reproduce problem.
I'm using release 7.0.1 (build 7634).
If I replace references to ${*.version} with version numbers, I does import OK
The "soft links" workaround also works, but then I have to create files like:
~/.m2/repository/hsqldb/hsqldb/${hsqldb.version}/hsqldb-${hsqldb.version}.pom
~/.m2/repository/hsqldb/hsqldb/${hsqldb.version}/hsqldb-${hsqldb.version}.jar
Which is not only painful to do, it also doesn't let me use more than 1 different version for the same library.
I still think that Idea should be able to import projects that are using "<properties>" to define libraries version numbers.
Maven 2.0.7 does validate the project.
As i understand it correctly this issue was originally created by Nasokin Arseny having problems with multi-module project and profiles.
For you problem i've created separate issue IDEA-41750.
Thanks.
INFO - n.project.MavenToIdeaConverter - Cannot find module _<module name>_
WARN - org.jetbrains.idea.maven.project.MavenProjectReader - org.apache.maven.artifact.repository.DefaultArtifactRepository cannot be cast to org.apache.maven.model.Repository
Thanks for you feedback anyway! 8)