[MRM-687]

applied patch submitted by Dario Oliveros

-do not add project into cache if it contains no groupId and version information (EffectiveProjectModelFilter)


git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@630722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2008-02-25 02:57:50 +00:00
parent c380953a23
commit b0fac565d6

View File

@ -111,10 +111,15 @@ public ArchivaProjectModel filter( final ArchivaProjectModel project )
// Resolve dependency versions from dependency management. // Resolve dependency versions from dependency management.
applyDependencyManagement( effectiveProject ); applyDependencyManagement( effectiveProject );
synchronized ( effectiveProjectCache ) // Do not add project into cache if it contains no groupId and
// version information
if ( project.getGroupId() != null && project.getVersion() != null )
{ {
DEBUG( "Putting (to cache/projectKey): " + projectKey ); synchronized ( effectiveProjectCache )
effectiveProjectCache.put( projectKey, effectiveProject ); {
DEBUG( "Putting (to cache/projectKey): " + projectKey );
effectiveProjectCache.put( projectKey, effectiveProject );
}
} }
// Return what we got. // Return what we got.