mirror of
https://github.com/apache/maven.git
synced 2025-02-28 05:39:15 +00:00
quiet down some of the project-caching debug output for now...it's getting in the way of debugging other things.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@645971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c32aa5a656
commit
0734c3e60e
@ -73,8 +73,8 @@ public List applyActivatedProfiles( Model model,
|
|||||||
ProfileActivationContext activationContext )
|
ProfileActivationContext activationContext )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
logger.debug( "Building profile manager for model: " + model.getId() + " with pom file: "
|
// logger.debug( "Building profile manager for model: " + model.getId() + " with pom file: "
|
||||||
+ pomFile );
|
// + pomFile );
|
||||||
ProfileManager profileManager = buildProfileManager( model,
|
ProfileManager profileManager = buildProfileManager( model,
|
||||||
pomFile,
|
pomFile,
|
||||||
useProfilesXml,
|
useProfilesXml,
|
||||||
@ -93,9 +93,9 @@ public List applyActivatedExternalProfiles( Model model,
|
|||||||
return Collections.EMPTY_LIST;
|
return Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug( "Building profile manager for model: " + model.getId()
|
// logger.debug( "Building profile manager for model: " + model.getId()
|
||||||
+ " with external profile manager including profiles: "
|
// + " with external profile manager including profiles: "
|
||||||
+ externalProfileManager.getProfilesById() );
|
// + externalProfileManager.getProfilesById() );
|
||||||
return applyActivatedProfiles( model, projectDir, externalProfileManager );
|
return applyActivatedProfiles( model, projectDir, externalProfileManager );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,13 +223,13 @@ public MavenProject buildFromRepository( Artifact artifact,
|
|||||||
MavenProject project = null;
|
MavenProject project = null;
|
||||||
if ( !Artifact.LATEST_VERSION.equals( artifact.getVersion() ) && !Artifact.RELEASE_VERSION.equals( artifact.getVersion() ) )
|
if ( !Artifact.LATEST_VERSION.equals( artifact.getVersion() ) && !Artifact.RELEASE_VERSION.equals( artifact.getVersion() ) )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Checking cache for project (in buildFromRepository): " + artifactKey );
|
// getLogger().debug( "Checking cache for project (in buildFromRepository): " + artifactKey );
|
||||||
project = projectWorkspace.getProject( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
|
project = projectWorkspace.getProject( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( project == null )
|
if ( project == null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Allowing buildFromRepository to proceed for: " + artifactKey );
|
// getLogger().debug( "Allowing buildFromRepository to proceed for: " + artifactKey );
|
||||||
|
|
||||||
Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository );
|
Model model = findModelFromRepository( artifact, remoteArtifactRepositories, localRepository );
|
||||||
|
|
||||||
@ -238,10 +238,10 @@ public MavenProject buildFromRepository( Artifact artifact,
|
|||||||
project = buildInternal( model, config, remoteArtifactRepositories, artifact.getFile(),
|
project = buildInternal( model, config, remoteArtifactRepositories, artifact.getFile(),
|
||||||
false, false, false );
|
false, false, false );
|
||||||
}
|
}
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
getLogger().debug( "Returning cached project: " + project );
|
// getLogger().debug( "Returning cached project: " + project );
|
||||||
}
|
// }
|
||||||
|
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
@ -482,13 +482,13 @@ private MavenProject buildFromSourceFileInternal( File projectDescriptor,
|
|||||||
ProjectBuilderConfiguration config )
|
ProjectBuilderConfiguration config )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
getLogger().debug( "Checking cache-hit on project (in build*): " + projectDescriptor );
|
// getLogger().debug( "Checking cache-hit on project (in build*): " + projectDescriptor );
|
||||||
|
|
||||||
MavenProject project = projectWorkspace.getProject( projectDescriptor );
|
MavenProject project = projectWorkspace.getProject( projectDescriptor );
|
||||||
|
|
||||||
if ( project == null )
|
if ( project == null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Allowing project-build to proceed for: " + projectDescriptor );
|
// getLogger().debug( "Allowing project-build to proceed for: " + projectDescriptor );
|
||||||
|
|
||||||
Model model = readModel( "unknown", projectDescriptor, STRICT_MODEL_PARSING );
|
Model model = readModel( "unknown", projectDescriptor, STRICT_MODEL_PARSING );
|
||||||
|
|
||||||
@ -500,10 +500,10 @@ private MavenProject buildFromSourceFileInternal( File projectDescriptor,
|
|||||||
true,
|
true,
|
||||||
true );
|
true );
|
||||||
}
|
}
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
getLogger().debug( "Returning cached project: " + project );
|
// getLogger().debug( "Returning cached project: " + project );
|
||||||
}
|
// }
|
||||||
|
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
@ -830,7 +830,7 @@ private MavenProject buildInternal( Model model,
|
|||||||
project.setFile( projectDescriptor );
|
project.setFile( projectDescriptor );
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().debug( "Caching project: " + project.getId() + " (also keyed by file: " + project.getFile() + ")" );
|
// getLogger().debug( "Caching project: " + project.getId() + " (also keyed by file: " + project.getFile() + ")" );
|
||||||
|
|
||||||
projectWorkspace.storeProjectByCoordinate( project );
|
projectWorkspace.storeProjectByCoordinate( project );
|
||||||
projectWorkspace.storeProjectByFile( project );
|
projectWorkspace.storeProjectByFile( project );
|
||||||
|
@ -283,7 +283,7 @@ private void loadActiveProfileRepositories( List repositories,
|
|||||||
boolean useProfilesXml )
|
boolean useProfilesXml )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
getLogger().debug( "Grabbing profile-injected repositories for: " + model.getId() );
|
// getLogger().debug( "Grabbing profile-injected repositories for: " + model.getId() );
|
||||||
|
|
||||||
// FIXME: Find a way to pass in this context, so it's never null!
|
// FIXME: Find a way to pass in this context, so it's never null!
|
||||||
ProfileActivationContext context;
|
ProfileActivationContext context;
|
||||||
@ -301,14 +301,14 @@ private void loadActiveProfileRepositories( List repositories,
|
|||||||
pomFile,
|
pomFile,
|
||||||
config.getGlobalProfileManager() );
|
config.getGlobalProfileManager() );
|
||||||
|
|
||||||
getLogger().debug( "Got external-profile repositories: " + profileRepos );
|
// getLogger().debug( "Got external-profile repositories: " + profileRepos );
|
||||||
|
|
||||||
LinkedHashSet pomProfileRepos = profileAdvisor.getArtifactRepositoriesFromActiveProfiles( model,
|
LinkedHashSet pomProfileRepos = profileAdvisor.getArtifactRepositoriesFromActiveProfiles( model,
|
||||||
pomFile,
|
pomFile,
|
||||||
useProfilesXml,
|
useProfilesXml,
|
||||||
context );
|
context );
|
||||||
|
|
||||||
getLogger().debug( "Got pom-profile repositories: " + pomProfileRepos );
|
// getLogger().debug( "Got pom-profile repositories: " + pomProfileRepos );
|
||||||
|
|
||||||
profileRepos.addAll( pomProfileRepos );
|
profileRepos.addAll( pomProfileRepos );
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ private ModelAndFile resolveParentPom( ModelAndFile child,
|
|||||||
|
|
||||||
if ( childIsReactorProject && modelPomFile != null )
|
if ( childIsReactorProject && modelPomFile != null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Attempting to locate parent model using relativePath and local filesystem; child is a reactor project." );
|
// getLogger().debug( "Attempting to locate parent model using relativePath and local filesystem; child is a reactor project." );
|
||||||
|
|
||||||
// if the child isn't a reactor project, don't resolve the parent from the local filesystem...use the repository.
|
// if the child isn't a reactor project, don't resolve the parent from the local filesystem...use the repository.
|
||||||
String relativePath = modelParent.getRelativePath();
|
String relativePath = modelParent.getRelativePath();
|
||||||
@ -362,7 +362,7 @@ private ModelAndFile resolveParentPom( ModelAndFile child,
|
|||||||
parentPomFile = new File( parentPomFile, "pom.xml" );
|
parentPomFile = new File( parentPomFile, "pom.xml" );
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using file: " + parentPomFile );
|
// getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using file: " + parentPomFile );
|
||||||
|
|
||||||
result = projectWorkspace.getModelAndFile( parentPomFile );
|
result = projectWorkspace.getModelAndFile( parentPomFile );
|
||||||
if ( result != null && !parentModelMatches( modelParent, result.getModel() ) )
|
if ( result != null && !parentModelMatches( modelParent, result.getModel() ) )
|
||||||
@ -374,18 +374,18 @@ private ModelAndFile resolveParentPom( ModelAndFile child,
|
|||||||
|
|
||||||
if ( result == null )
|
if ( result == null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using project groupId:artifactId:version." );
|
// getLogger().debug( "Checking cache for parent model-and-file instance: " + key + " using project groupId:artifactId:version." );
|
||||||
|
|
||||||
result = projectWorkspace.getModelAndFile( modelParent.getGroupId(), modelParent.getArtifactId(), modelParent.getVersion() );
|
result = projectWorkspace.getModelAndFile( modelParent.getGroupId(), modelParent.getArtifactId(), modelParent.getVersion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( result != null )
|
if ( result != null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Returning cached instance." );
|
// getLogger().debug( "Returning cached instance." );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().debug( "Allowing parent-model resolution to proceed for: " + key + " (child is: " + model.getId() + ")" );
|
// getLogger().debug( "Allowing parent-model resolution to proceed for: " + key + " (child is: " + model.getId() + ")" );
|
||||||
|
|
||||||
if ( parentPomFile != null )
|
if ( parentPomFile != null )
|
||||||
{
|
{
|
||||||
@ -409,7 +409,7 @@ private ModelAndFile resolveParentPom( ModelAndFile child,
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getLogger().debug( "Attempting to resolve parent POM: " + modelParent.getId() + " using repositories:\n" + StringUtils.join( remoteRepositories.iterator(), "\n" ) );
|
// getLogger().debug( "Attempting to resolve parent POM: " + modelParent.getId() + " using repositories:\n" + StringUtils.join( remoteRepositories.iterator(), "\n" ) );
|
||||||
|
|
||||||
parentPomFile = resolveParentFromRepositories( modelParent,
|
parentPomFile = resolveParentFromRepositories( modelParent,
|
||||||
config,
|
config,
|
||||||
@ -473,7 +473,7 @@ private ModelAndFile resolveParentPom( ModelAndFile child,
|
|||||||
|
|
||||||
if ( result != null )
|
if ( result != null )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Caching parent model-and-file: " + result );
|
// getLogger().debug( "Caching parent model-and-file: " + result );
|
||||||
projectWorkspace.storeModelAndFile( result );
|
projectWorkspace.storeModelAndFile( result );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public ModelAndFile getModelAndFile( String groupId,
|
|||||||
|
|
||||||
String key = createCacheKey( groupId, artifactId, version );
|
String key = createCacheKey( groupId, artifactId, version );
|
||||||
|
|
||||||
getLogger().debug( "Retrieving ModelAndFile instance for: " + key + " from workspace." );
|
// getLogger().debug( "Retrieving ModelAndFile instance for: " + key + " from workspace." );
|
||||||
return (ModelAndFile) cache.get( key );
|
return (ModelAndFile) cache.get( key );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ public ModelAndFile getModelAndFile( File modelFile )
|
|||||||
|
|
||||||
Object pathKey = resolvePathKey( modelFile );
|
Object pathKey = resolvePathKey( modelFile );
|
||||||
|
|
||||||
getLogger().debug( "Retrieving ModelAndFile instance for: " + pathKey + " from workspace." );
|
// getLogger().debug( "Retrieving ModelAndFile instance for: " + pathKey + " from workspace." );
|
||||||
return (ModelAndFile) cache.get( pathKey );
|
return (ModelAndFile) cache.get( pathKey );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ public MavenProject getProject( File projectFile )
|
|||||||
|
|
||||||
Object pathKey = resolvePathKey( projectFile );
|
Object pathKey = resolvePathKey( projectFile );
|
||||||
|
|
||||||
getLogger().debug( "Retrieving MavenProject instance for: " + pathKey + " from workspace." );
|
// getLogger().debug( "Retrieving MavenProject instance for: " + pathKey + " from workspace." );
|
||||||
return (MavenProject) cache.get( pathKey );
|
return (MavenProject) cache.get( pathKey );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public MavenProject getProject( String groupId,
|
|||||||
|
|
||||||
String key = createCacheKey( groupId, artifactId, version );
|
String key = createCacheKey( groupId, artifactId, version );
|
||||||
|
|
||||||
getLogger().debug( "Retrieving MavenProject instance for: " + key + " from workspace." );
|
// getLogger().debug( "Retrieving MavenProject instance for: " + key + " from workspace." );
|
||||||
return (MavenProject) cache.get( key );
|
return (MavenProject) cache.get( key );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ public void storeModelAndFile( ModelAndFile modelAndFile )
|
|||||||
|
|
||||||
Object pathKey = resolvePathKey( modelAndFile.getFile() );
|
Object pathKey = resolvePathKey( modelAndFile.getFile() );
|
||||||
|
|
||||||
getLogger().debug( "Storing ModelAndFile instance under: " + pathKey + " in workspace." );
|
// getLogger().debug( "Storing ModelAndFile instance under: " + pathKey + " in workspace." );
|
||||||
cache.put( pathKey, modelAndFile );
|
cache.put( pathKey, modelAndFile );
|
||||||
|
|
||||||
cache = workspaceStore.getWorkspaceCache( ProjectWorkspace.MODEL_AND_FILE_BYGAV_KEY );
|
cache = workspaceStore.getWorkspaceCache( ProjectWorkspace.MODEL_AND_FILE_BYGAV_KEY );
|
||||||
@ -97,12 +97,12 @@ public void storeModelAndFile( ModelAndFile modelAndFile )
|
|||||||
String key = createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() );
|
String key = createCacheKey( model.getGroupId(), model.getArtifactId(), model.getVersion() );
|
||||||
String keyWithParent = createCacheKeyUsingParent( model );
|
String keyWithParent = createCacheKeyUsingParent( model );
|
||||||
|
|
||||||
getLogger().debug( "Storing ModelAndFile instance under: " + key + " in workspace." );
|
// getLogger().debug( "Storing ModelAndFile instance under: " + key + " in workspace." );
|
||||||
cache.put( key, modelAndFile );
|
cache.put( key, modelAndFile );
|
||||||
|
|
||||||
if ( !key.equals( keyWithParent ) )
|
if ( !key.equals( keyWithParent ) )
|
||||||
{
|
{
|
||||||
getLogger().debug( "Also Storing ModelAndFile instance using groupId/version information from parent, under: " + keyWithParent + " in workspace." );
|
// getLogger().debug( "Also Storing ModelAndFile instance using groupId/version information from parent, under: " + keyWithParent + " in workspace." );
|
||||||
cache.put( keyWithParent, modelAndFile );
|
cache.put( keyWithParent, modelAndFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ public void storeProjectByFile( MavenProject project )
|
|||||||
|
|
||||||
Object pathKey = resolvePathKey( project.getFile() );
|
Object pathKey = resolvePathKey( project.getFile() );
|
||||||
|
|
||||||
getLogger().debug( "Storing MavenProject instance under: " + pathKey + " in workspace." );
|
// getLogger().debug( "Storing MavenProject instance under: " + pathKey + " in workspace." );
|
||||||
cache.put( pathKey, project );
|
cache.put( pathKey, project );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ public void storeProjectByCoordinate( MavenProject project )
|
|||||||
|
|
||||||
String key = createCacheKey( project.getGroupId(), project.getArtifactId(), project.getVersion() );
|
String key = createCacheKey( project.getGroupId(), project.getArtifactId(), project.getVersion() );
|
||||||
|
|
||||||
getLogger().debug( "Storing MavenProject instance under: " + key + " in workspace." );
|
// getLogger().debug( "Storing MavenProject instance under: " + key + " in workspace." );
|
||||||
cache.put( key, project );
|
cache.put( key, project );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user