<servers> <!-- server | Specifies the authentication information to use when connecting to a particular server, identified by | a unique name within the system (referred to by the 'id' attribute below). | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are | used together. | <server> <id>deploymentRepo</id> <username>repouser</username> <password>repopwd</password> </server> --> <!-- 发行版本私服仓库 --> <server> <id>maven-releases</id> <username>admin</username> <password>admin</password> </server> <!-- 快照版本私服仓库 --> <server> <id>maven-snapshots</id> <username>admin</username> <password>admin</password> </server>
<!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional; leave empty if not used.</passphrase> </server> --> </servers>
ziming@Dell17r2 MINGW64 /d/IdeaProjects/tripweb (master) $ mvn deploy -Dmaven.test.skip=true [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building trip-web Maven Webapp 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- mybatis-generator-maven-plugin:1.3.5:generate (Generate MyBatis Artifacts) @ trip-web --- [INFO] Connecting to the Database Wed Oct 23 11:20:50 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ an d 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the ve rifyServerCertificate property is setto'false'. You need either to explicitly disable SSL by setting useSSL=false, orsetuseSSL=trueand provide truststore f or server certificate verification.
出现错误 Not authorized , ReasonPhrase:Unauthorized
1 2 3 4 5 6 7 8 9 10 11
[INFO] Final Memory: 28M/378M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) onproject trip-web: Failedto retrieve remote metadat a cn.zm:trip-web:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata cn.zm:trip-web:1.0.0-SNAPSHOT/maven-metadata.xml from/to nexus-snapshots (http:/ /116.62.110.99:8082/repository/maven-snapshots/): Not authorized , ReasonPhrase:Unauthorized. -> [Help1] [ERROR] [ERROR] To see the full stack traceof the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switchtoenablefull debug logging. [ERROR] [ERROR] For more information about the errorsand possible solutions, please read the following articles: [ERROR] [Help1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException