From Eclipse mars version, pom.xml - Run As - maven clean and i got the following error message with Build Failure.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project testing-framework:
Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.apache.maven:maven-plugin-api:jar:2.0.6:
Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6:
Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
I had the same problem. I solved it by killing java.exe process in Task Manager and re-excuting maven clean install.
Unknown host repo.maven.apache.org
sounds like a networking issue. Maybe check wether you need to supply proxy information within your settings.xml. Here's the documentation on how to supply one.
Alternativly, Eclipse might expose its own proxy settings to its Maven integration, but I'm not sure about that, I only use Maven from console. Still, its worth the check and maybe the config.
Related
I created a Bazel archive tar using the steps provides in the Bazel docs. Most of the packages are being loaded locally except for this one. Please see error below.
C:\Developers\examples-master\java-tutorial>bazel build --distdir=C:\Developers\bazel-tar //:ProjectRunner Starting local Bazel server and connecting to it... INFO: Repository remotejdk11_win instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in WARNING: Download from https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip failed: class java.io.IOException connect timed out ERROR: An error occurred during the fetch of repository 'remotejdk11_win': java.io.IOException: Error downloading [https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip] to C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/remotejdk11_win/zulu11.37.17-ca-jdk11.0.6-win_x64.zip: connect timed out INFO: Repository remote_java_tools_windows instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in ERROR: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/jdk/BUILD:492:6: #bazel_tools//tools/jdk:remote_jdk11 depends on #remotejdk11_win//:jdk in repository #remotejdk11_win which failed to fetch. no such package '#remotejdk11_win//': java.io.IOException: Error downloading [https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip] to C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/remotejdk11_win/zulu11.37.17-ca-jdk11.0.6-win_x64.zip: connect timed out ERROR: Analysis of target '//:ProjectRunner' failed; build aborted: Analysis failed INFO: Elapsed time: 68.089s INFO: 0 processes. FAILED: Build did NOT complete successfully (16 packages loaded, 305 targets configured)
It seems to be a network issue most likely due to some firewall or proxy server sitting between your computer and the Bazel repo. The following download failed:
Download from https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip failed
I suggest you download the file manually and follow the guidance here:
A work around is to fetch the files manually and put them in a directory specified via the --distdir option.
Those are mirror artifacts which are updated by the bazel team here. I think the archive URL which you mentioned above is mirrored and updated with latest files. If you see such observations may be you can raise the issues in that specific templates.
I'm getting the following error
[ERROR] No plugin found for prefix 'gatling' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\w7116744\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
If you already have the maven gatling plugin included in the POM, make sure that you run the maven gatling:test command in the directory where your POM is in.
The plugin doesn't check if a pom exist or not. If you are NOT running the mvn gatling:test command in the directory where your pom located, you will always get "No plugin found for prefix 'gatling' in the current project ....."
Looks like gatling-maven-plugin is not configured in your pom.xml.
GAPID uses bazel, and has external dependency that uses maven. I get this error:
ERROR: C:/users/pemgithub/_bazel_pemgithub/3mdmxsrc/external/gapic_third_party/BUILD.bazel:19:1: no such package '#io_grpc_context//jar': Failed to fetch Maven dependency: Could not transfer artifact io.grpc:grpc-context:jar:1.16.1 from/to io_grpc_context (https://repo1.maven.org/maven2/): connect timed out and referenced by '#gapic_third_party//:grpc'
ERROR: Analysis of target '//:pkg' failed; build aborted: no such package '#io_grpc_context//jar': Failed to fetch Maven dependency: Could not transfer artifact io.grpc:grpc-context:jar:1.16.1 from/to io_grpc_context (https://repo1.maven.org/maven2/): connect timed out
INFO: Elapsed time: 11.014s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Fetching #com_github_pkg_errors; Restarting. 10s
I think it's related to proxy (corporate network). I tried adding proxy settings to C:/users/pemgithub/.m2/settings.html. However, bazel maven does not seem to be using the proxy settings.
So I'd rather just download the jar files manually and tell bazel maven to use the local jar files. How do I do this?
Bazel currently (July 2019) does not support this properly. While rules_jvm_external is recommended as the successor to maven_jar, it does not read Maven's ~/.m2/settings.xml and it also does not supporting using already downloaded artifacts from ~/.m2/repository.
One workaround is to use your own little reverse proxy, which reads from ~/.m2/repository and tell Bazel to download from localhost. I've created bazel-maven-proxy for this purpose. It does support proxies the same way Bazel does, i.e. reading http(s) and no_proxy environment variables.
Please do not use the maven_jar rule. It is being deprecated in favor of the Maven resolver ruleset rules_jvm_external.
In rules_jvm_external, you can use a proxy through the HTTP_PROXY/HTTPS_PROXY environment variables (documentation), and set a custom repository URL with auth credentials (documentation).
I have two Artifactory servers, one is a version 3.4.1 and the other is 6.0.2
The Jenkins is configured to push to two Artifactories with different Ids as shown below
The old Artifactory is working fine and Jenkins is able to connect to it but, the new Artifactory is throwing an exception and is not able to connect to it.
Here is an excerpt from the log:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project JavaApplications: Could not resolve dependencies for project JavaApplications:JavaApplications:jar:1.0.0: Failed to collect dependencies at net.sf.jt400:jt400-full:jar:5.4: Failed to read artifact descriptor for net.sf.jt400:jt400-full:jar:5.4: Could not transfer artifact net.sf.jt400:jt400-full:pom:5.4 from/to central (http://artifactory/artifactory/libs-release): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
Clearly, something to do with the certificates? please help
You need to add Jenkis *.crt file into cacerts. There is simple guild on Artifactory page.
I have created maven based web application so after created application i am getting two errors in pom.xml which are
1.Multiple annotations found at this line:
- Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 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:pom:2.6 from/to central (http://
repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
2.Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1
Could you please let me know what needs to be done for resolving the issue
If you are facing the same issue I described in my comment above then it seems I could fix it by running mvn eclipse:eclipse with working directory set to Eclipse project folder i.e.
$ cd /path/to/eclipse/workspace/Project
$ mvn eclipse:eclipse
Does this work for you ? Maybe your environment is different . Providing more details might help others to understand your problem even better so as to offer useful suggestions .
I had similar problem Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile).
To Fix (apart from installing M2E plug-in and all):
Ensure installed maven is > 3.1 (using mvn -v). If not, you need to upgrade.
Ensure eclipse is pointing to correct maven location (Window->Preferences->Maven->Installations)
On Command prompt, go to project home directory and run mvn eclipse:clean and mvn eclipse:eclipse
Disable and enable Maven nature in eclipse (Right click on project, goto Maven -> Disable Maven Nature. To enable, Right click on project goto Configure -> Convert to Maven Project)