Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何部署到Nexus Sonatype新Maven模块_Maven_Nexus - Fatal编程技术网

如何部署到Nexus Sonatype新Maven模块

如何部署到Nexus Sonatype新Maven模块,maven,nexus,Maven,Nexus,我正在为现有的Maven项目创建新模块。当我尝试从Idea安装mvn:installproject时,它会遇到以下错误: [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' cont

我正在为现有的Maven项目创建新模块。当我尝试从Idea安装
mvn:install
project时,它会遇到以下错误:

[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

我们使用Sonatype Nexus 2.11.4作为存储库。为什么Maven在Nexus存储库中查找新创建的模块?而且,如果依赖项在本地存储库中不可用,或者在当前模块构建之前(即在远程存储库中查看时)未构建或下载其他依赖项,则无法从Nexus下载某些元数据文件。 请务必查找工件kz。alfabank:type ortalyk bazar:jar:1.0存在于您的.m2回购协议中


注意:如果在设置中使用IntelliJ,请尝试脱机模式

如果依赖项在本地存储库中不可用,或者在当前模块生成之前(在远程存储库中查看时)未生成或下载其他依赖项。 请务必查找工件kz。alfabank:type ortalyk bazar:jar:1.0存在于您的.m2回购协议中


注意:如果您在设置中使用IntelliJ,请尝试脱机模式

首先,您似乎有网络问题:
返回代码为:504,原因短语:连接超时。
…检查您的settings.xml文件以查看是否已配置http代理,如果有,将nexus主机名添加到非ProxyHosts:首先,看起来您有网络问题:
返回代码为:504,原因短语:连接超时。
…检查您的settings.xml文件以查看是否配置了http代理,如果有,请将nexus主机名添加到非ProxyHosts: