显然我的Nexus拒绝了我向他扔的每一个部署,如果该工件在版本中没有-SNAPSHOT.
数据:
我需要这个命名约定,因为我正在构建我们内部运行的几个实验之一,与规范开发分支相反,它产生一个正确的entando-core-engine-SNAPSHOT.jar
有什么建议?我完全迷失了.
我有一个私有Nexus,通过身份验证保护存储库.
拉动库就像一个魅力,但如果我想使用存储在那里的原型之一,我总是需要在原型目录的URL中写明文用户名和密码,如下所示:
mvn archetype:generate -DarchetypeCatalog=http://username:password@maven.mycompany.com/nexus/content/repositories/myrepo/archetype-catalog.xml
Run Code Online (Sandbox Code Playgroud)
我阅读了http://maven.apache.org/archetype/maven-archetype-plugin/faq.html#authentication并使用我从这一小部分帮助中理解的内容更新了我的settings.xml:
<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">
<servers>
<server>
<id>myrepo</id>
<username>username</username>
<password>{HASHED_PASSWORD}</password>
</server>
<server>
<id>pretty-archetype-unicorn-repo</id>
<username>username</username>
<password>{HASHED_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>someid</id>
<repositories>
<repository>
<id>myrepo</id>
<name>My Repo</name>
<url>http://maven.mycompany.com/nexus/content/repositories/myrepo/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>someid</activeProfile>
</activeProfiles>
</settings>
Run Code Online (Sandbox Code Playgroud)
不用说,它不起作用,当我尝试时:
mvn archetype:generate -DarchetypeCatalog=http://maven.mycompany.com/nexus/content/repositories/myrepo/archetype-catalog.xml
Run Code Online (Sandbox Code Playgroud)
我老了:
[WARNING] Error reading archetype catalog http://maven.mycompany.com/nexus/content/repositories/myrepo/archetype-catalog.xml
org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: http://maven.mycompany.com/nexus/content/repositories/myrepo/archetype-catalog.xml
Run Code Online (Sandbox Code Playgroud)
有工作示例的任何提示或更好的文档?
我有一个 Web 服务200在一个经典 errors对象中的Response 中返回自定义错误。
这打破了我的工作流程和模式,我通常会拦截正确的 HTTP 错误状态代码,然后继续处理各种错误情况。
我需要HttpErrorResponse通过拦截器将这些自定义错误转换为正确的错误,以便我可以拦截那些现在正确的错误并按照通常的最佳实践继续我的应用程序。
interceptors/custom-error.interceptor.ts因此,在不久的将来,当我将处理使用相同的不可修改的 Web 服务的其他几个应用程序时,我可以直接CustomErrorInterceptor加入并收工。