ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mandie Smith <man...@houseofgnomes.net>
Subject Re: enabling webdav support
Date Mon, 15 Mar 2010 15:41:18 GMT
Just to give an update on where I am with this.  I've been trying to test
the Commons VFS ant tasks and haven't been having much luck with getting
them to work.  I've emailed the Commons mailing list about it but no luck
yet.  I still can't tell if there's a problem with VFS or my WebDav server.

Here's my examples in case someone here has any ideas what's going wrong
with my test case.

I'm just trying a simple test to create a directory on the webdav server.
My build.xml looks like this:

<project name="test" xmlns:vfs="antlib:org.apache.
commons.vfs.tasks">
  <target name="main">
    <vfs:mkdir dir="webdav://
user:password@hostname.com/archiva/repository/snapshots/testOrg/testArtifact"
/>
  </target>
</project>

When I try to run this I get the following exception:

org.apache.commons.vfs.
FileSystemException: Could not determine the type of file
"webdav://user:***@hostname.com/archiva/repository/snapshots/testOrg".
    at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:476)
    at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:931)
    at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
    at org.apache.commons.vfs.tasks.MkdirTask.execute(MkdirTask.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    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.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.apache.commons.vfs.FileSystemException: Unknown message with
code "Found".
    at
org.apache.commons.vfs.provider.webdav.ExceptionConverter.generate(ExceptionConverter.java:88)
    at
org.apache.commons.vfs.provider.webdav.ExceptionConverter.generate(ExceptionConverter.java:41)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.execute(WebdavFileObject.java:413)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:488)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:463)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:456)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:448)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:428)
    at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doGetType(WebdavFileObject.java:113)
    at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:467)
    ... 20 more

Total time: 1 second

I dug through the source and the exact HTTP code was a 302 Found.

The WebDav server is Archiva.  When I look at the request logs on the server
I see the following:

1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "HEAD / HTTP/1.1" 404 1268 "-"
"Jakarta Commons-HttpClient/3.1"
1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
/archiva/repository/snapshots/
testOrg/testArtifact HTTP/1.1" 404 0 "-" "Jakarta-Commons-VFS"
1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg HTTP/1.1" 404 0 "-"
"Jakarta-Commons-VFS"
1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
/archiva/repository/snapshots HTTP/1.1" 302 0 "-" "Jakarta-Commons-VFS"

What this looks like to me is Vfs going up the directory tree to see how
many directories it needs to create, so Archiva is responding with 404 Not
Found for each not found directory and then 302 Found for the directory that
exists.

I'm not sure if Archiva is giving the wrong return or if the VFS libraries
are not handling it correctly.

Mandie



On Tue, Mar 9, 2010 at 6:28 PM, Maarten Coene <maarten_coene@yahoo.com>wrote:

