Skip to content

Commit d1322c6

Browse files
committed
Revert "[MBUILDCACHE-20] Use local cache before remote cache"
This reverts commit abe934c.
1 parent 056b27e commit d1322c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,22 +166,22 @@ public CacheResult findCachedBuild( MavenSession session, MavenProject project,
166166
ProjectsInputInfo inputInfo = projectInputCalculator.calculateInput( project );
167167

168168
final CacheContext context = new CacheContext( project, inputInfo, session );
169-
// local build first
170-
CacheResult result = findLocalBuild( mojoExecutions, context );
169+
// remote build first
170+
CacheResult result = findCachedBuild( mojoExecutions, context );
171171

172172
if ( !result.isSuccess() && result.getContext() != null )
173173
{
174-
LOGGER.debug( "Local cache is incomplete or missing, trying remote build" );
174+
LOGGER.debug( "Remote cache is incomplete or missing, trying local build" );
175175

176-
CacheResult remoteBuild = findCachedBuild( mojoExecutions, context );
176+
CacheResult localBuild = findLocalBuild( mojoExecutions, context );
177177

178-
if ( remoteBuild.isSuccess() || ( remoteBuild.isPartialSuccess() && !result.isPartialSuccess() ) )
178+
if ( localBuild.isSuccess() || ( localBuild.isPartialSuccess() && !result.isPartialSuccess() ) )
179179
{
180-
result = remoteBuild;
180+
result = localBuild;
181181
}
182182
else
183183
{
184-
LOGGER.info( "Remote build was not found by checksum " + inputInfo.getChecksum() );
184+
LOGGER.info( "Local build was not found by checksum " + inputInfo.getChecksum() );
185185
}
186186
}
187187
cacheResults.put( getVersionlessProjectKey( project ), result );

0 commit comments

Comments
 (0)