Миграция на Maven 3.0.1. Развертывание завершается неудачно с ошибкой: только 500 для самого верхнего maven-metadata.xml - PullRequest
6 голосов
/ 07 января 2011

Я тестирую миграцию на Maven 3.0.1 с 2.2.1.

Все фазы работают нормально, кроме фазы развертывания.

Когда я впервые запускаю 2.2.1, все работает нормально.

Затем я переключаюсь на 3.0.1 и запускаю ту же команду, и все идет хорошо, за исключением самого верхнего файла maven-metadata.xml. Когда maven пытается загрузить этот файл, я получаю http Ошибка: 500.

Если вы заметили в журнале ниже:

Это не удалось:

Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml

Но это удается:

Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/maven-metadata.xml  

Меня удивляет, что я не нахожу много информации по этому вопросу. Опять же, Maven 3 был выпущен только около 8 месяцев.

Я обнаружил, что эти два вопроса, которые я не считаю актуальными для меня _ http://maven.40175.n5.nabble.com/Created-MSITE-531-Site-deployment-fails-on-googlecode-repository-unnecessary-path-element-in-WebDAV--td3307584.html

_ http://maven.40175.n5.nabble.com/Moved-WAGON-319-Site-deployment-fails-on-googlecode-repository-unnecessary-path-element-in-WebDAV-UR-td3308501.html

Я также попытался полностью удалить старые артефакты из «артефакта» и снова развернуть их.

Я надеюсь, что кто-то мог бы указать мне правильное направление здесь.

Я вставляю соответствующую информацию ниже.

Заранее спасибо.

Вот соответствующая часть вывода консоли:

[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ ThirdPartyDeploymentProject --- 
[INFO] Installing D:\PRIVATE\src\experiments\CIMM-Building\ThirdPartyDeploymentProject\target\ThirdPartyDeploymentProject-1-SNAPSHOT.jar to C:\Program Files\apache-maven-2.2.1\repo\com\***\deployment\ThirdPartyDeploymentProject\1-SNAPSHOT\ThirdPartyDeploymentProject-1-SNAPSHOT.jar 
[INFO] Installing D:\PRIVATE\src\experiments\CIMM-Building\ThirdPartyDeploymentProject\pom.xml to C:\Program Files\apache-maven-2.2.1\repo\com\***\deployment\ThirdPartyDeploymentProject\1-SNAPSHOT\ThirdPartyDeploymentProject-1-SNAPSHOT.pom 
[INFO] 
[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ ThirdPartyDeploymentProject --- 
Downloading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/maven-metadata.xml
Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/ThirdPartyDeploymentProject-1-20110107.154227-1.jar
Uploaded: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/ThirdPartyDeploymentProject-1-20110107.154227-1.jar (3 KB at 18.4 KB/sec) 
Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/ThirdPartyDeploymentProject-1-20110107.154227-1.pom
Uploaded: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/ThirdPartyDeploymentProject-1-20110107.154227-1.pom (2 KB at 1.9 KB/sec) 
Downloading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/maven-metadata.xml
Downloaded: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/maven-metadata.xml (305 B at 0.4 KB/sec) 
Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/maven-metadata.xml
Uploading: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/maven-metadata.xml
Uploaded: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/maven-metadata.xml (341 B at 0.1 KB/sec) 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 7.891s 
[INFO] Finished at: Fri Jan 07 10:42:31 EST 2011 
[INFO] Final Memory: 9M/22M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project ThirdPartyDeploymentProject: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/1-SNAPSHOT/maven-metadata.xml. Return code is: 500 -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Вот трассировка стека, когда я запускаю его с ключом -X:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project ThirdPartyDeploymentProject: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project ThirdPartyDeploymentProject: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203) 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) 
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316) 
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) 
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451) 
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188) 
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:134) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:189) 
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) 
        ... 19 more 
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:140) 
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:156) 
        ... 21 more 
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy metadata: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:273) 
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:329) 
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:136) 
        ... 22 more 
Caused by: org.sonatype.aether.transfer.MetadataTransferException: Could not transfer metadata com.***.deployment:ThirdPartyDeploymentProject:0.0.1-SNAPSHOT/maven-metadata.xml from/to deploymentRepoSnapshot (http://mvn.***.com:8080/artifactory/***-project-assets): Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:917) 
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:908) 
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:849)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:459) 
        at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:267) 
        ... 24 more 
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://mvn.***.com:8080/artifactory/***-project-assets/com/***/deployment/ThirdPartyDeploymentProject/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 
        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205) 
        at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413) 
        at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392) 
        at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365) 
        at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163) 
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:810)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:458) 
        ... 25 more

1 Ответ

7 голосов
/ 08 января 2011

Я нашел решение.

Я разместил вопрос здесь , а также

Как указал Бенджамин здесь проблема в том, что новый формат метаданных, который использует maven 3, вызывает проблемы со старой версией 'artifactory', которую мы используем в качестве нашего менеджера хранилища.

Решением является использование этого параметра: -Dmaven.metadata.legacy=true

...