ローカルPCに建てたリポジトリにデプロイしようとすると以下のエラーが出た。
[INFO] Retrieving previous build number from localhost.maven2 WAGON_VERSION: 1.0-beta-2 Downloading [localhost.maven2] -> http://localhost:50000/maven2//maven2sample/maven2sample/0.0.1-SNAPSHOT/maven2sample-0.0.1-20090620.084158-1.jar .org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: http://localhost:50000/maven2/maven2sample/maven2sample/0.0.1-SNAPSHOT/maven2sample-0.0.1-20090620.084158-1.jar. Return code is: 500 Internal Server Error at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:578) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:508) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:328) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:151) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:220) at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:813) at org.maven.ide.eclipse.embedder.Maven2Executor.main(Maven2Executor.java:85) Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: http://localhost:50000/maven2/maven2sample/maven2sample/0.0.1-SNAPSHOT/maven2sample-0.0.1-20090620.084158-1.jar. Return code is: 500 Internal Server Error at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:115) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:173) ... 7 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://localhost:50000/maven2/maven2sample/maven2sample/0.0.1-SNAPSHOT/maven2sample-0.0.1-20090620.084158-1.jar. Return code is: 500 Internal Server Error at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:311) at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:222) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:150) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:103) ... 8 more
Apacheが500エラーを返しているらしい。
Aapcheのログをみると、
[Sat Jun 20 18:12:03 2009] [error] [client 127.0.0.1] File does not exist: C:/fujihara/Apache Software Foundation/Apache2.2/htdocs/maven2/maven2sample [Sat Jun 20 18:12:03 2009] [error] [client 127.0.0.1] A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401] [Sat Jun 20 18:12:03 2009] [error] [client 127.0.0.1] A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401] [Sat Jun 20 18:12:03 2009] [error] [client 127.0.0.1] A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401] [Sat Jun 20 18:12:03 2009] [error] [client 127.0.0.1] A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401]
と「A lock database was not specified with the DAVLockDB directive」みたいにロックファイルがどうこういっている。
どうも、DAVLockDBというのを指定する必要があるみたいなので、httpd.confに追記。
DAVLockDB "C:\fujihara\Apache Software Foundation\Apache2.2\dav\DAVLock" <Location /maven2> Dav on DavMinTimeout 600 </Location>
リポジトリを見てみると、デプロイされたー。