aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Edit Maven pom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Edit Maven pom" Watch "Edit Maven pom" New topic
Author

Edit Maven pom

Chris Bohannon
Greenhorn

Joined: Jul 28, 2009
Posts: 8

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Chris Bohannon
Greenhorn

Joined: Jul 28, 2009
Posts: 8

Thank you for the resolution and link!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Edit Maven pom