I am using Ubuntu 11.10 and I have Maven 3.0.3 installed. Now I want to update it to Maven 3.0.4 due some surefire plug-in issue. But I do not know how to do that from command line.
Does anyone having any idea?
IN short, binaries will be in /usr/bin, or some other location on your path ( try 'echo $PATH' on the command line to see the possible locations ). Configuration is always in a subdirectory of /etc. And the "home" is typically in /usr/lib or /usr/share.
I have just done it.... I exchange Maven 3.0.3 for now Maven 3.2.1 I did this steps:
Remove old maven version:
> sudo apt-get remove maven
> sudo apt-get update
Installation new version:
Now I have improved my knowledge about linux I prefer to install the
software by hand ;)
So... I followed the Apache Installation Instruction on
http://maven.apache.org/download.cgi and then I have added this rows
in the file .baschrc:
export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.1
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"
export PATH=$PATH:$M2
I hope would be useful for someone.
You can simply define the maven-surefire-plugin versions in pluginManagement section of your pom or better in a company pom.
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.3</version>
</plugin>
...
</plugin>
</pluginManagmenet>
</build>
If you don't have already a company wide pom your build is not reproducible which means if you change your maven version your build will use different plugin version which is true for all plugins. Furthermore it's best practice to define the versions of plugins in a build. There is no need to update Maven itself. You can if you running into Maven issues but not for plugins.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With