You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Christian Möller <dc...@gmx.de> on 2007/09/25 09:18:07 UTC

[Ivy 1.4.1] Impossible to publish artifacts ...: FileSystemException: Could not create folder "webdav://[host]:[port]/ivy-repo/test"

Hi,

we're starting to use Ivy (version 1.4.1). One of the first steps is
creating a company-wide repository. As the backend we're using Tomcat
and webdav as protocol.

To publish an artifact we first resolve the dependencies like this:

   <ivy:resolve/>

After that we invoke the publish target:

   <ivy:publish resolver="${company-resolver}" validate="true">
      <artifacts pattern="artifact/[artifact].[ext]"/>
   </ivy:publish>

Unfortunately every time an exception is thrown stating something like
"impossible to publish artifacts for [ test | test | 1.0.0 ]" - to
analyze the problems we are dealing with a dummy artifact and
organisation called "test".

Running ANT with verbose output flag "-v" faces us with this stack trace:

==========================
d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [ test
| test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException: Could not
create folder "webdav://[HOST]:[PORT]/ivy-repo/test".
        at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:254)
        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:105)
        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:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        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: Could not create
folder "webdav://[HOST]:[PORT]/ivy-repo/test".
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:843)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:826)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:826)
        at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1188)
        at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:367)
        at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:350)
        at
fr.jayasoft.ivy.repository.vfs.VfsRepository.put(VfsRepository.java:190)
        at
fr.jayasoft.ivy.repository.AbstractRepository.put(AbstractRepository.java:123)
        at
fr.jayasoft.ivy.resolver.RepositoryResolver.put(RepositoryResolver.java:180)
        at
fr.jayasoft.ivy.resolver.RepositoryResolver.publish(RepositoryResolver.java:175)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2436)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2411)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2372)
        at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:230)
        ... 17 more
Caused by: org.apache.commons.httpclient.HttpException
        at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
        at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
        at
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
        at
org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:921)
        at
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1920)
        at
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1943)
        at
org.apache.webdav.lib.WebdavResource.refresh(WebdavResource.java:1953)
        at
org.apache.webdav.lib.WebdavResource.mkcolMethod(WebdavResource.java:4139)
        at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doCreateFolder(WebdavFileObject.java:354)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:832)
        ... 30 more
--- Nested Exception ---
org.apache.commons.vfs.FileSystemException: ... [only already known
stuff is repeated here]
==========================

Looking at the folders Tomcat serves via webdav shows that an empty
folder "test" has been created, but nothing else.

Suprisingly, running ANT again the same way succeeds - but only
sometimes! Almost always (meaning "we still have not observed any
failure after that") it will succeed after the empty folder "test" has
been deleted from the Tomcat webdav root after the first failing attempt.

Don't know if it is a bug with ivy or the webdav library (Jakarta Slide
I guess) or Commons VFS or ... don't know? Maybe we are dealing with it
the wrong way?

So what to do? Any help?

Thanks

Christian

PS: We are using a webdav based repo handled by Tomcat, but what is the
preferred way establishing a company-wide ivy repo? Any recommendations
concerning protocol and backend? Unfortunately, simple remote filesystem
folders are not an option.

Re: [Ivy 1.4.1] Impossible to publish artifacts ...: FileSystemException: Could not create folder "webdav://[host]:[port]/ivy-repo/test"

Posted by Christian Möller <dc...@gmx.de>.
Hi Xavier,

according to your recommendation I've configured ivy to use a ssh based
repository like this:

==========================
<ssh name="publish-repository" host="[HOST]" user="[USER]"
userPassword="[PASSWORD]">
  <ivy pattern="ivy-repository/[organisation]/[module]/[revision]/ivy.xml"/>
  <artifact
pattern="ivy-repository/[organisation]/[module]/[revision]/[artifact].[ext]"/>
</ssh>
==========================

In this case - unfortunately :-) - I receive the following error:

==========================
d:\home\chrism\Projects\Ivy\build.xml:41: impossible to publish
artifacts for [ apache | xerces | 2.9.0 ]: java.io.IOExc
eption: Channel connection problems
        at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:254)
        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:105)
        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:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        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.io.IOException: Channel connection problems
        at
fr.jayasoft.ivy.repository.ssh.SshRepository.readSessionOutput(SshRepository.java:91)
        at
