diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java index 882d66f..13f6c10 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java @@ -58,7 +58,7 @@ * @author Allan Ramirez */ @MojoTest -public class DeployFileMojoTest { +class DeployFileMojoTest { private static final String LOCAL_REPO = "target/local-repo"; @Inject @@ -75,7 +75,7 @@ public class DeployFileMojoTest { @Test @InjectMojo(goal = "deploy-file") - public void testDeployTestEnvironment(DeployFileMojo mojo) { + void deployTestEnvironment(DeployFileMojo mojo) { assertNotNull(mojo); } @@ -93,7 +93,7 @@ public void testDeployTestEnvironment(DeployFileMojo mojo) { @MojoParameter(name = "description", value = "POM was created from deploy:deploy-file") @MojoParameter(name = "generatePom", value = "true") @MojoParameter(name = "skip", value = "snapshots") - public void testBasicDeployFile(DeployFileMojo mojo) throws Exception { + void basicDeployFile(DeployFileMojo mojo) throws Exception { assertNotNull(mojo); String groupId = (String) getVariableValueFromObject(mojo, "groupId"); @@ -155,7 +155,7 @@ public void testBasicDeployFile(DeployFileMojo mojo) throws Exception { @MojoParameter(name = "url", value = "file://${session.topDirectory}/target/remote-repo/deploy-file") @MojoParameter(name = "classifier", value = "bin") @MojoParameter(name = "generatePom", value = "true") - public void testDeployIfClassifierIsSet(DeployFileMojo mojo) throws Exception { + void deployIfClassifierIsSet(DeployFileMojo mojo) throws Exception { assertNotNull(mojo); String groupId = (String) getVariableValueFromObject(mojo, "groupId"); @@ -196,7 +196,7 @@ public void testDeployIfClassifierIsSet(DeployFileMojo mojo) throws Exception { @MojoParameter(name = "repositoryId", value = "deploy-test") @MojoParameter(name = "url", value = "file://${session.topDirectory}/target/remote-repo/deploy-file") @MojoParameter(name = "generatePom", value = "true") - public void testDeployIfArtifactIsNotJar(DeployFileMojo mojo) throws Exception { + void deployIfArtifactIsNotJar(DeployFileMojo mojo) throws Exception { assertNotNull(mojo); String groupId = (String) getVariableValueFromObject(mojo, "groupId"); diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java index f1d5a29..6a96c4e 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java @@ -32,12 +32,12 @@ /** * @author Jerome Lacoste */ -public class DeployFileMojoUnitTest { +class DeployFileMojoUnitTest { MockDeployFileMojo mojo; Parent parent; @BeforeEach - public void setUp() { + void setUp() { parent = Parent.newBuilder() .groupId("parentGroup") .artifactId("parentArtifact") @@ -61,7 +61,7 @@ protected Model readModel(Path pomFile) throws MojoException { } @Test - public void testProcessPomFromPomFileWithParent4() { + void processPomFromPomFileWithParent4() { mojo.setPomFile(Paths.get("foo.bar")); setMojoModel(mojo, null, "artifact", "version", "packaging", parent); mojo.initProperties(); @@ -69,7 +69,7 @@ public void testProcessPomFromPomFileWithParent4() { } @Test - public void testProcessPomFromPomFileWithParent5() { + void processPomFromPomFileWithParent5() { mojo.setPomFile(Paths.get("foo.bar")); setMojoModel(mojo, "group", "artifact", "version", "packaging", parent); mojo.initProperties(); @@ -77,7 +77,7 @@ public void testProcessPomFromPomFileWithParent5() { } @Test - public void testProcessPomFromPomFileWithParent6() { + void processPomFromPomFileWithParent6() { mojo.setPomFile(Paths.get("foo.bar")); setMojoModel(mojo, "group", "artifact", "version", "packaging", null); mojo.initProperties(); @@ -85,7 +85,7 @@ public void testProcessPomFromPomFileWithParent6() { } @Test - public void testProcessPomFromPomFileWithOverrides() { + void processPomFromPomFileWithOverrides() { mojo.setPomFile(Paths.get("foo.bar")); setMojoModel(mojo, "group", "artifact", "version", "packaging", null); mojo.setGroupId("groupO"); diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoPomPackagingTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoPomPackagingTest.java index c82e994..284894b 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoPomPackagingTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoPomPackagingTest.java @@ -59,7 +59,7 @@ @MojoTest @ExtendWith(MockitoExtension.class) -public class DeployMojoPomPackagingTest { +class DeployMojoPomPackagingTest { private static final String LOCAL_REPO = "/target/local-repo"; @@ -82,7 +82,7 @@ public class DeployMojoPomPackagingTest { @Test @InjectMojo(goal = "deploy") @MojoParameter(name = "deployAtEnd", value = "false") - public void testBasicDeployWithPackagingAsPom(DeployMojo mojo) throws Exception { + void basicDeployWithPackagingAsPom(DeployMojo mojo) throws Exception { assertNotNull(mojo); ArtifactDeployerRequest request = execute(mojo); diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java index 4f6809f..c3afbd5 100644 --- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java @@ -70,7 +70,7 @@ */ @MojoTest @ExtendWith(MockitoExtension.class) -public class DeployMojoTest { +class DeployMojoTest { private static final String LOCAL_REPO = "target/local-repo"; @@ -92,14 +92,14 @@ public class DeployMojoTest { @Test @InjectMojo(goal = "deploy") - public void testDeployTestEnvironment(DeployMojo mojo) { + void deployTestEnvironment(DeployMojo mojo) { assertNotNull(mojo); } @Test @InjectMojo(goal = "deploy") @MojoParameter(name = "deployAtEnd", value = "false") - public void testBasicDeploy(DeployMojo mojo) throws Exception { + void basicDeploy(DeployMojo mojo) throws Exception { assertNotNull(mojo); Project project = (Project) getVariableValueFromObject(mojo, "project"); artifactManager.setPath( @@ -123,7 +123,7 @@ public void testBasicDeploy(DeployMojo mojo) throws Exception { @Test @InjectMojo(goal = "deploy") @MojoParameter(name = "deployAtEnd", value = "false") - public void testSkippingDeploy(DeployMojo mojo) throws Exception { + void skippingDeploy(DeployMojo mojo) throws Exception { assertNotNull(mojo); File file = new File(getBasedir(), "target/test-classes/unit/maven-deploy-test-1.0-SNAPSHOT.jar"); @@ -142,7 +142,7 @@ public void testSkippingDeploy(DeployMojo mojo) throws Exception { @Test @InjectMojo(goal = "deploy") @MojoParameter(name = "deployAtEnd", value = "false") - public void testDeployIfArtifactFileIsNull(DeployMojo mojo) throws Exception { + void deployIfArtifactFileIsNull(DeployMojo mojo) throws Exception { assertNotNull(mojo); Project project = (Project) getVariableValueFromObject(mojo, "project"); @@ -154,7 +154,7 @@ public void testDeployIfArtifactFileIsNull(DeployMojo mojo) throws Exception { @Test @InjectMojo(goal = "deploy") @MojoParameter(name = "deployAtEnd", value = "false") - public void testDeployWithAttachedArtifacts(DeployMojo mojo) throws Exception { + void deployWithAttachedArtifacts(DeployMojo mojo) throws Exception { assertNotNull(mojo); Project project = (Project) getVariableValueFromObject(mojo, "project"); projectManager.attachArtifact( @@ -182,7 +182,7 @@ public void testDeployWithAttachedArtifacts(DeployMojo mojo) throws Exception { @Test @InjectMojo(goal = "deploy") - public void testLegacyAltDeploymentRepositoryWithDefaultLayout(DeployMojo mojo) throws IllegalAccessException { + void legacyAltDeploymentRepositoryWithDefaultLayout(DeployMojo mojo) throws Exception { setVariableValueToObject(mojo, "altDeploymentRepository", "altDeploymentRepository::default::http://localhost"); RemoteRepository repository = mojo.getDeploymentRepository(true); @@ -192,7 +192,7 @@ public void testLegacyAltDeploymentRepositoryWithDefaultLayout(DeployMojo mojo) @Test @InjectMojo(goal = "deploy") - public void testLegacyAltDeploymentRepositoryWithLegacyLayout(DeployMojo mojo) throws IllegalAccessException { + void legacyAltDeploymentRepositoryWithLegacyLayout(DeployMojo mojo) throws Exception { setVariableValueToObject(mojo, "altDeploymentRepository", "altDeploymentRepository::legacy::http://localhost"); MojoException e = assertThrows( @@ -207,7 +207,7 @@ public void testLegacyAltDeploymentRepositoryWithLegacyLayout(DeployMojo mojo) t @Test @InjectMojo(goal = "deploy") - public void testInsaneAltDeploymentRepository(DeployMojo mojo) throws IllegalAccessException { + void insaneAltDeploymentRepository(DeployMojo mojo) throws Exception { setVariableValueToObject( mojo, "altDeploymentRepository", "altDeploymentRepository::hey::wow::foo::http://localhost"); @@ -223,7 +223,7 @@ public void testInsaneAltDeploymentRepository(DeployMojo mojo) throws IllegalAcc @Test @InjectMojo(goal = "deploy") - public void testDefaultScmSvnAltDeploymentRepository(DeployMojo mojo) throws IllegalAccessException { + void defaultScmSvnAltDeploymentRepository(DeployMojo mojo) throws Exception { setVariableValueToObject( mojo, "altDeploymentRepository", "altDeploymentRepository::default::scm:svn:http://localhost"); @@ -234,7 +234,7 @@ public void testDefaultScmSvnAltDeploymentRepository(DeployMojo mojo) throws Ill @Test @InjectMojo(goal = "deploy") - public void testLegacyScmSvnAltDeploymentRepository(DeployMojo mojo) throws IllegalAccessException { + void legacyScmSvnAltDeploymentRepository(DeployMojo mojo) throws Exception { setVariableValueToObject( mojo, "altDeploymentRepository", "altDeploymentRepository::legacy::scm:svn:http://localhost"); @@ -250,7 +250,7 @@ public void testLegacyScmSvnAltDeploymentRepository(DeployMojo mojo) throws Ille @Test @InjectMojo(goal = "deploy") - public void testAltSnapshotDeploymentRepository(DeployMojo mojo) throws IllegalAccessException { + void altSnapshotDeploymentRepository(DeployMojo mojo) throws Exception { setVariableValueToObject(mojo, "altDeploymentRepository", "altReleaseDeploymentRepository::http://localhost"); RemoteRepository repository = mojo.getDeploymentRepository(true); @@ -260,7 +260,7 @@ public void testAltSnapshotDeploymentRepository(DeployMojo mojo) throws IllegalA @Test @InjectMojo(goal = "deploy") - public void testAltReleaseDeploymentRepository(DeployMojo mojo) throws IllegalAccessException { + void altReleaseDeploymentRepository(DeployMojo mojo) throws Exception { setVariableValueToObject(mojo, "altDeploymentRepository", "altReleaseDeploymentRepository::http://localhost"); RemoteRepository repository = mojo.getDeploymentRepository(false);