[
https://issues.apache.org/jira/browse/MDEP-979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955198#comment-17955198
]
ASF GitHub Bot commented on MDEP-979:
-------------------------------------
pzygielo commented on code in PR #532:
URL:
https://github.com/apache/maven-dependency-plugin/pull/532#discussion_r2115815689
##########
src/test/java/org/apache/maven/plugins/dependency/AbstractDependencyMojoTestCase.java:
##########
@@ -35,33 +36,52 @@
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.junit.Before;
import org.sonatype.plexus.build.incremental.DefaultBuildContext;
public abstract class AbstractDependencyMojoTestCase extends
AbstractMojoTestCase {
protected File testDir;
-
protected DependencyArtifactStubFactory stubFactory;
- protected void setUp(String testDirectoryName, boolean createFiles) throws
Exception {
- setUp(testDirectoryName, createFiles, true);
- }
-
- protected void setUp(String testDirectoryName, boolean createFiles,
boolean flattenedPath) throws Exception {
- // required for mojo lookups to work
+ @Override
+ @Before
Review Comment:
This is misleading.
This is still JUnit3 TestCase (and its successors are executed as such) and
JUnit's annotations have no power here (or there).
> Clean up AbstractDependencyMojoTestCase setUp
> ---------------------------------------------
>
> Key: MDEP-979
> URL: https://issues.apache.org/jira/browse/MDEP-979
> Project: Maven Dependency Plugin (Moved to GitHub Issues)
> Issue Type: Task
> Reporter: Elliotte Rusty Harold
> Priority: Minor
>
> The setUp methods here are a mess and do not follow JUnit conventions.
> Furthermore, subclasses do not always properly invoke super.setUp
--
This message was sent by Atlassian Jira
(v8.20.10#820010)