fr.jayasoft.ivy.repository.ssh.SshRepository.checkExistence(SshRepository.java:277)
        at
fr.jayasoft.ivy.repository.ssh.SshRepository.makePath(SshRepository.java:242)
        at
fr.jayasoft.ivy.repository.ssh.SshRepository.put(SshRepository.java:218)
        at
fr.jayasoft.ivy.repository.AbstractRepository.put(AbstractRepository.java:123)
        at
fr.jayasoft.ivy.resolver.RepositoryResolver.put(RepositoryResolver.java:180)
        at
fr.jayasoft.ivy.resolver.RepositoryResolver.publish(RepositoryResolver.java:175)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2436)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2411)
        at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2372)
        at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:230)
        ... 17 more
Caused by: com.jcraft.jsch.JSchException: session is down
        at com.jcraft.jsch.Channel.connect(Unknown Source)
        at
fr.jayasoft.ivy.repository.ssh.SshRepository.readSessionOutput(SshRepository.java:89)
        ... 27 more
==========================

I've also tried absolute paths as ivy/artifact patterns.
My first thought was that maybe the target server supports ssh 1 only;
and JSch as the library used by ivy to handle ssh protocol supports ssh
2 only. But connecting the target server using "ssh -2 [USER]@[HOST]"
succeeds (with interactive authentication by typing the correct password
of course) ...

Christian

