Cannot build at all - Intellij 9.0.2 Max OSX 10.5.8 - Maven

I have used IDEA for years, but first time on Mac.  I have a Maven project that does not build at all from within IDEA.  It builds fine from command line.  I get the same error whether I try use the Maven install target.  It is:

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6

The pom has the following:

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

Need help.

Richard Brewster

2 comments
Comment actions Permalink

That is most likely a problem with your Info.plist file. I recently converted to Mac but I'm on 10.6, not 10.5. Try changing the source and target to 1.5 and run the Maven build from Intellij. If it works you need to update your Info.plist. Info.plist is an XML file. Mac provides a free property list editor you can download or just use Textedit. Right click on the Intellij app file (it's really a directory but Finder does not treat it as a directory, only Terminal) and say Show Package Contents. You will find the Info.plist file in the Contents directory. Open it and find the line for Java that says 1.5+ and change it to 1.6+. I think the default JDK on OSX 10.5 is JDK 1.5, not 1.6.

0
Comment actions Permalink

Beautiful!  Editing Info.plist and changing to 1.6+ made the Maven build work.  Thanks also for the tip on Show Package Contents.  I'm relatively new to Mac.

0

Please sign in to leave a comment.