这曾经在我将Jenkins升级到1.494之前工作.现在,当使用构建促销插件将war工件复制到快照存储库时,我在Jenkins中收到此错误:
ERROR: Failed to deploy artifacts: Could not transfer artifact com.blah.data:RestWebServices:war:1.0-20121224.163825-2 from/to archiva.apache.snapshots (http://10.31.31.64:8080/archiva/repository/snapshots): Failed to transfer file: http://10.31.31.64:8080/archiva/repository/snapshots/com/blah/data/RestWebServices/1.0-SNAPSHOT/RestWebServices-1.0-20121224.163825-2.war. Return code is: 401, ReasonPhrase:Unauthorized.
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.blah.data:RestWebServices:war:1.0-20121224.163825-2 from/to archiva.apache.snapshots (http://10.31.31.64:8080/archiva/repository/snapshots): Failed to transfer file: http://10.31.31.64:8080/archiva/repository/snapshots/com/blah/data/RestWebServices/1.0-SNAPSHOT/RestWebServices-1.0-20121224.163825-2.war. Return code is: 401, ReasonPhrase:Unauthorized.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:190)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:173)
at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:187)
at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:141)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1543)
at hudson.model.Run.run(Run.java:1489)
at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:106)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact …Run Code Online (Sandbox Code Playgroud) 我安装了独立的Apache Archiva 1.3 Maven存储库,我在配置电子邮件验证的SMTP设置时遇到问题.我通过更改jetty.xml中的mail.smtp.host属性来配置SMTP地址.我无法在Archiva网站上找到任何有关配置此文档的文档.
<New id="validation_mail" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>mail/Session</Arg>
<Arg>
<New class="org.mortbay.naming.factories.MailSessionReference">
<Set name="user"></Set>
<Set name="password"></Set>
<Set name="properties">
<New class="java.util.Properties">
<Put name="mail.smtp.host">mail.xyz.com</Put>
</New>
</Set>
</New>
</Arg>
</New>
Run Code Online (Sandbox Code Playgroud)
这是我尝试注册用户时遇到的错误
Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 <testuser@localhost>... Real domain name required for sender address
Run Code Online (Sandbox Code Playgroud)
引起的
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 <testuser@localhost>... Real domain name required for sender address
Run Code Online (Sandbox Code Playgroud) 我认为这应该是一项简单的任务,但我一直无法完成它.
我已经设置了一个archiva存储库:
对于每个内部仓库,我已经为每个远程仓库创建了代理连接.
我已经在我的settings.xml文件中添加了一个新镜像,如archiva文档中所述:
<mirror>
<id>archiva.default</id>
<url>http://repo.mycompany.com:8080/archiva/repository/internal/</url>
<mirrorOf>*</mirrorOf>
</mirror>
Run Code Online (Sandbox Code Playgroud)
当我尝试使用某个远程存储库中的一个依赖项构建一个简单项目时,不会下载任何工件.为什么?!?
谢谢你的帮助.
我对Ivy,Maven和Archiva感到困惑 - 他们似乎都试图解决类似的问题.
我认为我认为Ivy将类似Maven的功能改装为Ant(即Ant + Ivy~ = Maven)是正确的吗?但我不清楚Archiva为Ant + Ivy和/或Maven添加了什么(如果有的话).我什么时候会使用(比方说)常春藤,何时使用Archiva?什么时候组合才有意义(如果有的话)?
背景:我们需要进行某种依赖管理并建立人工制品档案.我们的源代码是跨语言(混合了C++,Java,Scala,Ruby和Python),我们的构建过程是跨平台的(Linux,Windows,OSX,Android,iOS,QNX).我们有一个现有的基于scons的构建系统,它有点错综复杂.理想情况下,我们希望将依赖关系管理和人工制品存档添加到此,而不是(比如说)将批发移动到Maven.
错误信息:
java.io.IOException: Access to URL
http://maven.company.com/repository/internal/com/company/
project_2.10/0.0.3/project_2.10-0.0.3.pom was
refused by the server: Unauthorized
Run Code Online (Sandbox Code Playgroud)
运行Apache Archiva 1.4-M4(最新版),我可以通过网络界面上传,但不能通过SBT上传.
在SBT中使用这些设置:
publishTo := Some("company releases" at "http://maven.company.com/repository/internal"),
credentials += Credentials(
"company Maven Repository",
"maven.company.com",
"username",
"password"
),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => true },
// .. some xml with author details
}
Run Code Online (Sandbox Code Playgroud)
所有详细信息,包括用户名,密码和网址都是正确的.
使用 apache archiva 和在 Windows 上配置的 Oracle JDK 11 以及类路径。archiva.bat console使用 PowerShell运行时的异常跟踪显示如下
PS D:\Programs\apache-archiva-2.2.3\bin> .\archiva.bat console
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018-10-31 11:29:42.367:WARN:oejd.ContextDeployer:ContextDeployer is deprecated. Use ContextProvider
jvm 1 | …Run Code Online (Sandbox Code Playgroud) 我使用默认配置在localhost上设置了Archiva实例.我尝试了几种不同的Gradle配置来解析archiva实例,但似乎都没有.
的build.gradle
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
repositories {
mavenRepo url: 'http://localhost:8080/archiva', artifactUrls: [
'http://localhost:8080/archiva/repository/internal',
'http://localhost:8080/archiva/repository/snapshot'
]
maven { url 'http://localhost:8080/archiva' }
ivy {
artifactPattern 'http://localhost:8080/archiva/repository/internal/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]'
}
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
}
}
dependsOnChildren()
Run Code Online (Sandbox Code Playgroud)
我认为它不是任何/所有子项目gradle文件的相关内容,但如果你认为有必要,我可以.
这里有什么我想念的吗?gradle是否以不同于localhost的方式处理localhost url(因为mavenCentral正在解析依赖项)?我需要做些什么才能让Gradle解析为Maven仓库的本地实例?
编辑: @Peter Niederwieser
:/> gradle build
> Loading > Resolving dependencies ':projects:project-plugin-framework:classpat
:projects:compileJava UP-TO-DATE
:projects:processResources UP-TO-DATE
:projects:classes UP-TO-DATE
:projects:jar UP-TO-DATE
:projects:assemble UP-TO-DATE
:projects:compileTestJava UP-TO-DATE
:projects:processTestResources UP-TO-DATE …Run Code Online (Sandbox Code Playgroud) 我和archiva合作已经有一年了,
我通过archiva GUI 手动上传我的罐子,它运行正常.
现在我想通过maven deploy上传一个工件,问题是我得到401-Unauthorized.请记住:
1.)我可以从这个存储库下载没有问题.
2.)我使用管理员用户.
3.)我可以手动上传此用户.
这是我得到的日志:
[com:apinterface.parent] Downloading: http://xx.xx.xx.xx:9080/archiva/repository/snapshots/com/apinterface.parent/1.0-SNAPSHOT/maven-metadata.xml
[11:43:39][Step 1/3] [INFO] ------------------------------------------------------------------------
[11:43:39][Step 1/3] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project apinterface.parent: Failed to deploy artifacts: Could not transfer artifact com:apinterface.parent:pom:1.0-20140924.084338-1 from/to snapshots (http://xx.xx.xx.xx:9080/archiva/repository/snapshots): Failed to transfer file: http://xx.xx.xx.xx:9080/archiva/repository/snapshots/com/apinterface.parent/1.0-SNAPSHOT/apinterface.parent-1.0-20140924.084338-1.pom. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
Run Code Online (Sandbox Code Playgroud) 似乎像archiva 2.2完全忽略了
我遵循这个文档的安全属性:
我已经在下面设置了security.properties文件
D:\Apache\Archiva-2.2.0\conf
Run Code Online (Sandbox Code Playgroud)
当我在Archiva UI中为用户设置新密码时,我仍然得到:
You must provide a password containing at least 1 numeric character(s).
Run Code Online (Sandbox Code Playgroud)
security.properties内容:
# Security Policies
#security.policy.password.encoder=
security.policy.password.previous.count=9999
security.policy.password.expiration.days=99999
security.policy.password.expiration.enabled=false
security.policy.allowed.login.attempt=3
# Password Rules
security.policy.password.rule.alphanumeric.enabled=false
security.policy.password.rule.alphacount.enabled=false
security.policy.password.rule.alphacount.minimum=0
security.policy.password.rule.characterlength.enabled=true
security.policy.password.rule.characterlength.minimum=3
security.policy.password.rule.characterlength.maximum=0
security.policy.password.rule.musthave.enabled=false
security.policy.password.rule.numericalcount.enabled=false
security.policy.password.rule.numericalcount.minimum=0
security.policy.password.rule.reuse.enabled=false
security.policy.password.rule.nowhitespace.enabled=true
Run Code Online (Sandbox Code Playgroud) 我正在研究Apache Archiva和Artifactory.所以,实际上我没有找到关于apache archiva和artifactory支持以下功能的确切信息:
1) load balancing
2) Nuget
3) Redhat and CentOs
4) Ease of Backup and disaster recovery
5) LDAP mapping to local defined users.
Run Code Online (Sandbox Code Playgroud)
那么,请告诉我们apache archiva和artifactory是否支持所有这些功能?这将是非常有帮助的.