Xavier Hanin schrieb:
> I don't use the webdav protocol personnally so I can't comment much on this,
> but I know some users have managed to get it working with Ivy 1.4.1. Using
> the http resolver won't be of much help, since no publish is supported with
> this kind of repository. From my experience, ssh based repositories works
> pretty well and have the benefit of being secure. But I don't know if it's
> an option for you.
> 
> Xavier
> 
> On 9/25/07, Christian Möller <dc...@gmx.de> wrote:
>> Hi again,
>>
>> to add some further information: We are using the VFS resolver of ivy
>> configured in ivyconf.xml like this:
>>
>> <ivyconf>
>>   <conf .../>
>>   <resolvers>
>>     ...
>>     <vfs name="company-repository">
>>       <ivy
>>
>> pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/ivy.xml"/>
>>       <artifact
>>
>> pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/[artifact].[ext]"/>
>>     </vfs>
>>   </resolvers>
>> </ivyconf>
>>
>> Bye the way, I've tested version 2.0-alpha2. Seems that it does not
>> support webdav protocol anymore, cause I'm not able to get it working:
>>
>> [ivy:publish] Available VFS schemes...
>> [ivy:publish] VFS Supported Scheme: file
>> [ivy:publish] VFS Supported Scheme: sftp
>>
>> Webdav is not mentioned anymore unlike with version 1.4.1.
>> Therefore I switched to using http protocol targeting a local Jetty
>> server. It fails with this message:
>>
>> ==========================
>> d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [
>> test2 | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException:
>> Could not create folder "http://localhost:8080/".
>>         at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:319)
>>         at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:281)
>>         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
>> :105)
>>         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:1329)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>>         at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
>> DefaultExecutor.java:41)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>>         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: Could not create
>> folder "http://localhost:8080/".
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:845)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:828)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:828)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:828)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:828)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(
>> AbstractFileObject.java:1212)
>>         at
>> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
>> DefaultFileContent.java:373)
>>         at
>> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
>> DefaultFileContent.java:356)
>>         at
>> org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java
>> :213)
>>         at
>> org.apache.ivy.plugins.repository.AbstractRepository.put(
>> AbstractRepository.java:130)
>>         at
>> org.apache.ivy.plugins.resolver.RepositoryResolver.put(
>> RepositoryResolver.java:174)
>>         at
>> org.apache.ivy.plugins.resolver.RepositoryResolver.publish(
>> RepositoryResolver.java:168)
>>         at
>> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:221)
>>         at
>> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:188)
>>         at
>> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:152)
>>         at org.apache.ivy.Ivy.publish(Ivy.java:320)
>>         at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
>>         ... 18 more
>> Caused by: org.apache.commons.vfs.FileSystemException: This file type
>> does not support folder creation.
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.doCreateFolder(
>> AbstractFileObject.java:218)
>>         at
>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:834)
>>         ... 34 more
>> ==========================
>>
>> Seems that it is trying to create a remote folder named
>> "http://localhost:8080/" - which does not make any sense to me.
>>
>> Greetings
>>
>> Christian
>>
>>
>> Christian Möller schrieb:
>>> Hi,
>>>
>>> we're starting to use Ivy (version 1.4.1). One of the first steps is
>>> creating a company-wide repository. As the backend we're using Tomcat
>>> and webdav as protocol.
>>>
>>> To publish an artifact we first resolve the dependencies like this:
>>>
>>>    <ivy:resolve/>
>>>
>>> After that we invoke the publish target:
>>>
>>>    <ivy:publish resolver="${company-resolver}" validate="true">
>>>       <artifacts pattern="artifact/[artifact].[ext]"/>
>>>    </ivy:publish>
>>>
>>> Unfortunately every time an exception is thrown stating something like
>>> "impossible to publish artifacts for [ test | test | 1.0.0 ]" - to
>>> analyze the problems we are dealing with a dummy artifact and
>>> organisation called "test".
>>>
>>> Running ANT with verbose output flag "-v" faces us with this stack
>> trace:
>>> ==========================
>>> d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [ test
>>> | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException: Could not
>>> create folder "webdav://[HOST]:[PORT]/ivy-repo/test".
>>>         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:254)
>>>         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
>> :105)
>>>         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:1329)
>>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>>>         at
>>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
>> DefaultExecutor.java:41)
>>>         at org.apache.tools.ant.Project.executeTargets(Project.java
>> :1181)
>>>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>>>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>>>         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: Could not create
>>> folder "webdav://[HOST]:[PORT]/ivy-repo/test".
>>>         at
>>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:843)
>>>         at
>>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:826)
>>>         at
>>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:826)
>>>         at
>>> org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(
>> AbstractFileObject.java:1188)
>>>         at
>>> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
>> DefaultFileContent.java:367)
>>>         at
>>> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
>> DefaultFileContent.java:350)
>>>         at
>>> fr.jayasoft.ivy.repository.vfs.VfsRepository.put(VfsRepository.java:190)
>>>         at
>>> fr.jayasoft.ivy.repository.AbstractRepository.put(
>> AbstractRepository.java:123)
>>>         at
>>> fr.jayasoft.ivy.resolver.RepositoryResolver.put(RepositoryResolver.java
>> :180)
>>>         at
>>> fr.jayasoft.ivy.resolver.RepositoryResolver.publish(
>> RepositoryResolver.java:175)
>>>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2436)
>>>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2411)
>>>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2372)
>>>         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:230)
>>>         ... 17 more
>>> Caused by: org.apache.commons.httpclient.HttpException
>>>         at
>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java
>> :3517)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java
>> :3472)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
>> :976)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.setBasicProperties(
>> WebdavResource.java:921)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java
>> :1920)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java
>> :1943)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.refresh(WebdavResource.java:1953)
>>>         at
>>> org.apache.webdav.lib.WebdavResource.mkcolMethod(WebdavResource.java
>> :4139)
>>>         at
>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doCreateFolder(
>> WebdavFileObject.java:354)
>>>         at
>>> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
>> AbstractFileObject.java:832)
>>>         ... 30 more
>>> --- Nested Exception ---
>>> org.apache.commons.vfs.FileSystemException: ... [only already known
>>> stuff is repeated here]
>>> ==========================
>>>
>>> Looking at the folders Tomcat serves via webdav shows that an empty
>>> folder "test" has been created, but nothing else.
>>>
>>> Suprisingly, running ANT again the same way succeeds - but only
>>> sometimes! Almost always (meaning "we still have not observed any
>>> failure after that") it will succeed after the empty folder "test" has
>>> been deleted from the Tomcat webdav root after the first failing
>> attempt.
>>> Don't know if it is a bug with ivy or the webdav library (Jakarta Slide
>>> I guess) or Commons VFS or ... don't know? Maybe we are dealing with it
>>> the wrong way?
>>>
>>> So what to do? Any help?
>>>
>>> Thanks
>>>
>>> Christian
>>>
>>> PS: We are using a webdav based repo handled by Tomcat, but what is the
>>> preferred way establishing a company-wide ivy repo? Any recommendations
>>> concerning protocol and backend? Unfortunately, simple remote filesystem
>>> folders are not an option.
>>>
>>
> 
> 


