Here is my clean install -x result:
[INFO] Scanning for projects...
[INFO]
[INFO] --
Make sure your Java version matches the project's Java version requirement. This could be an another cause for such kinds of issues.
This should fix the error
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
this happened to me too after adding the version tag, that was missing, to the maven-war-plugin (not sure what version was using by default, i changed to the latest, 2.6 in my case). I had to wipe .m2/repository to have the build succeed again.
I tried first to clean the maven-filtering folder (in the repo) but then instead of a MavenFilterException i was getting an ArchiverException. So i concluded the local repository was corrupted (for a version upgrade?) and i deleted everything.
That fixed it for me. Just clean your local repo.
Does the class org.apache.maven.shared.filtering.MavenFilteringException
exist in file:/C:/Users/utopcu/.m2/repository/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar
?
The error message suggests that it doesn't. Maybe the JAR was corrupted somehow.
I'm also wondering where the version 1.0-beta-2
comes from; I have 1.0
on my disk. Try version 2.3
of the WAR plugin.
In my case the situation was this: I had an offline server on which I had to perform the build. For that I had compiled everything locally first and then transferred repository folder to the offline server.
Problem - build works locally but not on the server, even thou they both have same maven version, same repository folder, same JDK.
Cause: on my local machine I had additional custom "" entry in settings.xml. When I added same to the settings.xml on the server then my issues disappeared.
My solution below is for cases when default maven repositories are not accessible (e.g. due to firewalls).
In case the default repository is not accessible appropriate local <pluginRepository>
has to be specified in the settings.xml. If it's the same as your local artifact repository it still needs to be added to the <pluginRepositories>
section for plugin jars to be found. Regular <repositories>
section is not used to fetch plugin jars.
In my case, however, the issue was caused by the fact that there were multiple plugin repositories defined in that section.
The first repository in the list did not contain the required maven-filtering jar.
I had to change the order of <pluginRepository>
definitions to ensure the first one contains maven-filtering.
Changing of repository definitions typically requires to clean ~/.m2/repository and start fresh.