> Could you try one of the Apache Commons VFS Ant tasks to check if the
> problem is related to Ivy or to VFS.
> http://commons.apache.org/vfs/anttasks.html
>
> If the VFS Ant tasks are working, it's probably a bug in Ivy. In that case,
> could you create a JIRA issue so we can discuss this problem over there?
> https://issues.apache.org/jira/browse/IVY
>
> regards,
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Mandie Smith <mandie@houseofgnomes.net>
> To: ivy-user@ant.apache.org
> Sent: Mon, March 8, 2010 11:52:25 PM
> Subject: Re: enabling webdav support
>
> Here's the verbose output of the publish task, it's long.
>
> Apache Ant version 1.7.1 compiled on June 27 2008
> Buildfile: build.xml
> Detected Java version: 1.6 in: /usr/local/jdk1.6.0_10/jre
> Detected OS: Linux
>
> publish:
> Overriding previous definition of property "ivy.version"
>     [echo]
> -------------------------------------------------------------------
> Property "publish.local" has not been set
>     [echo] PUBLISHING REPOSITORY: SNAPSHOTS
>     [echo]
> -------------------------------------------------------------------
> Overriding previous definition of property "ivy.version"
> [ivy:publish] Loading
>
> jar:file:/home/testUser/temp/artifact/target/build/tools/ivy.jar!/org/apache/ivy/core/settings/ivy.properties
> Override ignored for property "ivy.log.modules.in.use"
> Override ignored for property "ivy.resolver.default.check.modified"
> Override ignored for property "ivy.default.always.check.exact.revision"
> Override ignored for property "ivy.retrieve.pattern"
> Override ignored for property "ivy.configurations"
> Override ignored for property "ivy.buildlist.ivyfilepath"
> Override ignored for property "ivy.status"
> Override ignored for property "ivy.resolve.default.type.filter"
> Override ignored for property "ivy.project.dir"
> Override ignored for property "ivy.dep.file"
> Override ignored for property "ivy.settings.file"
> Override ignored for property "ivy.report.output.pattern"
> Override ignored for property "ivy.cache.ttl.default"
> Override ignored for property "ivy.publish.src.artifacts.pattern"
> Override ignored for property "ivy.deliver.ivy.pattern"
> Override ignored for property "ivy.build.artifacts.dir"
> Override ignored for property "ivy.checksums"
> Override ignored for property "ivy.distrib.dir"
> Override ignored for property "ivy.lib.dir"
> [ivy:publish] :: loading settings :: file =
> /home/testUser/temp/artifact/target/build/headers/ivypublisher.xml
> [ivy:publish] loading properties:
> /home/testUser/temp/artifact/target/build/headers/ivypublisher.properties
> [ivy:publish] settings loaded (49ms)
> [ivy:publish]   default cache: /home/testUser/.ivy2/cache
> [ivy:publish]   default resolver: write-snapshots-module
> [ivy:publish]   -- 3 resolvers:
> [ivy:publish]   write-local-module [file]
> [ivy:publish]   write-snapshots-module [vfs]
> [ivy:publish]   write-releases-module [sftp]
> Overriding previous definition of property "ivy.version"
> [property] Loading /tmp/delivery.properties
> [property] Unable to find property file: /tmp/delivery.properties
> :: delivering :: organization#artifact;3.1.0.128.20100308174323 ::
> 3.1.0.128.20100308174323 :: integration :: Mon Mar 08 17:43:25 EST 2010
>    delivering ivy file to /home/testUser/temp/artifact/target/lib/ivy.xml
> :: publishing :: organization#artifact
> Mar 8, 2010 5:43:25 PM org.apache.commons.vfs.VfsLog info
> INFO: Using "/tmp/vfs_cache" as temporary files store.
>
> BUILD FAILED
> /home/testUser/temp/artifact/target/build/headers/ivybuilder.xml:488: The
> following error occurred while executing this line:
> /home/testUser/temp/artifact/target/build/headers/ivybuilder.xml:1208:
> impossible to publish artifacts for
> organization#artifact;3.1.0.128.20100308174323:
> java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at
>
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
>    at
> org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:397)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.Target.execute(Target.java:357)
>    at org.apache.tools.ant.Target.performTasks(Target.java:385)
>    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>    at
>
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>    at org.apache.tools.ant.Main.runBuild(Main.java:758)
>    at org.apache.tools.ant.Main.startAnt(Main.java:217)
>    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by:
> /home/testUser/temp/artifact/target/build/headers/ivybuilder.xml:1208:
> impossible to publish artifacts for
> organization#artifact;3.1.0.128.20100308174323:
> java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:318)
>    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at
> org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
>    ... 16 more
> Caused by: java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at
>
> org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java:209)
>    at
>
> org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:227)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:209)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:282)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:261)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:170)
>    at org.apache.ivy.Ivy.publish(Ivy.java:600)
>    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
>    ... 31 more
> --- Nested Exception ---
> /home/testUser/temp/artifact/target/build/headers/ivybuilder.xml:1208:
> impossible to publish artifacts for
> organization#artifact;3.1.0.128.20100308174323:
> java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:318)
>    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at
> org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.Target.execute(Target.java:357)
>    at org.apache.tools.ant.Target.performTasks(Target.java:385)
>    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>    at
>
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>    at org.apache.tools.ant.Main.runBuild(Main.java:758)
>    at org.apache.tools.ant.Main.startAnt(Main.java:217)
>    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at
>
> org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java:209)
>    at
>
> org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:227)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:209)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:282)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:261)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:170)
>    at org.apache.ivy.Ivy.publish(Ivy.java:600)
>    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
>    ... 31 more
> --- Nested Exception ---
> java.lang.IllegalArgumentException: invalid vfs uri
>
> webdav://hostname/archiva/repository/snapshots/organization/artifact/3.1.0.128.20100308174323/artifact-3.1.0.128.20100308174323.pom
> to put data to: resource has no content
>    at
>
> org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java:209)
>    at
>
> org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:227)
>    at
>
> org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:209)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:282)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:261)
>    at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:170)
>    at org.apache.ivy.Ivy.publish(Ivy.java:600)
>    at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
>    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at
> org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
>    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>    at org.apache.tools.ant.Task.perform(Task.java:348)
>    at org.apache.tools.ant.Target.execute(Target.java:357)
>    at org.apache.tools.ant.Target.performTasks(Target.java:385)
>    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>    at
>
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>    at org.apache.tools.ant.Main.runBuild(Main.java:758)
>    at org.apache.tools.ant.Main.startAnt(Main.java:217)
>    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
> Total time: 4 seconds
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message