eclipse上传工程jar和pom文件到nexus私有库上出现下面的错误,吴水成老师当时只是讲修改用root运行,没有提到改NEXUS_HOME,下面遇到这个问题的朋友或许该高兴吧
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project edu-common-parent: Failed to deploy artifacts: Could not transfer artifact wusc.edu.common:edu-common-parent:pom:1.0-20180111.151606-1 from/to snapshots (http://192.168.18.42:8081/nexus/content/repositories/snapshots/): Access denied to http://192.168.18.42:8081/nexus/content/repositories/snapshots/wusc/edu/common/edu-common-parent/1.0-
具体办法:到nexus-2.11.2-03/bin下修改nexus文件NEXUS_HOME="/usr/local/nexus"
(刚开始是NEXUS_HOME=""),成功搞定,开心
[root@chenm-03 bin]# vi nexus
#! /bin/sh
#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
#
# Java Service Wrapper sh script. Suitable for starting and stopping
# wrapped Java applications on UNIX platforms.
#
#-----------------------------------------------------------------------------
# These settings can be modified to fit the needs of your application
# Set this to the root of the Nexus installation
NEXUS_HOME="/usr/local/nexus"
# If specified, the Wrapper will be run as the specified user.
# IMPORTANT - Make sure that the user has the required privileges to write into the Nexus installation directory.
# NOTE - This will set the user which is used to run the Wrapper as well as
# the JVM and is not useful in situations where a privileged resource or
# port needs to be allocated prior to the user being changed.
"nexus" 552L, 14619C written