I am getting below error on my build :
The POM for org.codehaus.mojo:sonar-maven-plugin:jar:3.7.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:sonar-maven-plugin:3.7.0: Plugin org.codehaus.mojo:sonar-maven-plugin:3.7.0 or one of its dependencies could not be resolved: Failure to find org.codehaus.mojo:sonar-maven-plugin:jar:3.7.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
I have already tried Why sonar-maven-plugin-3.0.1.jar cannot be found when executing sonar:sonar? solution , didn't workout
Related
I have tried all of the above solutions but still seeing this error.
I have installed maven 3.5.3 ,JDK1.7.0_67 and eclipse Version: Kepler Service Release 2 and have configured maven in eclipse IDE
But when creating a maven project i see the below mentioned error.
I tried resolving this
By updating the proxy setting in settings.xml file, but same error occurs.
By deleting the .m2 file and creating project again , but same error occurs.
By adding this maven-resources-plugin-2.5.jar external jar
None of the above methods worked for me
Could you please help me in resolving this as I am Stuck here.
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its
dependencies could not be resolved: Failure to transfer
org.apache.maven.plugins:maven-resources-plugin:jar:2.5 from
http://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.apache.maven.plugins:maven-resources-plugin:jar:2.5 from/to
central (http://repo.maven.apache.org/maven2): Failed to transfer
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.jar.
Error code 503, Service Unavailable Plugin
org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its
dependencies could not be resolved: Failure to transfer
org.apache.maven.plugins:maven-resources-plugin:jar:2.5 from
http://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.apache.maven.plugins:maven-resources-plugin:jar:2.5 from/to
central (http://repo.maven.apache.org/maven2): Failed to transfer
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.jar.
Error code 503, Service Unavailable
I have upgraded spring boot version from 1.3.2 to 1.4.0 to be able to use #MockBean annotation to mock my beans in unit testing, but since I still have "The import cannot be resolved to a type compilation" error allover my projects, however I have updated the maven project dependencies from eclipse and deleted the repository folder from the file system and allowed maven to re download it but in vain.
btw, I can clean and install the project from command line maven command "mvn clean install".
Any ideas please?
Edit
I have changed spring cloud dependency version from Brixton.BUILD-SNAPSHOT to Brixton.SR5 and this solves the problem with the cloud imports and #EnableDiscoveryClient annotation, but I still have problems with the dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
I have the following errors
1-CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 -> org.apache.maven.shared:maven-shared-incremental:jar:1.1 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven:maven-repository-metadata:jar:2.2.1: ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven:maven-repository-metadata:jar:2.2.1: ArtifactResolutionException: Failure to transfer org.apache.maven:maven-repository-metadata:pom:2.2.1 from https://repo.maven.apache.org/maven2 was cached in the local 1-repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-repository-metadata:pom:2.2.1 from/to central (https://repo.maven.apache.org/maven2): timeout
2-Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)
Failure to transfer org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE from/to central (https://repo.maven.apache.org/maven2): timeout
3-org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE from/to central (https://repo.maven.apache.org/maven2): timeout
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:529)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:491)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:495)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:350)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:297)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:398)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:345)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1351)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:342)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
The error messages seem to indicate that it's a timeout problem, however all other jars and dependencies are downloaded , my internet connection is very good and I have manged to build from maven command line without compile errors.
Just based on a personal experience :)
I have a parent maven project with pom file contains the common dependencies and properties and so on...by explicitly changing anything in this file(even if a dummy thing) and save eclipse has rebuild the workspace and all compiler errors in markers are gone away.
Today i downloaded STS version 3.7.2 for 64 bit machine. In that i import my maven project and i get below error
Description Resource Path Location Type
CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-api:jar:2.0.9, org.apache.maven:maven-artifact:jar:2.0.9, org.apache.maven:maven-core:jar:2.0.9, org.apache.maven:maven-settings:jar:2.0.9, org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9, org.apache.maven:maven-profile:jar:2.0.9, org.apache.maven:maven-model:jar:2.0.9, org.apache.maven:maven-repository-metadata:jar:2.0.9, org.apache.maven:maven-error-diagnostics:jar:2.0.9, org.apache.maven:maven-project:jar:2.0.9, org.apache.maven:maven-plugin-registry:jar:2.0.9, org.apache.maven:maven-plugin-descriptor:jar:2.0.9, org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-toolchain:jar:1.0, org.codehaus.plexus:plexus-container-default:jar:1.5.5, org.codehaus.plexus:plexus-classworlds:jar:2.2.2: Failure to transfer org.apache.maven:maven-plugin-api:jar:2.0.9 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-api:jar:2.0.9 from/to central
Any idea why this error
Seems very similar with this one. As suggested in the answer of the linked question try the -U switch.
Of course assuming that STS has properly configured Maven (either the build one or the one configured in your machine).
I just created a simple test maven quick start project in my Windows 7 PC.
getting
CoreException: Could not get the value for parameter compilerId for
plugin execution default-compile: PluginResolutionException: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its
dependencies could not be resolved: Failure to transfer
org.apache.maven:maven-plugin-api:jar:2.0.9 from
https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.apache.maven:maven-plugin-api:jar:2.0.9 from/to central
(https://repo.maven.apache.org/maven2): connect timed out
I have mapped manual maven home from local machine thought embedded version has the problem
mvn clean install -U
This will make a clean install and update the dependencies
So maven downloads the pom then declares that it is missing. Then it proceeds to download the jars.
Heres the log
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://bits.netbeans.org/maven2/
Downloading: http://bits.netbeans.org/maven2/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom
Downloaded: http://bits.netbeans.org/maven2/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom (2 KB at 3.5 KB/sec)
[DEBUG] Reading resolution tracking file /home/homeu1/.m2/repository/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom.lastUpdated
[DEBUG] Writing resolution tracking file /home/homeu1/.m2/repository/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom.lastUpdated
[WARNING] The POM for org-openide-text:org-netbeans-api:jar:RELEASE71 is missing, no dependency information available
...
then the end error
[ERROR] Failed to execute goal on project jalopy2-netbeans: Could not resolve dependencies for project com.notzippy:jalopy2-netbeans:nbm:0.0.1-SNAPSHOT: Failure to find org-openide-text:org-netbeans-api:jar:RELEASE71 in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of netbeans has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project jalopy2-netbeans: Could not resolve dependencies for project com.notzippy:jalopy2-netbeans:nbm:0.0.1-SNAPSHOT: Failure to find org-openide-text:org-netbeans-api:jar:RELEASE71 in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of netbeans has elapsed or updates are forced
I dont get it, if I look into mavens repository the pom and jar are downloaded, the sha1 is fine. Every other dependency seems to resolve fine and if I try to remove that dependency I get.
Project uses classes from transitive module org.netbeans.api:org-openide-text:jar:RELEASE71 which will not be accessible at runtime.
Ideas or thoughts would be appreciated.
Had artifactId and groupId swapped. D'oh