Skip to content

Commit 4769e13

Browse files
committed
backmerge - resolved conflicts and took all changes from @jesse over
2 parents cb1a5e8 + 1a12bb9 commit 4769e13

File tree

4 files changed

+3
-24
lines changed

4 files changed

+3
-24
lines changed

maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,13 @@
8080
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
8181

8282
/**
83-
* TODO: add a way to use the plugin POM for the lookup so that the user doesn't have to provide the a:g:v:goal
84-
* as the role hint for the mojo lookup.
85-
* TODO: standardize the execution of the mojo and looking at the results, but could simply have a template method
86-
* for verifying the state of the mojo post execution
87-
* TODO: need a way to look at the state of the mojo without adding getters, this could be where we finally specify
88-
* the expressions which extract values from the mojo.
89-
* TODO: create a standard directory structure for picking up POMs to make this even easier, we really just need a testing
90-
* descriptor and make this entirely declarative!
83+
* @author jesse
9184
*
9285
* @deprected As of version 3.4.0, it is advised to work with JUnit5 tests which do not
9386
* use this class but {@link MojoTest}
9487
* instead.
9588
*
96-
* @author jesse
9789
*/
98-
@Deprecated
9990
public abstract class AbstractMojoTestCase extends PlexusTestCase {
10091
private static final DefaultArtifactVersion MAVEN_VERSION;
10192

@@ -124,12 +115,6 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase {
124115

125116
private Map<String, MojoDescriptor> mojoDescriptors;
126117

127-
/*
128-
* for the harness I think we have decided against going the route of using the maven project builder.
129-
* instead I think we are going to try and make an instance of the localrespository and assign that
130-
* to either the project stub or into the mojo directly with injection...not sure yet though.
131-
*/
132-
// private MavenProjectBuilder projectBuilder;
133118
@Override
134119
protected void setUp() throws Exception {
135120
assertTrue(

maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,5 @@ public String getName() {
323323
}
324324

325325
@Override
326-
public void setThreshold(int threshold) {
327-
// TODO Auto-generated method stub
328-
329-
}
326+
public void setThreshold(int threshold) {}
330327
}

maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public File getBasedir(String project) throws IOException {
9292
// static helpers
9393

9494
public static void cp(File basedir, String from, String to) throws IOException {
95-
// TODO ensure destination lastModified timestamp changes
9695
FileUtils.copyFile(new File(basedir, from), new File(basedir, to));
9796
}
9897

maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class PluginArtifactFileTest extends AbstractMojoTestCase {
2727
private static final String FS = System.getProperty("file.separator");
2828

2929
public void testArtifact() throws Exception {
30-
MojoExecution execution = newMojoExecution("parameters"); // TODO dedicated test mojo
30+
MojoExecution execution = newMojoExecution("parameters");
3131

3232
List<Artifact> artifacts =
3333
execution.getMojoDescriptor().getPluginDescriptor().getArtifacts();
@@ -40,6 +40,4 @@ public void testArtifact() throws Exception {
4040
assertEquals("0.0.1-SNAPSHOT", artifact.getBaseVersion());
4141
assertTrue(artifact.getFile().getAbsolutePath().endsWith(FS + "target" + FS + "test-classes"));
4242
}
43-
44-
// TODO find a way to automate testing of jar:file:/ test plugin URLs
4543
}

0 commit comments

Comments
 (0)