Could not find artifact junit:junit:jar:4.12 in central - maven

I use Artifactory.
Intranet | Internet
---------------------------------------------------------------------
client <------> Artifactory <------|----> Remote repository: jcenter
When I run (after removing the .m2 content related to JUnit)
mvn clean package -U
on the client, I get the following error:
[ERROR] Failed to execute goal on project MyProject: Could not resolve dependencies for project com.company:MyProject:war:0.0.1-SNAPSHOT: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release) -> [Help 1]
part of the following output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyProject Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://my-own-server:8081/artifactory/libs-release/junit/junit/4.12/junit-4.12.pom
Downloaded: http://my-own-server:8081/artifactory/libs-release/junit/junit/4.12/junit-4.12.pom (24 KB at 164.0 KB/sec)
Downloading: http://my-own-server:8081/artifactory/libs-release/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.pom
[WARNING] The POM for com.oracle:ojdbc7:jar:12.1.0.1 is missing, no dependency information available
Downloading: http://my-own-server:8081/artifactory/libs-release/junit/junit/4.12/junit-4.12.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.484s
[INFO] Finished at: Thu Feb 25 17:19:01 EET 2016
[INFO] Final Memory: 8M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MyProject: Could not resolve dependencies for project com.company:MyProject:war:0.0.1-SNAPSHOT: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release) -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
How can I fix this problem?
Details:
The connection between Artifactory and the remote repository works.
tested from Artifactory, using the Test button
the other .jar files are brought into .m2/repository (E.g.: log4j-1.2.17.jar)
The junit/junit/4.12 folder is created under .m2/repository, but it contains only the following files:
_maven.repositories
junit-4.12.jar.lastUpdated
junit-4.12.pom
junit-4.12.pom.sha1
The jcenter remote repository contains JUnit 4.12: http://jcenter.bintray.com/junit/junit/4.12/
Running
mvn clean package -U -X
will show the following output
...
Downloading: http://my-own-server:8081/artifactory/libs-release/junit/junit/4.12/junit-4.12.jar
[DEBUG] Writing resolution tracking file C:\Users\first.last\.m2\repository\junit\junit\4.12\junit-4.12.jar.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.903s
[INFO] Finished at: Thu Feb 25 17:25:51 EET 2016
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MyProject: Could not resolve dependencies for project com.company:MyProject:war:0.0.1-SNAPSHOT: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project MyProject: Could not resolve dependencies for project com.company:MyProject:war:0.0.1-SNAPSHOT: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.company:MyProject:war:0.0.1-SNAPSHOT: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
... 22 more
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact junit:junit:jar:4.12 in central (http://my-own-server:8081/artifactory/libs-release)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
If I upload manually the junit-4.12.jar file in http://my-own-server:8081/artifactory/webapp/#/artifacts/browse/tree/General/libs-release-local , it works, but I'd like to keep that folder only for the files that are not in the official remote repositories (like ojdbc7.jar).
The following URL http://my-own-server:8081/artifactory/libs-release/junit/junit/4.12/junit-4.12.jar?trace contains:
Request ID: ...
Repo Path ID: libs-release:junit/junit/4.12/junit-4.12.jar
Method Name: GET
User: admin
Time: 2016-02-25T18:02:35.664+02:00
Thread: http-nio-8081-exec-346
Steps:
2016-02-25T18:02:35.664+02:00 Received request
2016-02-25T18:02:35.664+02:00 Request source = <ip>, Last modified = 01-01-70 01:59:59 +02:00, If modified since = -1, Thread name = http-nio-8081-exec-346
2016-02-25T18:02:35.664+02:00 Executing any BeforeDownloadRequest user plugins that may exist
2016-02-25T18:02:35.664+02:00 Retrieving info
2016-02-25T18:02:35.664+02:00 Consulting the virtual repo download strategy
2016-02-25T18:02:35.664+02:00 Trying to retrieve resource info from the local storage
2016-02-25T18:02:35.664+02:00 Unable to find resource in libs-release:junit/junit/4.12/junit-4.12.jar
2016-02-25T18:02:35.664+02:00 Searching for info in aggregated repositories
2016-02-25T18:02:35.664+02:00 Preparing list of aggregated repositories to search in
2016-02-25T18:02:35.664+02:00 Appending the virtual repository 'libs-release'
2016-02-25T18:02:35.664+02:00 Appending the virtual repository 'libs-release'
2016-02-25T18:02:35.664+02:00 Appending the virtual repository 'libs-release'
2016-02-25T18:02:35.664+02:00 Appending collective local repositories
2016-02-25T18:02:35.664+02:00 Appending collective local cache repositories
2016-02-25T18:02:35.664+02:00 Appending collective remote repositories
2016-02-25T18:02:35.664+02:00 Intercepting info request with 'MavenMetadataInterceptor'
2016-02-25T18:02:35.664+02:00 Intercepting info request with 'PomInterceptor'
2016-02-25T18:02:35.664+02:00 Processing request as a release resource
2016-02-25T18:02:35.664+02:00 Searching for the resource within libs-release-local
2016-02-25T18:02:35.664+02:00 Unable to find resource in libs-release-local:junit/junit/4.12/junit-4.12.jar
2016-02-25T18:02:35.664+02:00 Searching for the resource within ext-release-local
2016-02-25T18:02:35.664+02:00 Unable to find resource in ext-release-local:junit/junit/4.12/junit-4.12.jar
2016-02-25T18:02:35.664+02:00 Searching for the resource within jcenter-cache
2016-02-25T18:02:35.664+02:00 Unable to find resource in jcenter-cache:junit/junit/4.12/junit-4.12.jar
2016-02-25T18:02:35.664+02:00 Searching for the resource within jcenter
2016-02-25T18:02:35.664+02:00 Returning an unfound resource
2016-02-25T18:02:35.664+02:00 Requested resource is found = false
2016-02-25T18:02:35.664+02:00 Request is HEAD = false
2016-02-25T18:02:35.664+02:00 Request is for a checksum = false
2016-02-25T18:02:35.664+02:00 Target repository is not remote or doesn't store locally = true
2016-02-25T18:02:35.664+02:00 Requested resource was not modified = false
2016-02-25T18:02:35.664+02:00 Responding with unfound resource
2016-02-25T18:02:35.664+02:00 Setting default response status to '404' reason to 'Resource not found'
2016-02-25T18:02:35.664+02:00 Response is an instance of UnfoundRepoResourceReason
2016-02-25T18:02:35.664+02:00 Configured to hide un-authorized resources = false
2016-02-25T18:02:35.664+02:00 Original response status is auth related = false
2016-02-25T18:02:35.664+02:00 Using original response status of '404' and message 'Could not find resource'
2016-02-25T18:02:35.664+02:00 Sending error with status 404 and message 'Could not find resource'
2016-02-25T18:02:35.664+02:00 Executing any AfterDownloadErrorAction user plugins that may exist
2016-02-25T18:02:35.664+02:00 Response code wasn't modified by the user plugins
2016-02-25T18:02:35.664+02:00 Sending response with the status '404' and the message 'Could not find resource'
My pom.xml contains:
<dependencies>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
...
</dependencies>
Software versions:
Artifactory Version 4.5.1
Apache Maven 3.0.5

Looks like Artifactory have a missed retrieval cached in the jcenter-cache. If Artifactory failed to get junit from JCenter for some reason (for example a timeout) it will cache this failure for the period configured in the "Missed Retrieval Cache Period" property of the remote repository.
You can clear this and force Artifactory to try and retrieve the artifact again by zapping the cache.
Applied for this situation:
Go to Artifacts > Artifact Repository Browser > jcenter-cache > junit/junit > 4.12
or just click on
http://my-own-server:8081/artifactory/webapp/#/artifacts/browse/tree/General/jcenter-cache/junit/junit/4.12
Right click on 4.12 > Zap Cache:

Related

Maven 3.1.0 update central repository to https

I'm using maven 3.1.0 in command line mode to upload jar files to my local maven repository but I'm getting these https errors. How do I update maven's central repository for the https version? I can't find where this is set or how to override it?
c:\intgserver\21.12>mvn install:install-file -Dfile=wlthint3client.jar -DgroupId=com.oracle -DartifactId=wlthint3client -Dversion=21.12 -Dpackaging=jar -DcreateChecksum=true
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml. Return code is: 501 , ReasonPhrase:HTTPS Required.
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml. Return code is: 501 , ReasonPhrase:HTTPS Required.
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml 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 metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml. Return code is: 501 , ReasonPhrase:HTTPS Required.
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml 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 metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml. Return code is: 501 , ReasonPhrase:HTTPS Required.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.305s
[INFO] Finished at: Tue Jul 05 14:56:30 CDT 2022
[INFO] Final Memory: 10M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'install' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\ruthomas\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
c:\intgserver\21.12>
here is what my settings file looks like:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>C:\Dev\_Maven\repository</localRepository>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
Based on the comments and further research. I Installed 3.8.6 from https://maven.apache.org/download.cgi and was able to load my manual jar files into the local repository for later copy to project repository.

How to deploy to Nexus Sonatype new Maven module

I'm creating new module for existing Maven project. When I try to mvn:install project from Idea it throughs these error:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for kz.alfabank:type-ortalyk-bazar:bundle:1.0
[WARNING] 'version' contains an expression but should be a constant. # kz.alfabank:type-ortalyk-bazar:${kz.alfabank.type.ortalyk-bazar.version}, C:\Users\u8002\Documents\dev\alfa-bank\kz.alfabank.soa\kz.alfabank.soa\type-ortalyk-bazar\pom.xml, line 19, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building type-ortalyk-bazar 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-surefire-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-deploy-plugin/maven-metadata.xml from/to public (http://vserver266:8081/nexus/content/groups/public): Failed to transfer file: http://vserver266:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml. Return code is: 504 , ReasonPhrase:Connection Timed Out.
Downloading: http://vserver266:8081/nexus/content/groups/public/kz/alfabank/type-ortalyk-bazar/1.0/type-ortalyk-bazar-1.0.jar
Downloading: https://repo.maven.apache.org/maven2/kz/alfabank/type-ortalyk-bazar/1.0/type-ortalyk-bazar-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:03 min
[INFO] Finished at: 2018-10-11T14:01:00+06:00
[INFO] Final Memory: 14M/167M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project type-ortalyk-bazar: Could not resolve dependencies for project kz.alfabank:type-ortalyk-bazar:bundle:1.0: Could not find artifact kz.alfabank:type-ortalyk-bazar:jar:1.0 in public (http://vserver266:8081/nexus/content/groups/public) -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
We use as a repository Sonatype Nexus 2.11.4. Why Maven looks for newly created module in Nexus repository? And seems that some metadata files cannot be downloaded from Nexus :/
If dependencies are not available in local repository or other dependencies are not built or downloaded prior to the current module build that is when it looks within the remote repositories.
Please do look for the artifact kz.alfabank:type-ortalyk-bazar:jar:1.0 is present in the in your .m2 repo
Note: If you are using IntelliJ within the setting try offline mode

Starting maven project with ERROR

I'm having trouble starting any maven project.
I already checked and can access -> curl -v http://repo1.maven.org
I do not have a proxy and my OS is ubuntu 18.
Using maven via eclipse, also of error.
$mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart
[INFO] Scanning for projects...
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
Downloading: repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from 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 metadata org.apache.maven.plugins/maven-metadata.xml from/to central (repo.maven.apache.org/maven2):java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from 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 metadata org.codehaus.mojo/maven-metadata.xml from/to central (repo.maven.apache.org/maven2):java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.357 s
[INFO] Finished at: 2018-06-14T00:39:57-03:00
[INFO] Final Memory: 8M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/rodolfo/.m2/repository), central (repo.maven.apache.org/maven2)] -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T14:41:47-02:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: pt_BR, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-23-generic", arch: "amd64", family: "unix"
This sounds like a config issue with your settings.xml or something - if Maven was previously working successfully before you tried this command you can make a backup of your .m2 repository and also your current settings.xml mine is located in my User folder under:
I would make a backup of the settings.xml - grab a template one from the web and try running maven commands afterwards from the command line

Issue with connection on Google Compute Engine

I am trying to run my Maven project in a VM Instance on Google Compute Engine using Debian 8.
What I need for this project is Cassandra, Maven, Python and Java. I have the exact same setup on my local machine as the VM Instance I'm trying to run my project on.
I have the following firewall-rules:
NAME NETWORK SRC_RANGES RULES SRC_TAGS TARGET_TAGS
allow-http default 0.0.0.0/0 tcp
allow-http-bookshelf default 0.0.0.0/0 tcp:80 http-server
default-allow-http default 0.0.0.0/0 tcp:80 http-server
default-allow-https default 0.0.0.0/0 tcp:443 https-server
default-allow-icmp default 0.0.0.0/0 icmp
default-allow-internal default 10.128.0.0/9 tcp:0-65535,udp:0-65535,icmp
default-allow-rdp default 0.0.0.0/0 tcp:3389
default-allow-ssh default 0.0.0.0/0 tcp:22
zeppelin default 0.0.0.0/0 tcp:8080 master
I don't know much about ports and networking but I'm pretty sure there's something missing here. Here's my Maven Build Failure log:
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/2.4.3/maven-shade-
plugin-2.4.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-shade-plugin:2.4.3: Plugin org
.apache.maven.plugins:maven-shade-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-shade-plugin:jar:2.4.3
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-pl
ugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.a
pache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read arti
fact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-instal
l-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org
.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-reso
urces-plugin-2.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.3: Plugin o
rg.apache.maven.plugins:maven-resources-plugin:2.3 or one of its dependencies could not be resolved: Failed to r
ead artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.3
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-sure
fire-plugin-2.10.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-surefire-plugin:2.10: Plugin o
rg.apache.maven.plugins:maven-surefire-plugin:2.10 or one of its dependencies could not be resolved: Failed to r
ead artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.10
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:2.5.1: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-jar-plugin:2.4: Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:2.4
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.0: Plugin org.apache.maven.plugins:maven-site-plugin:3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.0
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml 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 metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml 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 metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.817s
[INFO] Finished at: Mon Jan 23 18:37:11 UTC 2017
[INFO] Final Memory: 7M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'exec' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/usr/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
I would like to know what do I have to add to the firewall rules to let Maven retrieve plugin descriptors from org.apache.maven.plugins/*
All I did is package it offline with mvn package and deploy the jar file.
For the Arguments I added them to the command running the jar file
java -jar target/myJar.jar server conf.yml

How to resolve BUILD FAILURE project tutorial DevKit mulesoft

I'm trying to use for the first time DevKit of mulesoft, I'm following the guide of mulesoft at link: http://www.mulesoft.org/documentation/display/current/Tutorial+-+Barn+Connector. I have installed DevKit Plugin from Mule studio and after that I have tried to create the Anypoint Connector Project like the guide said me, but I have found the problem with Maven.
My error is:
[INFO] Downloading: http://repository.mulesoft.org/releases/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[INFO] Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[INFO] Downloading: http://repository.mulesoft.org/snapshots/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from/to codehaus-plugin-snapshots (http://snapshots.repository.codehaus.org): Connect to http-proxy.xxx.com:80 [http-proxy.xxx.com/xxx] failed: Connection timed out: connect
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from/to mulesoft-plugin-releases (http://repository.mulesoft.org/releases/): Connect to http-proxy.xxx.com:80 [http-proxy.xxx.com/xxx] failed: Connection timed out: connect
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from/to mulesoft-plugin-snapshots (http://repository.mulesoft.org/snapshots/): Connect to http-proxy.xxx.com:80 [http-proxy.xxx.com/xxx] failed: Connection timed out: connect
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to http-proxy.xxx.com:80 [http-proxy.xxx.com/xxx] failed: Connection timed out: connect
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:27 min
[INFO] Finished at: 2015-03-11T13:05:19+01:00
[INFO] Final Memory: 16M/223M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-jar-plugin' from the repositories [local (C:\Users\s\.m2\repository), codehaus-plugin-snapshots (http://snapshots.repository.codehaus.org), mulesoft-plugin-releases (http://repository.mulesoft.org/releases/), mulesoft-plugin-snapshots (http://repository.mulesoft.org/snapshots/), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
How to resolve it?
Seems like something happened when maven was downloading the dependencies, try generating another new connector.
Did you check for the existence of Maven JAR with the specified version?

Resources