The pom build file works fine before, but today, I am seeing error of Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist or no valid version could be found
I run mvn with "-X", and I am not seeing it tried to resolve or load from remote repository.
[DEBUG] cobertura-maven-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the latest version
To force it reload repository, I removed org\codehaus folder from my local repository, still got the same error.
I am very curious to know why maven does not load it from external repository. Here is the stack trace.
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:179)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)
I just noticed that that error happened in one place where I didn't specify version. Maven tried to load the latest version, which couldn't find, and don't know where to load, since there is no version specified.
After I gave it correct version, it works now. Then after first build, if I remove the version again, it still builds.