小编Wil*_*lfi的帖子

使用Snapshot策略部署nexus工件,但版本中没有SNAPSHOT字符串

显然我的Nexus拒绝了我向他扔的每一个部署,如果该工件在版本中没有-SNAPSHOT.

数据:

  • 失败工件的名称:entando-core-engine-experiment-bundles_with_bootstrap.jar其中experiment-bundles_with_bootstrappom.xml的version元素中的版本
  • 我的Nexus托管存储库策略:快照,允许重新部署等(快照的经典conf)
  • 部署员:詹金斯1.481
  • 同样的Jenkins工作,但是entando-core-engine- SNAPSHOT .jar ---> SUCCESS

我需要这个命名约定,因为我正在构建我们内部运行的几个实验之一,与规范开发分支相反,它产生一个正确的entando-core-engine-SNAPSHOT.jar

有什么建议?我完全迷失了.

deployment snapshot nexus maven jenkins

6
推荐指数
1
解决办法
7513
查看次数

如何从我自己的身份验证连接中获取maven原型而没有URL中的用户名和密码?

我有一个私有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)

有工作示例的任何提示或更好的文档?

nexus sonatype maven maven-archetype

5
推荐指数
1
解决办法
7014
查看次数

如何将 HttpResponse 转换为 HttpErrorResponse

我有一个 Web 服务200在一个经典 errors对象中的Response 中返回自定义错误。

这打破了我的工作流程和模式,我通常会拦截正确的 HTTP 错误状态代码,然后继续处理各种错误情况。

我需要HttpErrorResponse通过拦截器将这些自定义错误转换为正确的错误,以便我可以拦截那些现在正确的错误并按照通常的最佳实践继续我的应用程序。

我不能做的事情:

  • 修改 Web 服务,使其返回正确的 HTTP 错误
  • 在响应到达客户端应用程序之前,在中间有另一个 Web 服务来处理转换

我想做什么:

因此,在不久的将来,当我将处理使用相同的不可修改的 Web 服务的其他几个应用程序时,我可以直接CustomErrorInterceptor加入并收工。

angular

2
推荐指数
1
解决办法
2948
查看次数