Success.... or mostly anyway. It is working excellently when I build from the command line with , however when I resolve dependencies in my IDE (specifically eclipse with m2eclipse) it resolves the descriptor, translates it into the new local repo ivy-pom-translations correctly - but still returns me the ivy.xml in pom guise, which is then cached in my local repository (the one on my machine) and hampers everything until i delete it and re-resolve.
My question is: have you seen issues or tips before where m2eclipse affects how maven resolves something in artifactory? It seems to be short circuiting the lifecycle somewhere. I can't emulate the behaviour with pure maven. This is probably beyond the scope of this forum - if you don't have any ideas I'll go to the m2eclipse forum next. *My setup is:* - remote repo: ivy-artifacts - remote repo: ivy-descriptors (i seem to need this to resolve descriptor only dependencies - i.e. where there's only an ivy.xml which lists a load of transitive dependencies) - local repo: ivy-pom-translations - virtual repo: These are all listed in the predefined virtual repo 'remote-repos' - with the local repo (ivy-pom-translations) at the top (i assume this means 'check here first'). *In afterRemoteDownload callback:* I resolve the full remote repo http url by getting the repoConfig 'url' property for the remote repo and appending the repoPath.path attribute from the passed in argument of the closure (as is shown in the example on the User Plugins page - in the cron section). I grab the content of this url using normal groovy/java api tooling. I translate it to a pom with a bit of xslt. I write it to the local repo 'ivy-pom-translations'. *In my local maven settings file:* I have the repo 'remote-repos' listed (along with the releases and snapshots local repo's for deploying to in the normal fashion). *The result:* When I build locally on the command line with the dependencies listed in my ivy repo are retrieved and their ivy.xml descriptors translated into my local repo 'ivy-pom-translations', the local build receives the valid pom file and resolves transitive dependencies as expected, which in turn are translated ivy to pom where necessary. *I do see an error in my log however as follows:* Which is because Artifactory wants to process the ivy.xml from the remote repo as a pom prior to hitting the afterRemoteDownload callback where I translate it into a local repo. This doesn't appear to hamper me though so I only list it in case you have any comments about it. There are still some things to sort out but in principal it's working as i need it to. The issues remaining that i can think of are: 1. to write the pom to the local repo i need to give access for 'deploy' and 'delete' to anonymous - if I want to offer anonymous access to read the ivy repo. Is there a way to get into a more secured realm in the 'afterRemoteDownload' callback? 2. our ivy repo is secured with basic http authentication. I can setup a generic password around this but it would be nice if i could scrape it off some property somewhere in my repo config - given i've already setup the credentials when mapping the repo - rather than code it into the plugin. Is there a way? Thanks for your help Yoav. Regards, Jon -- View this message in context: http://artifactory-users.108859.n3.nabble.com/Pure-ivy-xml-artifact-resolution-tp3709002p3753105.html Sent from the Artifactory - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Artifactory-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/artifactory-users
