I tried to create mercury-based wagon provider and got overwhelmed with Wagon's strange architecture decisions and APIs.

First of all - inheriting from AbstractWagon and implementing required methods took 20 min - excellent! The rest two days (are still being) spent trying to understand:

- wagon-tests - I assume it's integration tests every provider has to pass?

- why do tests requite provider to fire events, especially TRANSFER event? What happens when provider has much higher up APIs and does not control the transfer process? What if provider does not want to share events - why mandate them by the tests ??

- why tests rely on the Resource object, while it's not manipulated anywhere in the APIs? Necessity to create on per each put or get represents an object leak for me. Especially highly artificial sequence of populating this object with data - set content length before Initiated event and tests fail.

- what is the exact combination of Resource manipulation in the get operation? I tried several and am still missing what should be filled in when: resource (local file, I assume?) is empty when firing getInitialized(), but tests fail, saying they expected resource with a content length and timestamp. ... any help is greatly appreciated!

- where did getFileList() come from?? HTTP provider, for example, cannot do it without scrapping a page, and if repository has different indexing formats/options - it will not work. And tests fail I don't implement one. After all - this is why maven-metadata.xml exists!

- where did resourceExists() come from? In HTTP provider it is not possible without a try-and-fail cycle, which slows everything down - bad choice. This is why maven-metadata.xml exists!

- why such fascination with getIfNewer() in the APIs? This notion is external to a dumb http server and the suggested unix-like timestamp may yield wrong results by as much as 24 hours, depending on the server and client locations. This is why we use UTC timestamps in the metadata files .. and that is why metadata files exist :)

Overall impression is not too favorable. I am trying to jump the hoops in order to pass the tests. If somebody has any insights, please help! Maybe some write ups somewhere: how to satisfy wagon-provider-tests?

Thanks,
Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to