Re: [Ivy 1.4.1] Impossible to publish artifacts ...: FileSystemException: Could not create folder "webdav://[host]:[port]/ivy-repo/test"

Posted by Xavier Hanin <xa...@gmail.com>.
I don't use the webdav protocol personnally so I can't comment much on this,
but I know some users have managed to get it working with Ivy 1.4.1. Using
the http resolver won't be of much help, since no publish is supported with
this kind of repository. From my experience, ssh based repositories works
pretty well and have the benefit of being secure. But I don't know if it's
an option for you.

Xavier

On 9/25/07, Christian Möller <dc...@gmx.de> wrote:
>
> Hi again,
>
> to add some further information: We are using the VFS resolver of ivy
> configured in ivyconf.xml like this:
>
> <ivyconf>
>   <conf .../>
>   <resolvers>
>     ...
>     <vfs name="company-repository">
>       <ivy
>
> pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/ivy.xml"/>
>       <artifact
>
> pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/[artifact].[ext]"/>
>     </vfs>
>   </resolvers>
> </ivyconf>
>
> Bye the way, I've tested version 2.0-alpha2. Seems that it does not
> support webdav protocol anymore, cause I'm not able to get it working:
>
> [ivy:publish] Available VFS schemes...
> [ivy:publish] VFS Supported Scheme: file
> [ivy:publish] VFS Supported Scheme: sftp
>
> Webdav is not mentioned anymore unlike with version 1.4.1.
> Therefore I switched to using http protocol targeting a local Jetty
> server. It fails with this message:
>
> ==========================
> d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [
> test2 | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException:
> Could not create folder "http://localhost:8080/".
>         at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:319)
>         at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:281)
>         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
> :105)
>         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:1329)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
> DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         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: Could not create
> folder "http://localhost:8080/".
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:845)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:828)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:828)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:828)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:828)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(
> AbstractFileObject.java:1212)
>         at
> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
> DefaultFileContent.java:373)
>         at
> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
> DefaultFileContent.java:356)
>         at
> org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java
> :213)
>         at
> org.apache.ivy.plugins.repository.AbstractRepository.put(
> AbstractRepository.java:130)
>         at
> org.apache.ivy.plugins.resolver.RepositoryResolver.put(
> RepositoryResolver.java:174)
>         at
> org.apache.ivy.plugins.resolver.RepositoryResolver.publish(
> RepositoryResolver.java:168)
>         at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:221)
>         at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:188)
>         at
> org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:152)
>         at org.apache.ivy.Ivy.publish(Ivy.java:320)
>         at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
>         ... 18 more
> Caused by: org.apache.commons.vfs.FileSystemException: This file type
> does not support folder creation.
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.doCreateFolder(
> AbstractFileObject.java:218)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:834)
>         ... 34 more
> ==========================
>
> Seems that it is trying to create a remote folder named
> "http://localhost:8080/" - which does not make any sense to me.
>
> Greetings
>
> Christian
>
>
> Christian Möller schrieb:
> > Hi,
> >
> > we're starting to use Ivy (version 1.4.1). One of the first steps is
> > creating a company-wide repository. As the backend we're using Tomcat
> > and webdav as protocol.
> >
> > To publish an artifact we first resolve the dependencies like this:
> >
> >    <ivy:resolve/>
> >
> > After that we invoke the publish target:
> >
> >    <ivy:publish resolver="${company-resolver}" validate="true">
> >       <artifacts pattern="artifact/[artifact].[ext]"/>
> >    </ivy:publish>
> >
> > Unfortunately every time an exception is thrown stating something like
> > "impossible to publish artifacts for [ test | test | 1.0.0 ]" - to
> > analyze the problems we are dealing with a dummy artifact and
> > organisation called "test".
> >
> > Running ANT with verbose output flag "-v" faces us with this stack
> trace:
> >
> > ==========================
> > d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [ test
> > | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException: Could not
> > create folder "webdav://[HOST]:[PORT]/ivy-repo/test".
> >         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:254)
> >         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
> :105)
> >         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:1329)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> >         at
> > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
> DefaultExecutor.java:41)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java
> :1181)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:698)
> >         at org.apache.tools.ant.Main.startAnt(Main.java:199)
> >         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: Could not create
> > folder "webdav://[HOST]:[PORT]/ivy-repo/test".
> >         at
> > org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:843)
> >         at
> > org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:826)
> >         at
> > org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:826)
> >         at
> > org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(
> AbstractFileObject.java:1188)
> >         at
> > org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
> DefaultFileContent.java:367)
> >         at
> > org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(
> DefaultFileContent.java:350)
> >         at
> > fr.jayasoft.ivy.repository.vfs.VfsRepository.put(VfsRepository.java:190)
> >         at
> > fr.jayasoft.ivy.repository.AbstractRepository.put(
> AbstractRepository.java:123)
> >         at
> > fr.jayasoft.ivy.resolver.RepositoryResolver.put(RepositoryResolver.java
> :180)
> >         at
> > fr.jayasoft.ivy.resolver.RepositoryResolver.publish(
> RepositoryResolver.java:175)
> >         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2436)
> >         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2411)
> >         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2372)
> >         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:230)
> >         ... 17 more
> > Caused by: org.apache.commons.httpclient.HttpException
> >         at
> > org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java
> :3517)
> >         at
> > org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java
> :3472)
> >         at
> > org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
> :976)
> >         at
> > org.apache.webdav.lib.WebdavResource.setBasicProperties(
> WebdavResource.java:921)
> >         at
> > org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java
> :1920)
> >         at
> > org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java
> :1943)
> >         at
> > org.apache.webdav.lib.WebdavResource.refresh(WebdavResource.java:1953)
> >         at
> > org.apache.webdav.lib.WebdavResource.mkcolMethod(WebdavResource.java
> :4139)
> >         at
> > org.apache.commons.vfs.provider.webdav.WebdavFileObject.doCreateFolder(
> WebdavFileObject.java:354)
> >         at
> > org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
> AbstractFileObject.java:832)
> >         ... 30 more
> > --- Nested Exception ---
> > org.apache.commons.vfs.FileSystemException: ... [only already known
> > stuff is repeated here]
> > ==========================
> >
> > Looking at the folders Tomcat serves via webdav shows that an empty
> > folder "test" has been created, but nothing else.
> >
> > Suprisingly, running ANT again the same way succeeds - but only
> > sometimes! Almost always (meaning "we still have not observed any
> > failure after that") it will succeed after the empty folder "test" has
> > been deleted from the Tomcat webdav root after the first failing
> attempt.
> >
> > Don't know if it is a bug with ivy or the webdav library (Jakarta Slide
> > I guess) or Commons VFS or ... don't know? Maybe we are dealing with it
> > the wrong way?
> >
> > So what to do? Any help?
> >
> > Thanks
> >
> > Christian
> >
> > PS: We are using a webdav based repo handled by Tomcat, but what is the
> > preferred way establishing a company-wide ivy repo? Any recommendations
> > concerning protocol and backend? Unfortunately, simple remote filesystem
> > folders are not an option.
> >
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Re: [Ivy 1.4.1] Impossible to publish artifacts ...: FileSystemException: Could not create folder "webdav://[host]:[port]/ivy-repo/test"

Posted by Christian Möller <dc...@gmx.de>.
Hi again,

to add some further information: We are using the VFS resolver of ivy
configured in ivyconf.xml like this:

<ivyconf>
  <conf .../>
  <resolvers>
    ...
    <vfs name="company-repository">
      <ivy
pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/ivy.xml"/>
      <artifact
pattern="webdav://[host]:[port]/ivy-repo/[organisation]/[module]/[revision]/[artifact].[ext]"/>
    </vfs>
  </resolvers>
</ivyconf>

Bye the way, I've tested version 2.0-alpha2. Seems that it does not
support webdav protocol anymore, cause I'm not able to get it working:

[ivy:publish] Available VFS schemes...
[ivy:publish] VFS Supported Scheme: file
[ivy:publish] VFS Supported Scheme: sftp

Webdav is not mentioned anymore unlike with version 1.4.1.
Therefore I switched to using http protocol targeting a local Jetty
server. It fails with this message:

==========================
d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [
test2 | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException:
Could not create folder "http://localhost:8080/".
        at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:319)
        at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:281)
        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:105)
        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:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        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: Could not create
folder "http://localhost:8080/".
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:845)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:828)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:828)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:828)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:828)
        at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1212)
        at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373)
        at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356)
        at
org.apache.ivy.plugins.repository.vfs.VfsRepository.put(VfsRepository.java:213)
        at
