Problems with inspections and Maven

Hi Everyone,

I'm working on building a Sonar plugin for IntelliJ Idea (a fairly recent source snapshot can be found here).

On simple projects with .ipr for them it works fine, but I'm having trouble making inspections run using a pom.xml as a project file.

I run the following command (I changed the layout to make it easier to read):

$JDK_HOME/bin/java \

     -XX:-UseGCOverheadLimit \

     -Xmx2500m \

     -XX:MaxPermSize=128m \

     -Xbootclasspath/a:$IDEA_HOME/lib/boot.jar \

     -Djdk.1.6=$JDK_HOME \

     -cp $JDK_HOME/lib/tools.jar:$IDEA_HOME/lib/bootstrap.jar:$IDEA_HOME/lib/util.jar:$IDEA_HOME/lib/jdom.jar:\


     com.intellij.idea.Main \

     inspect \

     $PROJECT_ROOT/modules/vfilesystem/pom.xml \

     $PROJECT_ROOT/output/vfilesystem/target/sonar/ideainspections.xml \


Which fails with:

[WARNING] Overriding profile: 'online' (source: settings.xml) with new instance from source: settings.xml
The JDK is not configured properly for this project. Inspection cannot proceed.
null not found

Which begs the question: How does IDEA choose the JDK name for a project imported from a pom.xml?
Notice that I'm passing JDK_HOME as property for a JDK named "1.6", but that only works if I have an .ipr file that uses "1.6" as it's JDK name.

Any help is appreciated,

Please sign in to leave a comment.