2012/3/13 Per Arnold Blaasmo <[email protected]>: > Hi guys! I am still trying to get this Ivy repository support. Its been > on and of working with it, but... > > I have some problem understand where in the code the choice of the > repository gets taken. > It seems to me that there is somewhat hard coded to choose the 'default' > (which is maven2) different places in the code. some (all) of us come from the maven land :P > > I have added so that it is possible to configure the repository layout > to be configured to be 'ivy'. > So I though I should try to get it to show artifacts using the classes > in the new ivy plugin, but it always uses the classes/beans in the > maven2 plugin. > Any one care to hint me in the correct direction? > > I tried to trace it from this stack trace: > java.lang.IllegalArgumentException: Not a valid artifact path in a > Maven 2 repository, filename 'ivy-3.0.0.129.xml' doesn't start with > artifact ID 'avr8-utils' > > org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryPathTranslator.getArtifactFromId(Maven2RepositoryPathTranslator.java:190) > > org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryStorage.getArtifactFromFile(Maven2RepositoryStorage.java:586) > > org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryStorage.readArtifactsMetadata(Maven2RepositoryStorage.java:566) > > org.apache.archiva.metadata.repository.DefaultMetadataResolver.resolveArtifacts(DefaultMetadataResolver.java:367) > > org.apache.archiva.web.action.ShowArtifactAction.getProjectVersionMetadata(ShowArtifactAction.java:197) > > org.apache.archiva.web.action.ShowArtifactAction.handleArtifact(ShowArtifactAction.java:133) > > org.apache.archiva.web.action.ShowArtifactAction.artifact(ShowArtifactAction.java:121) > > From this it seems to me that it makes a choice somewhere in > DefaultMetadataResolver.java > Or in 'ShowArtifact.jsp' i find: > <c:set var="mavenFacet" > value="${model.facets['org.apache.archiva.metadata.repository.storage.maven2.project']}" > /> > That seems to hardcode mave2 project. I am a little unsure of the facets > role in the big picture yet and how that possible controls the choice of > repository. > > Also there seems to be some comments her and there in different modules > about 'FIXME' to support different repos. > > Have I just taken on a to big task here or? Yup you have taken a "medium" task here :-). I wanted to work on that (a plugin mechanism) after I finish the ui rewrite. The goal will be to have an extension point (called it "repository type") where display repository content will use the plugin mechanism too. But I agree it's not yet done :-) I tend to say reusing the current classes/bean to display ivy repo content can be the good direction but you will have to extends/change some for ivy purpose.
> > Regards > Per A. > > -- > Per Arnold Blåsmo > Senior Design Engineer, Atmel Norway > > -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy
