2929import edu .illinois .cs .dt .tools .utility .OperationTime ;
3030import edu .illinois .cs .testrunner .configuration .Configuration ;
3131import edu .illinois .cs .testrunner .data .results .Result ;
32+ import edu .illinois .cs .testrunner .mavenplugin .MavenProjectWrapper ;
3233import edu .illinois .cs .testrunner .mavenplugin .TestPlugin ;
3334import edu .illinois .cs .testrunner .mavenplugin .TestPluginPlugin ;
3435import edu .illinois .cs .testrunner .runner .Runner ;
@@ -65,6 +66,7 @@ public class CleanerFixerPlugin extends TestPlugin {
6566 public static final String PATCH_LINE_SEP = "==========================" ;
6667
6768 private MavenProject project ;
69+ private MavenProjectWrapper projectWrapper ;
6870 private InstrumentingSmartRunner runner ;
6971
7072 private List <Patch > patches ;
@@ -106,9 +108,10 @@ private URLClassLoader projectClassLoader() throws DependencyResolutionRequiredE
106108 @ Override
107109 public void execute (final MavenProject project ) {
108110 this .project = project ;
111+ this .projectWrapper = new MavenProjectWrapper (project , TestPluginPlugin .mojo ().getLog ());
109112
110113 final Option <Runner > runnerOption = RunnerFactory .from (project );
111- final ErrorLogger logger = new ErrorLogger (project );
114+ final ErrorLogger logger = new ErrorLogger (projectWrapper );
112115
113116 this .patches = new ArrayList <>();
114117
@@ -122,7 +125,7 @@ public void execute(final MavenProject project) {
122125 this .runner = InstrumentingSmartRunner .fromRunner (runnerOption .get ());
123126
124127 if (!Files .exists (DetectorPathManager .originalOrderPath ()) && MinimizerPlugin .ORIGINAL_ORDER == null ) {
125- Files .write (DetectorPathManager .originalOrderPath (), DetectorPlugin .getOriginalOrder (project ));
128+ Files .write (DetectorPathManager .originalOrderPath (), DetectorPlugin .getOriginalOrder (projectWrapper , this . runner . framework () ));
126129 }
127130
128131 startTime = System .currentTimeMillis ();
@@ -170,7 +173,7 @@ public void execute(final MavenProject project) {
170173 private Stream <MinimizeTestsResult > detect () throws Exception {
171174 if (!Files .exists (DetectorPathManager .detectionFile ())) {
172175 if (Configuration .config ().getProperty ("diagnosis.run_detection" , true )) {
173- new DetectorPlugin (DetectorPathManager .detectionResults (), runner ).execute (project );
176+ new DetectorPlugin (DetectorPathManager .detectionResults (), runner ).execute (projectWrapper );
174177 } else if (MinimizerPlugin .FLAKY_LIST == null ) {
175178 throw new NoSuchFileException ("File " + DetectorPathManager .detectionFile () + " does not exist and diagnosis.run_detection is set to false" );
176179 }
0 commit comments