Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
830 changes: 390 additions & 440 deletions pom.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

23 changes: 9 additions & 14 deletions src/main/java/org/apache/maven/buildcache/CacheContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -27,32 +27,27 @@
/**
* CacheContext
*/
public class CacheContext
{
public class CacheContext {

private final MavenProject project;
private final ProjectsInputInfo inputInfo;
private final MavenSession session;

public CacheContext( MavenProject project, ProjectsInputInfo inputInfo, MavenSession session )
{
this.project = requireNonNull( project );
this.inputInfo = requireNonNull( inputInfo );
this.session = requireNonNull( session );
public CacheContext(MavenProject project, ProjectsInputInfo inputInfo, MavenSession session) {
this.project = requireNonNull(project);
this.inputInfo = requireNonNull(inputInfo);
this.session = requireNonNull(session);
}

public MavenProject getProject()
{
public MavenProject getProject() {
return project;
}

public ProjectsInputInfo getInputInfo()
{
public ProjectsInputInfo getInputInfo() {
return inputInfo;
}

public MavenSession getSession()
{
public MavenSession getSession() {
return session;
}
}
24 changes: 11 additions & 13 deletions src/main/java/org/apache/maven/buildcache/CacheController.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -20,6 +20,7 @@

import java.util.List;
import java.util.Map;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.execution.MojoExecutionEvent;
import org.apache.maven.plugin.MojoExecution;
Expand All @@ -28,22 +29,19 @@
/**
* CacheController
*/
public interface CacheController
{
public interface CacheController {

CacheResult findCachedBuild( MavenSession session,
MavenProject project,
List<MojoExecution> mojoExecutions,
boolean skipCache );
CacheResult findCachedBuild(
MavenSession session, MavenProject project, List<MojoExecution> mojoExecutions, boolean skipCache);

boolean restoreProjectArtifacts( CacheResult cacheResult );
boolean restoreProjectArtifacts(CacheResult cacheResult);

void save( CacheResult cacheResult,
void save(
CacheResult cacheResult,
List<MojoExecution> mojoExecutions,
Map<String, MojoExecutionEvent> executionEvents );

boolean isForcedExecution( MavenProject project, MojoExecution execution );
Map<String, MojoExecutionEvent> executionEvents);

void saveCacheReport( MavenSession session );
boolean isForcedExecution(MavenProject project, MojoExecution execution);

void saveCacheReport(MavenSession session);
}
Loading