|
|
|
[
Permlink
| « Hide
]
Nasokin Arseny - 20 Sep 07 13:29 - edited
if it'll help. I can send pom structure with scripts for workaround maven-embedded bugs.
I'm having this same problem. I've upgraded from 7274 to 7312 (on ubuntu) and I lost the ability to import maven projects with multiple modules.
Here is my parent pom.xml: http://svn.codehaus.org/trails/trunk/trails/pom.xml You can download the whole project from there. Anton, I am going to look into this on the weekend.
Alejandro,
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 It does actually validate using maven 2.0.7. Are you using a newer version?
I will try replacing the references to ${hsqldb.version} and I will get back to you. BTW, It's working fine on 7274. heh))
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) Scripts for 'patching' maven repository: patchdir #!/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 projectfix #!/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
part of project-fix data file commons-lang/commons-lang:commons.lang.version commons-beanutils/commons-beanutils:commons.beanutils.version commons-dbcp/commons-dbcp:commons.dbcp.version commons-collections/commons-collections:commons.collections.version commons-pool/commons-pool:commons.pool.version commons-logging/commons-logging:commons.logging.version dbunit/dbunit:dbunit.version groovy/groovy-all:groovy.version jdom/jdom:jdom.version junit/junit:junit.version in 7346 build:
While importing from maven, modules are added to the maven structure correctly. but there're no modules in project structure. I got same exceptions;
local maven is 2.0.7 2007-10-15 11:45:39,336 [ 38933] INFO - aven.project.MavenProjectModel - As workaround, you can work with new idea with old maven plugin.
Could you please attach simple pom project structure so that I could reproduce this problem?
Arseny, do you still have the problem?
If you do it would be great if you attach pom files so i could reproduce problem. status update:
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. Alejandro,
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 7364 build tested: there're no exceptions, but log messages with all modules.
INFO - n.project.MavenToIdeaConverter - Cannot find module <module name> build 7523:
WARN - org.jetbrains.idea.maven.project.MavenProjectReader - org.apache.maven.artifact.repository.DefaultArtifactRepository cannot be cast to org.apache.maven.model.Repository Hey! it's seems work fine with 7549! good work!
Thanks 8) We try to do utmost to make maven integration work well 8)
Thanks for you feedback anyway! 8) |
|||||||||||||||||||||||||||||||||||||||||||||||||||