org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
        at
org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:174)
        at
org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:168)
        at
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:221)
        at
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:188)
        at
org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:152)
        at org.apache.ivy.Ivy.publish(Ivy.java:320)
        at org.apache.ivy.ant.IvyPublish.doExecute(IvyPublish.java:299)
        ... 18 more
Caused by: org.apache.commons.vfs.FileSystemException: This file type
does not support folder creation.
        at
org.apache.commons.vfs.provider.AbstractFileObject.doCreateFolder(AbstractFileObject.java:218)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:834)
        ... 34 more
==========================

Seems that it is trying to create a remote folder named
"http://localhost:8080/" - which does not make any sense to me.

Greetings

Christian


Christian Möller schrieb:
> Hi,
> 
> we're starting to use Ivy (version 1.4.1). One of the first steps is
> creating a company-wide repository. As the backend we're using Tomcat
> and webdav as protocol.
> 
> To publish an artifact we first resolve the dependencies like this:
> 
>    <ivy:resolve/>
> 
> After that we invoke the publish target:
> 
>    <ivy:publish resolver="${company-resolver}" validate="true">
>       <artifacts pattern="artifact/[artifact].[ext]"/>
>    </ivy:publish>
> 
> Unfortunately every time an exception is thrown stating something like
> "impossible to publish artifacts for [ test | test | 1.0.0 ]" - to
> analyze the problems we are dealing with a dummy artifact and
> organisation called "test".
> 
> Running ANT with verbose output flag "-v" faces us with this stack trace:
> 
> ==========================
> d:\Projects\Ivy\build.xml:40: impossible to publish artifacts for [ test
> | test | 1.0.0 ]: org.apache.commons.vfs.FileSystemException: Could not
> create folder "webdav://[HOST]:[PORT]/ivy-repo/test".
>         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:254)
>         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:105)
>         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:1329)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         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: Could not create
> folder "webdav://[HOST]:[PORT]/ivy-repo/test".
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:843)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:826)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:826)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1188)
>         at
> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:367)
>         at
> org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:350)
>         at
> fr.jayasoft.ivy.repository.vfs.VfsRepository.put(VfsRepository.java:190)
>         at
> fr.jayasoft.ivy.repository.AbstractRepository.put(AbstractRepository.java:123)
>         at
> fr.jayasoft.ivy.resolver.RepositoryResolver.put(RepositoryResolver.java:180)
>         at
> fr.jayasoft.ivy.resolver.RepositoryResolver.publish(RepositoryResolver.java:175)
>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2436)
>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2411)
>         at fr.jayasoft.ivy.Ivy.publish(Ivy.java:2372)
>         at fr.jayasoft.ivy.ant.IvyPublish.execute(IvyPublish.java:230)
>         ... 17 more
> Caused by: org.apache.commons.httpclient.HttpException
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>         at
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>         at
> org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:921)
>         at
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1920)
>         at
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1943)
>         at
> org.apache.webdav.lib.WebdavResource.refresh(WebdavResource.java:1953)
>         at
> org.apache.webdav.lib.WebdavResource.mkcolMethod(WebdavResource.java:4139)
>         at
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doCreateFolder(WebdavFileObject.java:354)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:832)
>         ... 30 more
> --- Nested Exception ---
> org.apache.commons.vfs.FileSystemException: ... [only already known
> stuff is repeated here]
> ==========================
> 
> Looking at the folders Tomcat serves via webdav shows that an empty
> folder "test" has been created, but nothing else.
> 
> Suprisingly, running ANT again the same way succeeds - but only
> sometimes! Almost always (meaning "we still have not observed any
> failure after that") it will succeed after the empty folder "test" has
> been deleted from the Tomcat webdav root after the first failing attempt.
> 
> Don't know if it is a bug with ivy or the webdav library (Jakarta Slide
> I guess) or Commons VFS or ... don't know? Maybe we are dealing with it
> the wrong way?
> 
> So what to do? Any help?
> 
> Thanks
> 
> Christian
> 
> PS: We are using a webdav based repo handled by Tomcat, but what is the
> preferred way establishing a company-wide ivy repo? Any recommendations
> concerning protocol and backend? Unfortunately, simple remote filesystem
> folders are not an option.
>