• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Edit Maven pom

 
Chris Bohannon
Greenhorn
Posts: 8
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have created a maven project on Ubuntu 12.04 and imported it using IntelliJ. I am using Java 1.7 and Maven 3.0.4. Java 1.7 supports using a switch case with a string. Now when I first tried to compile my maven project through the IDE I received an error stating that strings are not supported in a switch...use an if/else instead. i have edited my pom with this:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

That solves the compile error and I can move forward. My question is this, how do I edit the version from 2.3.2 to 3.0.4 which is what I have installed. When I change the version I get an error stating 3.0.4 plugin can't be found. Any help would be great.

Thanks!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The latest version of the compiler plugin is currently 2.5.1. Your Maven version is 3.0.4, but that doesn't make all your plugins version 3.0.4. Since you referenced a version of the maven compiler plugin that doesn't exist, that error message is correct.
 
Chris Bohannon
Greenhorn
Posts: 8
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the resolution and link!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic