You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "Maria Odea Ching (JIRA)" <ji...@codehaus.org> on 2008/03/17 16:11:46 UTC
[jira] Closed: (MRM-622) database not being updated with project
model information
[ http://jira.codehaus.org/browse/MRM-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maria Odea Ching closed MRM-622.
--------------------------------
Resolution: Fixed
Applied the following sections from the archiva-database-consumers.patch in ProjectModelToDatabaseConsumer and DatabaseCleanupRemoveProjectConsumer:
// Force removal of project model from effective cache
String projectKey = toProjectKey( projectModel );
synchronized ( effectiveProjectCache )
{
if ( effectiveProjectCache.hasKey( projectKey ) )
{
effectiveProjectCache.remove( projectKey );
}
}
...
private String toProjectKey( ArchivaProjectModel project )
{
StringBuilder key = new StringBuilder();
key.append( project.getGroupId() ).append( ":" );
key.append( project.getArtifactId() ).append( ":" );
key.append( project.getVersion() );
return key.toString();
}
Other changes made:
- delete the project model if it already exists in the database (ProjectModelToDatabaseConsumer)
- added the effective-project-cache component in the DatabaseCleanupRemoveProjectModelTest
The above fixes are in -r637928. Thanks!
> database not being updated with project model information
> ---------------------------------------------------------
>
> Key: MRM-622
> URL: http://jira.codehaus.org/browse/MRM-622
> Project: Archiva
> Issue Type: Bug
> Affects Versions: 1.0
> Environment: OS: Windows XP
> Software: Java 5 Update 12 and Maven 2.0.4
> Reporter: Dário Oliveros
> Assignee: Maria Odea Ching
> Fix For: 1.1
>
> Attachments: archiva-database-consumers.patch, archiva-database.patch, archiva-scheduled.patch
>
>
> I noticed Archiva database was not being updated with project model information in the following scenario:
> 1) Project B (1.0-SNAPSHOT) depends on Project A (1.0)
> 2) Project B is deployed to Archiva repository
> 3) Project B changes Project A dependency version from 1.0 to 1.1-SNAPSHOT
> 4) Project B is deployed to Archiva repository again.
> 5) The user executes 'Scan Repository Now' and 'Update Database Now' using Archiva.
> At this point, if you browse project B, you'll notice it still keeps the reference to the former version of Project A, 1.0, and not 1.1-SNAPSHOT. However, if you download the POM file, you will see it has the lastet dependency version as expected.
> NOTE: In project B POM file the snapshotRepository is configured with uniqueVersion equals to false.
--
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