-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MENFORCER-497] Require Maven 3.6.3+
- Loading branch information
1 parent
80e6626
commit 29d1c0d
Showing
14 changed files
with
30 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...enforcer-plugin/src/it/projects/dependencies_converge_exclude_wildcard/invoker.properties
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
maven-enforcer-plugin/src/it/projects/require-no-repositories_mm_ci/invoker.properties
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
maven-enforcer-plugin/src/it/projects/require-plugin-versions-expressions/invoker.properties
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...rojects/require-plugin-versions-plugin-with-integration-test-lifecycle/invoker.properties
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...in/src/it/projects/require-snapshot-version_success_parent-ci-friendly/invoker.properties
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
...n-enforcer-plugin/src/it/projects/require-upper-bound-exclude_wildcard/invoker.properties
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Properties; | ||
|
||
import org.apache.maven.enforcer.rule.api.EnforcerLevel; | ||
import org.apache.maven.enforcer.rule.api.EnforcerRule; | ||
|
@@ -33,21 +34,21 @@ | |
import org.apache.maven.plugins.enforcer.internal.EnforcerRuleDesc; | ||
import org.apache.maven.plugins.enforcer.internal.EnforcerRuleManager; | ||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.Mock; | ||
import org.mockito.Mockito; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
import org.mockito.junit.jupiter.MockitoSettings; | ||
import org.mockito.quality.Strictness; | ||
|
||
import static org.assertj.core.api.Assertions.assertThatCode; | ||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
import static org.junit.jupiter.api.Assertions.fail; | ||
import static org.mockito.ArgumentMatchers.any; | ||
import static org.mockito.Mockito.lenient; | ||
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
|
||
|
@@ -57,7 +58,6 @@ | |
* @author <a href="mailto:[email protected]">Brian Fox</a> | ||
*/ | ||
@ExtendWith(MockitoExtension.class) | ||
@MockitoSettings(strictness = Strictness.LENIENT) | ||
class TestEnforceMojo { | ||
|
||
@Mock | ||
|
@@ -69,6 +69,12 @@ class TestEnforceMojo { | |
@InjectMocks | ||
private EnforceMojo mojo; | ||
|
||
@BeforeEach | ||
void setup() { | ||
lenient().when(session.getSystemProperties()).thenReturn(new Properties()); | ||
lenient().when(session.getUserProperties()).thenReturn(new Properties()); | ||
} | ||
|
||
@Test | ||
void emptyRuleListShouldThrowException() { | ||
mojo.setFail(false); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters