How to deploy to Nexus Sonatype new Maven module - maven

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

Related

Could not find artifact after replication from JFrog Cloud to JFrog Cloud

I recently started a push based replication from my current JFrog Cloud account to a new JFrog Cloud account. However, after that the repositories in my local release and snapshot started throwing this error while building any project that uses them. Could someone please check and advise as to what else should I look for in order to resolve/debug this issue.
$ mvn clean install -P artifactory -U
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.mydomain.myproj:mainproject >------------------------
[INFO] Building mainproject 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/apiclient/0.43/apiclient-0.43.pom
[WARNING] The POM for com.mydomain.myproject:apiclient:jar:0.43 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/thirdparty-client/0.7/thirdparty-client-0.7.pom
[WARNING] The POM for com.mydomain.myproject:thirdparty-client:jar:0.7 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/interference-sdk/0.16/interference-sdk-0.16.pom
[WARNING] The POM for com.mydomain.myproject:interference-sdk:jar:0.16 is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/roger-client/0.3/roger-client-0.3.pom
[WARNING] The POM for com.mydomain.myproject:roger-client:jar:0.3 is missing, no dependency information available
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/maven-metadata.xml
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/sprin-param-2.0.5-SNAPSHOT.pom
[WARNING] The POM for com.mydomain.myteam:sprin-param:jar:2.0.5-SNAPSHOT is missing, no dependency information available
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/apiclient/0.43/apiclient-0.43.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/thirdparty-client/0.7/thirdparty-client-0.7.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/interference-sdk/0.16/interference-sdk-0.16.jar
Downloading from central: https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual/com/example/myproject/roger-client/0.3/roger-client-0.3.jar
Downloading from snapshots: https://myartifactory.jfrog.io/artifactory/myproj-mvn-snapshot-virtual/com/example/myteam/sprin-param/2.0.5-SNAPSHOT/sprin-param-2.0.5-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.618 s
[INFO] Finished at: 2022-08-13T19:57:44+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mainproject: Could not resolve dependencies for project com.mydomain.myproj:mainproject:jar:1.0.0: The following artifacts could not be resolved: com.mydomain.myproject:apiclient:jar:0.43, com.mydomain.myproject:thirdparty-client:jar:0.7, com.mydomain.myproject:interference-sdk:jar:0.16, com.mydomain.myproject:roger-client:jar:0.3, com.mydomain.myteam:sprin-param:jar:2.0.5-SNAPSHOT: Could not find artifact com.mydomain.myproject:apiclient:jar:0.43 in central (https://myartifactory.jfrog.io/artifactory/myproj-mvn-release-virtual) -> [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
Also, I can see that the JARs have been copied along with the POM to the new account.

dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

I am getting below error when i am doing build project ..
in jenkins i have given git url to fetch the code ..and its getting the code but after few steps execution in jenkins console its showing below error
Parsing POMs
[ushell-selenium-tests] $ /usr/java/jdk1.7.0_79/bin/java -cp /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/usr/maven/apache-maven-3.3.3/boot/plexus-classworlds-2.5.2.jar:/usr/maven/apache-maven-3.3.3/conf/logging jenkins.maven3.agent.Maven31Main /usr/maven/apache-maven-3.3.3 /usr/apache/apache-tomcat-8.0.24/webapps/jenkins/WEB-INF/lib/remoting-2.52.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 46554
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /root/.jenkins/jobs/Project 32 test ushell 1 fb_search_app selenium/workspace/ushell-selenium-tests/pom.xml install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.sap.ushell:ushell-selenium-tests:jar:1.33.0-SNAPSHOT
[WARNING] 'dependencies.dependency.scope' for org.testng:testng:jar must be one of [provided, compile, runtime, test, system] but is 'integration-test'. # line 63, column 10
[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 ushell-selenium-tests 1.33.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.988 s
[INFO] Finished at: 2015-10-01T16:24:45+02:00
[INFO] Final Memory: 15M/608M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [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/PluginResolutionException
[JENKINS] Archiving /root/.jenkins/jobs/Project 32 test ushell 1 fb_search_app selenium/workspace/ushell-selenium-tests/pom.xml to com.sap.ushell/ushell-selenium-tests/1.33.0-SNAPSHOT/ushell-selenium-tests-1.33.0-SNAPSHOT.pom
/root/.jenkins/jobs/Project 32 test ushell 1 fb_search_app selenium/workspace/ushell-selenium-tests/pom.xml is not inside /root/.jenkins/jobs/Project 32 test ushell 1 fb_search_app selenium/workspace/root/.jenkins/jobs/Project 32 test ushell 1 fb_search_app selenium/workspace/ushell-selenium-tests/; will archive in a separate pass
channel stopped
Finished: FAILURE
I was able to resolve the "Unknown host repo.maven.apache.org: Name or service not known" error by using another internet connection. The first one had a proxy in place which did not allow to download anything from the repo.

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?

building storm-starter: getting error "POM for storm-core missing"

I've downloaded the incubator-storm code from https://github.com/apache/incubator-storm. Now, I'm attempting to run WordCountTopology with the command:
mvn compile exec:java -Dstorm.topology=storm.starter.WordCountTopology
per instructions documented on https://github.com/apache/incubator-storm/tree/master/examples/storm-starter. However, I am getting the following error:
ubuntu#ip-10-242-202-111:~/incubator-storm-master/examples/storm-starter$ mvn compile exec:java -Dstorm.topology=storm.starter.WordCountTopology
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.storm:storm-starter:jar:0.9.2-incubating-SNAPSHOT
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. # org.apache.storm:storm:0.9.2-incubating-SNAPSHOT, /home/ubuntu/incubator-storm-master/pom.xml, line 661, column 21
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. # org.apache.storm:storm:0.9.2-incubating-SNAPSHOT, /home/ubuntu/incubator-storm-master/pom.xml, line 627, column 21
[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 storm-starter 0.9.2-incubating-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.storm:storm-core:jar:0.9.2-incubating-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.156s
[INFO] Finished at: Mon May 05 02:56:08 UTC 2014
[INFO] Final Memory: 9M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project storm-starter: Could not resolve dependencies for project org.apache.storm:storm-starter:jar:0.9.2-incubating-SNAPSHOT: Failure to find org.apache.storm:storm-core:jar:0.9.2-incubating-SNAPSHOT in https://clojars.org/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of clojars has elapsed or updates are forced -> [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
Any insight into what my issue might be is much appreciated. Thanks!
I encountered the same problem, and found the answer from storm-user mailing list archives, refer to
http://mail-archives.apache.org/mod_mbox/storm-user/201404.mbox/%3C72091F29-8109-4A1C-A79D-DDD2D871737B%40petrolink.com%3E

build failure in dyn.js

Today I tried to build dyn.js from source with the instructions on https://github.com/dynjs/dynjs.
I tried it on Windows 7 and Linux (Fedora), but on both systems the build fails.
This is what i get:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dynjs 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.projectodd.rephract:rephract:jar:1.x.incremental.39 is missing, no dependency information available
[WARNING] The POM for org.jboss.jreadline:jreadline:jar:0.20.incremental.2 is missing, no dependency information available
[WARNING] The POM for org.jruby.joni:joni:jar:1.1.10.incremental.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.382s
[INFO] Finished at: Wed Mar 20 12:01:04 CET 2013
[INFO] Final Memory: 7M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dynjs: Could not resolve dependencies for project org.dynjs:dynjs:jar:0.1.0-SNAPSHOT: The following artifacts could not be resolved: org.projectodd.rephract:rephract:jar:1.x.incremental.39, org.jboss.jreadline:jreadline:jar:0.20.incremental.2, org.jruby.joni:joni:jar:1.1.10.incremental.1: Failure to find org.projectodd.rephract:rephract:jar:1.x.incremental.39 in 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 -> [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
Does anyone know how to fix this or how to get a working version of dyn.js?
Thanks!
The version # for that dependency has just been updated, see here:
https://github.com/dynjs/dynjs/blob/master/pom.xml#L144
so if you pull the repo, it should fix that and here is a link to the 0.1.1 tag
https://github.com/dynjs/dynjs/tree/v0.1.1
Once the sonatype ends its maintenance, 0.1.1 should be released in central
-Luke

Resources