[jira] Commented: (MRM-426) Search does not work for snapshots because of different version values in index and database when the snapshot version is unique
[ http://jira.codehaus.org/browse/MRM-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102151 ] Maria Odea Ching commented on MRM-426: -- From the discussions posted in the dev list thread, the approach for this would be: - index all versions (timestamped snapshots, generic snapshots and released versions) - add all versions in the database - include *-SNAPSHOT when artifact is browsed. This should point to the latest timestamped version if no *-SNAPSHOT exists in repo/db. Search does not work for snapshots because of different version values in index and database when the snapshot version is unique Key: MRM-426 URL: http://jira.codehaus.org/browse/MRM-426 Project: Archiva Issue Type: Bug Affects Versions: 1.0-alpha-2 Reporter: Maria Odea Ching Assignee: Maria Odea Ching When an artifact with unique snapshots is searched from Archiva, the search result would contain different hits for that artifact which has the same version but when you click the version to browse the artifact.. an ObjectNotFound error is returned. Below is an example of this behavior. The artifact to be searched is castor-anttasks. Let's say it has 3 SNAPSHOT versions 1.1.2-20070427.065136-1, 1.1.2-20070506.163513-2 and 1.1.2-20070506.163513-3 in the repository, and the path to this artifact is [REPO]/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT. The search results would then look like this: Hits: 3 of 3 castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT When you click either of the versions to browse the artifact, what you would get is this error: 'Unable to find project model for [org.codehaus.castor:castor-anttasks:1.1.2-SNAPSHOT]' -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRM-426) Search does not work for snapshots because of different version values in index and database when the snapshot version is unique
[ http://jira.codehaus.org/browse/MRM-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102032 ] Maria Odea Ching commented on MRM-426: -- See thread in archiva dev list with subject Suggestions/thoughts anyone? (MRM-426) for the discussion about the fix. Search does not work for snapshots because of different version values in index and database when the snapshot version is unique Key: MRM-426 URL: http://jira.codehaus.org/browse/MRM-426 Project: Archiva Issue Type: Bug Affects Versions: 1.0-alpha-2 Reporter: Maria Odea Ching Assignee: Maria Odea Ching When an artifact with unique snapshots is searched from Archiva, the search result would contain different hits for that artifact which has the same version but when you click the version to browse the artifact.. an ObjectNotFound error is returned. Below is an example of this behavior. The artifact to be searched is castor-anttasks. Let's say it has 3 SNAPSHOT versions 1.1.2-20070427.065136-1, 1.1.2-20070506.163513-2 and 1.1.2-20070506.163513-3 in the repository, and the path to this artifact is [REPO]/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT. The search results would then look like this: Hits: 3 of 3 castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT When you click either of the versions to browse the artifact, what you would get is this error: 'Unable to find project model for [org.codehaus.castor:castor-anttasks:1.1.2-SNAPSHOT]' -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRM-426) Search does not work for snapshots because of different version values in index and database when the snapshot version is unique
[ http://jira.codehaus.org/browse/MRM-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101310 ] Maria Odea Ching commented on MRM-426: -- I've tried doing #1 and I encountered another problem when the project model is added in database. Since the version in the pom file is still **-SNAPSHOT even if the artifact is deployed as a uniqueVersion snapshot, you cannot add multiple project models with the same groupId, artifactId and version (ProjectModelToDatabase). To illustrate using the example above: castor-anttasks-1.1.2-20070427.065136-1.jar, castor-anttasks-1.1.2-20070506.163513-2.jar and castor-anttasks-1.1.2-20070506.163513-3.jar has the same versions in their poms, which is 1.1.2-SNAPSHOT. So if the project model for castor-anttasks-1.1.2-20070427.065136-1.jar is already added in the database, the project models for castor-anttasks-1.1.2-20070506.163513-2.jar and castor-anttasks-1.1.2-20070506.163513-3 .jar can no longer be added since they are duplicates of the first one added in the db. The solution I thought for this was to use the uniqueVersion of the artifact itself for the project model when it is added to the database. This would allow the project model to be added at the same time capture the changes in the poms for each unique version. Then when the project model is retrieved from the db and displayed, we could have a process here that would convert unique versions into **-SNAPSHOT. Thoughts, anyone? Search does not work for snapshots because of different version values in index and database when the snapshot version is unique Key: MRM-426 URL: http://jira.codehaus.org/browse/MRM-426 Project: Archiva Issue Type: Bug Affects Versions: 1.0-alpha-2 Reporter: Maria Odea Ching When an artifact with unique snapshots is searched from Archiva, the search result would contain different hits for that artifact which has the same version but when you click the version to browse the artifact.. an ObjectNotFound error is returned. Below is an example of this behavior. The artifact to be searched is castor-anttasks. Let's say it has 3 SNAPSHOT versions 1.1.2-20070427.065136-1, 1.1.2-20070506.163513-2 and 1.1.2-20070506.163513-3 in the repository, and the path to this artifact is [REPO]/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT. The search results would then look like this: Hits: 3 of 3 castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT When you click either of the versions to browse the artifact, what you would get is this error: 'Unable to find project model for [org.codehaus.castor:castor-anttasks:1.1.2-SNAPSHOT]' -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRM-426) Search does not work for snapshots because of different version values in index and database when the snapshot version is unique
[ http://jira.codehaus.org/browse/MRM-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100591 ] Maria Odea Ching commented on MRM-426: -- After further investigation, I found out that the problem was due to the following: 1. When the artifact was indexed (in IndexContentConsumer), the artifact version is being converted to **-SNAPSHOT whenever a unique snapshot version is encountered.. from the example above, 1.1.2-20070427.065136-1, 1.1.2-20070506.163513-2 and 1.1.2-20070506.163513-3 thus becomes 1.1.2-SNAPSHOT when added in the index. This is for the 'version' field in the index. But in the 'filename' field of the index, the unique version is retained as is. Therefore when you search 'castor-anttasks-1.1.2-20070427.065136-1.pom', you'll get 1 hit result like this: Hits: 1 of 1 castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT 2. When the artifact was added in the database (in ArtifactUpdateDatabaseConsumer), the unique version was retained as is. And since the version of the artifact in the results page is 1.1.2-SNAPSHOT, when you click it to browse that artifact.. it couldn't be found on the database because the version of the artifact that was added was still 1.1.2-20070427.065136-1 and what's being queried is 1.1.2-SNAPSHOT. I've thought of two ways to approach this.. 1. do not convert unique snapshots to **-SNAPSHOT and retain all versions as is 2. convert all unique versions (in the database and in the index -- filename field) to **-SNAPSHOT. Personally, I'd go for #1 because the index and the database would match the actual contents of the repository. What do you guys think? Search does not work for snapshots because of different version values in index and database when the snapshot version is unique Key: MRM-426 URL: http://jira.codehaus.org/browse/MRM-426 Project: Archiva Issue Type: Bug Affects Versions: 1.0-alpha-2 Reporter: Maria Odea Ching When an artifact with unique snapshots is searched from Archiva, the search result would contain different hits for that artifact which has the same version but when you click the version to browse the artifact.. an ObjectNotFound error is returned. Below is an example of this behavior. The artifact to be searched is castor-anttasks. Let's say it has 3 SNAPSHOT versions 1.1.2-20070427.065136-1, 1.1.2-20070506.163513-2 and 1.1.2-20070506.163513-3 in the repository, and the path to this artifact is [REPO]/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT. The search results would then look like this: Hits: 3 of 3 castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT castor-anttasks org / codehaus / castor / castor-anttasks | Version(s): 1.1.2-SNAPSHOT When you click either of the versions to browse the artifact, what you would get is this error: 'Unable to find project model for [org.codehaus.castor:castor-anttasks:1.1.2-SNAPSHOT]' -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira