diff --git a/pom.xml b/pom.xml
index c6ba755e..8c1b3a16 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
org.apache.maven.plugins
maven-plugins
- 42
+ 44
@@ -125,6 +125,7 @@ under the License.
org.apache.maven.plugin-tools
maven-plugin-annotations
+ ${version.maven-plugin-tools}
provided
diff --git a/src/main/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiver.java b/src/main/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiver.java
index f4ea3038..9a39f997 100644
--- a/src/main/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiver.java
+++ b/src/main/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiver.java
@@ -24,8 +24,6 @@
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import java.util.List;
@@ -59,13 +57,12 @@
import org.codehaus.plexus.archiver.tar.TarLongFileMode;
import org.codehaus.plexus.archiver.war.WarArchiver;
import org.codehaus.plexus.archiver.zip.AbstractZipArchiver;
+import org.codehaus.plexus.component.configurator.BasicComponentConfigurator;
import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
-import org.codehaus.plexus.component.configurator.ComponentConfigurator;
import org.codehaus.plexus.component.configurator.ConfigurationListener;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.components.io.fileselectors.FileSelector;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
@@ -98,16 +95,20 @@ public class DefaultAssemblyArchiver implements AssemblyArchiver {
private final PlexusContainer container;
+ private final BasicComponentConfigurator configurator;
+
@Inject
public DefaultAssemblyArchiver(
ArchiverManager archiverManager,
List assemblyPhases,
Map containerDescriptorHandlers,
- PlexusContainer container) {
+ PlexusContainer container,
+ BasicComponentConfigurator configurator) {
this.archiverManager = requireNonNull(archiverManager);
this.assemblyPhases = requireNonNull(assemblyPhases);
this.containerDescriptorHandlers = requireNonNull(containerDescriptorHandlers);
this.container = requireNonNull(container);
+ this.configurator = requireNonNull(configurator);
}
private List sortedPhases() {
@@ -398,7 +399,6 @@ private void configureArchiver(final Archiver archiver, final AssemblerConfigura
private void configureComponent(
final Object component, final Xpp3Dom config, final AssemblerConfigurationSource configSource)
throws ComponentLookupException, ComponentConfigurationException {
- final ComponentConfigurator configurator = container.lookup(ComponentConfigurator.class, "basic");
final ConfigurationListener listener = new DebugConfigurationListener(LOGGER);
@@ -406,45 +406,7 @@ private void configureComponent(
final XmlPlexusConfiguration configuration = new XmlPlexusConfiguration(config);
- final Object[] containerRealm = getContainerRealm();
-
- /*
- * NOTE: The signature of configureComponent() has changed in Maven 3.x, the reflection prevents a linkage error
- * and makes the code work with both Maven 2 and 3.
- */
- try {
- final Method configureComponent = ComponentConfigurator.class.getMethod(
- "configureComponent",
- Object.class,
- PlexusConfiguration.class,
- ExpressionEvaluator.class,
- (Class>) containerRealm[1],
- ConfigurationListener.class);
-
- configureComponent.invoke(
- configurator, component, configuration, expressionEvaluator, containerRealm[0], listener);
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (final InvocationTargetException e) {
- if (e.getCause() instanceof ComponentConfigurationException) {
- throw (ComponentConfigurationException) e.getCause();
- }
- throw new RuntimeException(e.getCause());
- }
- }
-
- private Object[] getContainerRealm() {
- /*
- * NOTE: The return type of getContainerRealm() has changed in Maven 3.x, the reflection prevents a linkage
- * error and makes the code work with both Maven 2 and 3.
- */
- try {
- final Method getContainerRealm = container.getClass().getMethod("getContainerRealm");
- return new Object[] {getContainerRealm.invoke(container), getContainerRealm.getReturnType()};
- } catch (final NoSuchMethodException | IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (final InvocationTargetException e) {
- throw new RuntimeException(e.getCause());
- }
+ configurator.configureComponent(
+ component, configuration, expressionEvaluator, container.getContainerRealm(), listener);
}
}
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiverTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiverTest.java
index 730469cc..e893a1d0 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiverTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/DefaultAssemblyArchiverTest.java
@@ -44,6 +44,7 @@
import org.codehaus.plexus.archiver.tar.TarLongFileMode;
import org.codehaus.plexus.archiver.war.WarArchiver;
import org.codehaus.plexus.archiver.zip.ZipArchiver;
+import org.codehaus.plexus.component.configurator.BasicComponentConfigurator;
import org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator;
import org.junit.Before;
import org.junit.Rule;
@@ -74,6 +75,8 @@ public class DefaultAssemblyArchiverTest {
private PlexusContainer container;
+ private BasicComponentConfigurator configurator;
+
public static void setupInterpolators(AssemblerConfigurationSource configSource) {
when(configSource.getRepositoryInterpolator()).thenReturn(FixedStringSearchInterpolator.create());
when(configSource.getCommandLinePropsInterpolator()).thenReturn(FixedStringSearchInterpolator.create());
@@ -91,6 +94,7 @@ public static void setupInterpolators(AssemblerConfigurationSource configSource,
public void setup() throws PlexusContainerException {
this.archiverManager = mock(ArchiverManager.class);
this.container = new DefaultPlexusContainer();
+ this.configurator = new BasicComponentConfigurator();
}
@Test(expected = InvalidAssemblerConfigurationException.class)
@@ -156,7 +160,7 @@ public void testCreateArchive() throws Exception {
}
@Test
- public void testCreateArchiver_ShouldConfigureArchiver() throws Exception {
+ public void testCreateArchiverShouldConfigureArchiver() throws Exception {
final TestArchiverWithConfig archiver = new TestArchiverWithConfig();
when(archiverManager.getArchiver("dummy")).thenReturn(archiver);
@@ -192,7 +196,7 @@ public void testCreateArchiver_ShouldConfigureArchiver() throws Exception {
}
@Test
- public void testCreateArchiver_ShouldCreateTarArchiverWithNoCompression() throws Exception {
+ public void testCreateArchiverShouldCreateTarArchiverWithNoCompression() throws Exception {
final TestTarArchiver ttArchiver = new TestTarArchiver();
when(archiverManager.getArchiver("tar")).thenReturn(ttArchiver);
@@ -229,7 +233,7 @@ public void testCreateArchiver_ShouldCreateTarArchiverWithNoCompression() throws
}
@Test
- public void testCreateArchiver_ShouldCreateWarArchiverWitEexpectWebXmlSetToFalse() throws Exception {
+ public void testCreateArchiverShouldCreateWarArchiverWitExpectWebXmlSetToFalse() throws Exception {
final TestWarArchiver twArchiver = new TestWarArchiver();
when(archiverManager.getArchiver("war")).thenReturn(twArchiver);
@@ -269,7 +273,7 @@ public void testCreateArchiver_ShouldCreateWarArchiverWitEexpectWebXmlSetToFalse
}
@Test
- public void testCreateArchiver_ShouldCreateZipArchiver() throws Exception {
+ public void testCreateArchiverShouldCreateZipArchiver() throws Exception {
final ZipArchiver archiver = new ZipArchiver();
when(archiverManager.getArchiver("zip")).thenReturn(archiver);
@@ -302,7 +306,7 @@ public void testCreateArchiver_ShouldCreateZipArchiver() throws Exception {
}
@Test
- public void testCreateTarArchiver_ShouldNotInitializeCompression() throws Exception {
+ public void testCreateTarArchiverShouldNotInitializeCompression() throws Exception {
final TestTarArchiver archiver = new TestTarArchiver();
when(archiverManager.getArchiver("tar")).thenReturn(archiver);
@@ -324,7 +328,7 @@ public void testCreateTarArchiver_ShouldNotInitializeCompression() throws Except
}
@Test
- public void testCreateTarArchiver_InvalidFormat_ShouldFailWithInvalidCompression() throws Exception {
+ public void testCreateTarArchiverInvalidFormatShouldFailWithInvalidCompression() throws Exception {
when(archiverManager.getArchiver("tar.ZZZ")).thenThrow(new NoSuchArchiverException("no archiver"));
@@ -343,7 +347,7 @@ public void testCreateTarArchiver_InvalidFormat_ShouldFailWithInvalidCompression
}
private DefaultAssemblyArchiver createSubject(final List phases) {
- return new DefaultAssemblyArchiver(archiverManager, phases, Collections.emptyMap(), container);
+ return new DefaultAssemblyArchiver(archiverManager, phases, Collections.emptyMap(), container, configurator);
}
private static final class TestTarArchiver extends TarArchiver {
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiverTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiverTest.java
index 6545a5f9..a89fec67 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiverTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/archiver/AssemblyProxyArchiverTest.java
@@ -57,7 +57,7 @@ public class AssemblyProxyArchiverTest {
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Test(timeout = 5000)
- public void addFileSet_SkipWhenSourceIsAssemblyWorkDir() throws IOException, ArchiverException {
+ public void addFileSetSkipWhenSourceIsAssemblyWorkDir() throws IOException, ArchiverException {
final File sources = temporaryFolder.getRoot();
final File workdir = new File(sources, "workdir");
@@ -76,7 +76,7 @@ public void addFileSet_SkipWhenSourceIsAssemblyWorkDir() throws IOException, Arc
}
@Test(timeout = 5000)
- public void addFileSet_addExcludeWhenSourceContainsAssemblyWorkDir() throws IOException, ArchiverException {
+ public void addFileSetAddExcludeWhenSourceContainsAssemblyWorkDir() throws IOException, ArchiverException {
final File sources = temporaryFolder.getRoot();
final File workdir = new File(sources, "workdir");
@@ -110,7 +110,7 @@ public void addFileSet_addExcludeWhenSourceContainsAssemblyWorkDir() throws IOEx
}
@Test
- public void addFile_NoPerms_CallAcceptFilesOnlyOnce() throws IOException, ArchiverException {
+ public void addFileNoPermsCallAcceptFilesOnlyOnce() throws IOException, ArchiverException {
final Archiver delegate = mock(Archiver.class);
final CounterSelector counter = new CounterSelector(true);
@@ -131,7 +131,7 @@ public void addFile_NoPerms_CallAcceptFilesOnlyOnce() throws IOException, Archiv
@Test
@SuppressWarnings("deprecation")
- public void addDirectory_NoPerms_CallAcceptFilesOnlyOnce() throws IOException, ArchiverException {
+ public void addDirectoryNoPermsCallAcceptFilesOnlyOnce() throws IOException, ArchiverException {
final Archiver delegate = new JarArchiver();
final File output = temporaryFolder.newFile();
@@ -190,11 +190,11 @@ private static final class CounterSelector implements FileSelector {
private boolean answer = false;
- public CounterSelector(final boolean answer) {
+ CounterSelector(final boolean answer) {
this.answer = answer;
}
- public int getCount() {
+ int getCount() {
return count;
}
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/DependencySetAssemblyPhaseTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/DependencySetAssemblyPhaseTest.java
index 825e5008..f6b50d1d 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/DependencySetAssemblyPhaseTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/DependencySetAssemblyPhaseTest.java
@@ -59,7 +59,7 @@ public void setUp() {
}
@Test
- public void testExecute_ShouldAddOneDependencyFromProject()
+ public void testExecuteShouldAddOneDependencyFromProject()
throws AssemblyFormattingException, ArchiveCreationException, IOException,
InvalidAssemblerConfigurationException, DependencyResolutionException {
final String outputLocation = "/out";
@@ -95,7 +95,7 @@ public void testExecute_ShouldAddOneDependencyFromProject()
}
@Test
- public void testExecute_ShouldNotAddDependenciesWhenProjectHasNone() throws Exception {
+ public void testExecuteShouldNotAddDependenciesWhenProjectHasNone() throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("test");
assembly.setIncludeBaseDirectory(false);
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/FileItemAssemblyPhaseTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/FileItemAssemblyPhaseTest.java
index a7d1c52d..cfaa9f09 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/FileItemAssemblyPhaseTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/FileItemAssemblyPhaseTest.java
@@ -54,7 +54,7 @@ public class FileItemAssemblyPhaseTest {
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Test
- public void testExecute_ShouldAddNothingWhenNoFileItemsArePresent() throws Exception {
+ public void testExecuteShouldAddNothingWhenNoFileItemsArePresent() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
@@ -70,7 +70,7 @@ public void testExecute_ShouldAddNothingWhenNoFileItemsArePresent() throws Excep
}
@Test
- public void testExecute_ShouldAddAbsoluteFileNoFilterNoLineEndingConversion() throws Exception {
+ public void testExecuteShouldAddAbsoluteFileNoFilterNoLineEndingConversion() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
@@ -104,7 +104,7 @@ public void testExecute_ShouldAddAbsoluteFileNoFilterNoLineEndingConversion() th
}
@Test
- public void testExecute_ShouldAddRelativeFileNoFilterNoLineEndingConversion() throws Exception {
+ public void testExecuteShouldAddRelativeFileNoFilterNoLineEndingConversion() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
@@ -138,7 +138,7 @@ public void testExecute_ShouldAddRelativeFileNoFilterNoLineEndingConversion() th
}
@Test
- public void testExecute_WithOutputDirectory() throws Exception {
+ public void testExecuteWithOutputDirectory() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
@@ -217,7 +217,7 @@ public void testExecute_WithOutputDirectory() throws Exception {
}
@Test
- public void testExecute_WithOutputDirectoryAndDestName() throws Exception {
+ public void testExecuteWithOutputDirectoryAndDestName() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
@@ -299,7 +299,7 @@ public void testExecute_WithOutputDirectoryAndDestName() throws Exception {
}
@Test
- public void testExecute_WithOutputDirectoryAndDestNameAndIncludeBaseDirectoryFalse() throws Exception {
+ public void testExecuteWithOutputDirectoryAndDestNameAndIncludeBaseDirectoryFalse() throws Exception {
final AssemblerConfigurationSource macCS = mock(AssemblerConfigurationSource.class);
final File basedir = temporaryFolder.getRoot();
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java
index ef2e9da4..01087952 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java
@@ -56,7 +56,16 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.mockito.Mockito.*;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.lenient;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class ModuleSetAssemblyPhaseTest {
@@ -78,7 +87,7 @@ public void setUp() {
}
@Test
- public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchOutputDir() {
+ public void testIsDeprecatedModuleSourcesConfigPresentShouldCatchOutputDir() {
final ModuleSources sources = new ModuleSources();
sources.setOutputDirectory("outdir");
@@ -86,7 +95,7 @@ public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchOutputDir() {
}
@Test
- public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchInclude() {
+ public void testIsDeprecatedModuleSourcesConfigPresentShouldCatchInclude() {
final ModuleSources sources = new ModuleSources();
sources.addInclude("**/included.txt");
@@ -94,7 +103,7 @@ public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchInclude() {
}
@Test
- public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchExclude() {
+ public void testIsDeprecatedModuleSourcesConfigPresentShouldCatchExclude() {
final ModuleSources sources = new ModuleSources();
sources.addExclude("**/excluded.txt");
@@ -102,7 +111,7 @@ public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchExclude() {
}
@Test
- public void testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchFileMode() {
+ public void testIsDeprecatedModuleSourcesConfigPresentShouldNotCatchFileMode() {
final ModuleSources sources = new ModuleSources();
sources.setFileMode("777");
@@ -110,7 +119,7 @@ public void testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchFileMode()
}
@Test
- public void testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchDirMode() {
+ public void testIsDeprecatedModuleSourcesConfigPresentShouldNotCatchDirMode() {
final ModuleSources sources = new ModuleSources();
sources.setDirectoryMode("777");
@@ -118,7 +127,7 @@ public void testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchDirMode() {
}
@Test
- public void testCreateFileSet_ShouldUseModuleDirOnlyWhenOutDirIsNull() throws Exception {
+ public void testCreateFileSetShouldUseModuleDirOnlyWhenOutDirIsNull() throws Exception {
final Model model = new Model();
model.setArtifactId("artifact");
@@ -157,7 +166,7 @@ public void testCreateFileSet_ShouldUseModuleDirOnlyWhenOutDirIsNull() throws Ex
}
@Test
- public void testCreateFileSet_ShouldPrependModuleDirWhenOutDirIsProvided() throws Exception {
+ public void testCreateFileSetShouldPrependModuleDirWhenOutDirIsProvided() throws Exception {
final Model model = new Model();
model.setArtifactId("artifact");
@@ -197,7 +206,7 @@ public void testCreateFileSet_ShouldPrependModuleDirWhenOutDirIsProvided() throw
}
@Test
- public void testCreateFileSet_ShouldAddExcludesForSubModulesWhenExcludeSubModDirsIsTrue() throws Exception {
+ public void testCreateFileSetShouldAddExcludesForSubModulesWhenExcludeSubModDirsIsTrue() throws Exception {
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
final FileSet fs = new FileSet();
@@ -234,7 +243,7 @@ public void testCreateFileSet_ShouldAddExcludesForSubModulesWhenExcludeSubModDir
}
@Test
- public void testExecute_ShouldSkipIfNoModuleSetsFound() throws Exception {
+ public void testExecuteShouldSkipIfNoModuleSetsFound() throws Exception {
final Assembly assembly = new Assembly();
assembly.setIncludeBaseDirectory(false);
@@ -242,7 +251,7 @@ public void testExecute_ShouldSkipIfNoModuleSetsFound() throws Exception {
}
@Test
- public void testExecute_ShouldAddOneModuleSetWithOneModuleInIt() throws Exception {
+ public void testExecuteShouldAddOneModuleSetWithOneModuleInIt() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final MavenProject module = createProject("group", "module", "version", project);
@@ -302,12 +311,12 @@ public void testExecute_ShouldAddOneModuleSetWithOneModuleInIt() throws Exceptio
}
@Test
- public void testAddModuleBinaries_ShouldReturnImmediatelyWhenBinariesIsNull() throws Exception {
+ public void testAddModuleBinariesShouldReturnImmediatelyWhenBinariesIsNull() throws Exception {
this.phase.addModuleBinaries(null, null, null, null, null, null);
}
@Test
- public void testAddModuleBinaries_ShouldFilterPomModule() throws Exception {
+ public void testAddModuleBinariesShouldFilterPomModule() throws Exception {
final ModuleBinaries binaries = new ModuleBinaries();
binaries.setUnpack(false);
@@ -327,7 +336,7 @@ public void testAddModuleBinaries_ShouldFilterPomModule() throws Exception {
}
@Test
- public void testAddModuleBinaries_ShouldAddOneModuleAttachmentArtifactAndNoDeps() throws Exception {
+ public void testAddModuleBinariesShouldAddOneModuleAttachmentArtifactAndNoDeps() throws Exception {
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getFinalName()).thenReturn("final-name");
@@ -378,7 +387,7 @@ public void testAddModuleBinaries_ShouldAddOneModuleAttachmentArtifactAndNoDeps(
}
@Test
- public void testAddModuleBinaries_ShouldFailWhenOneModuleDoesntHaveAttachmentWithMatchingClassifier()
+ public void testAddModuleBinariesShouldFailWhenOneModuleDoesntHaveAttachmentWithMatchingClassifier()
throws Exception {
Artifact artifact = mock(Artifact.class);
@@ -410,7 +419,7 @@ public void testAddModuleBinaries_ShouldFailWhenOneModuleDoesntHaveAttachmentWit
}
@Test
- public void testAddModuleBinaries_ShouldAddOneModuleArtifactAndNoDeps() throws Exception {
+ public void testAddModuleBinariesShouldAddOneModuleArtifactAndNoDeps() throws Exception {
Artifact artifact = mock(Artifact.class);
final File artifactFile = temporaryFolder.newFile();
when(artifact.getGroupId()).thenReturn("GROUPID");
@@ -461,7 +470,7 @@ public void testAddModuleBinaries_ShouldAddOneModuleArtifactAndNoDeps() throws E
}
@Test
- public void testAddModuleArtifact_ShouldThrowExceptionWhenArtifactFileIsNull() throws Exception {
+ public void testAddModuleArtifactShouldThrowExceptionWhenArtifactFileIsNull() throws Exception {
Artifact artifact = mock(Artifact.class);
try {
this.phase.addModuleArtifact(artifact, null, null, null, null);
@@ -473,7 +482,7 @@ public void testAddModuleArtifact_ShouldThrowExceptionWhenArtifactFileIsNull() t
}
@Test
- public void testAddModuleArtifact_ShouldAddOneArtifact() throws Exception {
+ public void testAddModuleArtifactShouldAddOneArtifact() throws Exception {
Artifact artifact = mock(Artifact.class);
when(artifact.getGroupId()).thenReturn("GROUPID");
final File artifactFile = temporaryFolder.newFile();
@@ -513,12 +522,12 @@ public void testAddModuleArtifact_ShouldAddOneArtifact() throws Exception {
}
@Test
- public void testAddModuleSourceFileSets_ShouldReturnImmediatelyIfSourcesIsNull() throws Exception {
+ public void testAddModuleSourceFileSetsShouldReturnImmediatelyIfSourcesIsNull() throws Exception {
this.phase.addModuleSourceFileSets(null, null, null, null);
}
@Test
- public void testAddModuleSourceFileSets_ShouldAddOneSourceDirectory() throws Exception {
+ public void testAddModuleSourceFileSetsShouldAddOneSourceDirectory() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
@@ -558,7 +567,7 @@ public void testAddModuleSourceFileSets_ShouldAddOneSourceDirectory() throws Exc
}
@Test
- public void testGetModuleProjects_ShouldReturnNothingWhenReactorContainsOnlyCurrentProject() throws Exception {
+ public void testGetModuleProjectsShouldReturnNothingWhenReactorContainsOnlyCurrentProject() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final List projects = Collections.singletonList(project);
@@ -581,7 +590,7 @@ public void testGetModuleProjects_ShouldReturnNothingWhenReactorContainsOnlyCurr
}
@Test
- public void testGetModuleProjects_ShouldReturnNothingWhenReactorContainsTwoSiblingProjects() throws Exception {
+ public void testGetModuleProjectsShouldReturnNothingWhenReactorContainsTwoSiblingProjects() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final MavenProject project2 = createProject("group", "artifact2", "version", null);
@@ -607,7 +616,7 @@ public void testGetModuleProjects_ShouldReturnNothingWhenReactorContainsTwoSibli
}
@Test
- public void testGetModuleProjects_ShouldReturnModuleOfCurrentProject() throws Exception {
+ public void testGetModuleProjectsShouldReturnModuleOfCurrentProject() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final MavenProject project2 = createProject("group", "artifact2", "version", project);
@@ -637,7 +646,7 @@ public void testGetModuleProjects_ShouldReturnModuleOfCurrentProject() throws Ex
}
@Test
- public void testGetModuleProjects_ShouldReturnDescendentModulesOfCurrentProject() throws Exception {
+ public void testGetModuleProjectsShouldReturnDescendentModulesOfCurrentProject() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
final MavenProject project2 = createProject("group", "artifact2", "version", project);
final MavenProject project3 = createProject("group", "artifact3", "version", project2);
@@ -671,7 +680,7 @@ public void testGetModuleProjects_ShouldReturnDescendentModulesOfCurrentProject(
}
@Test
- public void testGetModuleProjects_ShouldExcludeModuleAndDescendentsTransitively() throws Exception {
+ public void testGetModuleProjectsShouldExcludeModuleAndDescendentsTransitively() throws Exception {
final MavenProject project = createProject("group", "artifact", "version", null);
Artifact artifact1 = mock(Artifact.class);
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.java
index 463449f3..fd75678c 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDependencySetsTaskTest.java
@@ -73,7 +73,7 @@ public class AddDependencySetsTaskTest {
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Test
- public void testAddDependencySet_ShouldInterpolateDefaultOutputFileNameMapping() throws Exception {
+ public void testAddDependencySetShouldInterpolateDefaultOutputFileNameMapping() throws Exception {
final String outDir = "tmp/";
final String mainAid = "main";
final String mainGid = "org.maingrp";
@@ -167,7 +167,7 @@ public void testAddDependencySet_ShouldInterpolateDefaultOutputFileNameMapping()
}
@Test
- public void testAddDependencySet_ShouldNotAddDependenciesWhenProjectHasNone() throws Exception {
+ public void testAddDependencySetShouldNotAddDependenciesWhenProjectHasNone() throws Exception {
final MavenProject project = new MavenProject(new Model());
final DependencySet ds = new DependencySet();
@@ -181,7 +181,7 @@ public void testAddDependencySet_ShouldNotAddDependenciesWhenProjectHasNone() th
// TODO: Find a better way of testing the project-stubbing behavior when a ProjectBuildingException takes place.
@Test
- public void testAddDependencySet_ShouldNotAddDependenciesWhenProjectIsStubbed() throws Exception {
+ public void testAddDependencySetShouldNotAddDependenciesWhenProjectIsStubbed() throws Exception {
final MavenProject project = new MavenProject(new Model());
final ProjectBuildingException pbe = new ProjectBuildingException("test", "Test error.", new Throwable());
@@ -249,12 +249,12 @@ public void testAddDependencySet_ShouldNotAddDependenciesWhenProjectIsStubbed()
}
@Test
- public void testAddDependencySet_ShouldAddOneDependencyFromProjectWithoutUnpacking() throws Exception {
+ public void testAddDependencySetShouldAddOneDependencyFromProjectWithoutUnpacking() throws Exception {
verifyOneDependencyAdded("out", false);
}
@Test
- public void testAddDependencySet_ShouldAddOneDependencyFromProjectUnpacked() throws Exception {
+ public void testAddDependencySetShouldAddOneDependencyFromProjectUnpacked() throws Exception {
verifyOneDependencyAdded("out", true);
}
@@ -338,7 +338,7 @@ private void verifyOneDependencyAdded(final String outputLocation, final boolean
}
@Test
- public void testGetDependencyArtifacts_ShouldGetOneDependencyArtifact() throws Exception {
+ public void testGetDependencyArtifactsShouldGetOneDependencyArtifact() throws Exception {
final MavenProject project = new MavenProject(new Model());
Artifact artifact = mock(Artifact.class);
@@ -357,7 +357,7 @@ public void testGetDependencyArtifacts_ShouldGetOneDependencyArtifact() throws E
}
@Test
- public void testGetDependencyArtifacts_ShouldFilterOneDependencyArtifactViaInclude() throws Exception {
+ public void testGetDependencyArtifactsShouldFilterOneDependencyArtifactViaInclude() throws Exception {
final MavenProject project = new MavenProject(new Model());
final Set artifacts = new HashSet<>();
@@ -388,7 +388,7 @@ public void testGetDependencyArtifacts_ShouldFilterOneDependencyArtifactViaInclu
}
@Test
- public void testGetDependencyArtifacts_ShouldIgnoreTransitivePathFilteringWhenIncludeNotTransitive()
+ public void testGetDependencyArtifactsShouldIgnoreTransitivePathFilteringWhenIncludeNotTransitive()
throws Exception {
final MavenProject project = new MavenProject(new Model());
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDirectoryTaskTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDirectoryTaskTest.java
index bf3f853c..af0de22b 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDirectoryTaskTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddDirectoryTaskTest.java
@@ -48,7 +48,7 @@ public void setUp() {
}
@Test
- public void testAddDirectory_ShouldNotAddDirectoryIfNonExistent() throws Exception {
+ public void testAddDirectoryShouldNotAddDirectoryIfNonExistent() throws Exception {
final int defaultDirMode = -1;
final int defaultFileMode = -1;
@@ -65,7 +65,7 @@ public void testAddDirectory_ShouldNotAddDirectoryIfNonExistent() throws Excepti
}
@Test
- public void testAddDirectory_ShouldAddDirectory() throws Exception {
+ public void testAddDirectoryShouldAddDirectory() throws Exception {
final int defaultDirMode = -1;
final int defaultFileMode = -1;
@@ -84,7 +84,7 @@ public void testAddDirectory_ShouldAddDirectory() throws Exception {
}
@Test
- public void testAddDirectory_ShouldAddDirectoryWithDirMode() throws Exception {
+ public void testAddDirectoryShouldAddDirectoryWithDirMode() throws Exception {
final int dirMode = Integer.parseInt("777", 8);
final int fileMode = Integer.parseInt("777", 8);
final int defaultDirMode = -1;
@@ -111,7 +111,7 @@ public void testAddDirectory_ShouldAddDirectoryWithDirMode() throws Exception {
}
@Test
- public void testAddDirectory_ShouldAddDirectoryWithIncludesAndExcludes() throws Exception {
+ public void testAddDirectoryShouldAddDirectoryWithIncludesAndExcludes() throws Exception {
when(archiver.getOverrideDirectoryMode()).thenReturn(-1);
when(archiver.getOverrideFileMode()).thenReturn(-1);
diff --git a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddFileSetsTaskTest.java b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddFileSetsTaskTest.java
index 671ecb45..185b01fe 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddFileSetsTaskTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/archive/task/AddFileSetsTaskTest.java
@@ -49,7 +49,7 @@ public class AddFileSetsTaskTest {
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Test
- public void testGetFileSetDirectory_ShouldReturnAbsoluteSourceDir() throws Exception {
+ public void testGetFileSetDirectoryShouldReturnAbsoluteSourceDir() throws Exception {
final File dir = temporaryFolder.newFolder();
final FileSet fs = new FileSet();
@@ -62,7 +62,7 @@ public void testGetFileSetDirectory_ShouldReturnAbsoluteSourceDir() throws Excep
}
@Test
- public void testGetFileSetDirectory_ShouldReturnBasedir() throws Exception {
+ public void testGetFileSetDirectoryShouldReturnBasedir() throws Exception {
final File dir = temporaryFolder.newFolder();
final FileSet fs = new FileSet();
@@ -73,7 +73,7 @@ public void testGetFileSetDirectory_ShouldReturnBasedir() throws Exception {
}
@Test
- public void testGetFileSetDirectory_ShouldReturnDirFromBasedirAndSourceDir() throws Exception {
+ public void testGetFileSetDirectoryShouldReturnDirFromBasedirAndSourceDir() throws Exception {
final File dir = temporaryFolder.newFolder();
final String srcPath = "source";
@@ -90,7 +90,7 @@ public void testGetFileSetDirectory_ShouldReturnDirFromBasedirAndSourceDir() thr
}
@Test
- public void testGetFileSetDirectory_ShouldReturnDirFromArchiveBasedirAndSourceDir() throws Exception {
+ public void testGetFileSetDirectoryShouldReturnDirFromArchiveBasedirAndSourceDir() throws Exception {
final File dir = temporaryFolder.newFolder();
final String srcPath = "source";
@@ -107,7 +107,7 @@ public void testGetFileSetDirectory_ShouldReturnDirFromArchiveBasedirAndSourceDi
}
@Test
- public void testAddFileSet_ShouldAddDirectory() throws Exception {
+ public void testAddFileSetShouldAddDirectory() throws Exception {
File basedir = temporaryFolder.getRoot();
final FileSet fs = new FileSet();
@@ -143,7 +143,7 @@ public void testAddFileSet_ShouldAddDirectory() throws Exception {
}
@Test
- public void testAddFileSet_ShouldAddDirectoryUsingSourceDirNameForDestDir() throws Exception {
+ public void testAddFileSetShouldAddDirectoryUsingSourceDirNameForDestDir() throws Exception {
final FileSet fs = new FileSet();
final String dirname = "dir";
fs.setDirectory(dirname);
@@ -180,7 +180,7 @@ public void testAddFileSet_ShouldAddDirectoryUsingSourceDirNameForDestDir() thro
}
@Test
- public void testAddFileSet_ShouldNotAddDirectoryWhenSourceDirNonExistent() throws Exception {
+ public void testAddFileSetShouldNotAddDirectoryWhenSourceDirNonExistent() throws Exception {
final FileSet fs = new FileSet();
fs.setDirectory("dir");
@@ -212,7 +212,7 @@ public void testAddFileSet_ShouldNotAddDirectoryWhenSourceDirNonExistent() throw
}
@Test
- public void testExecute_ShouldThrowExceptionIfArchiveBasedirProvidedIsNonExistent() throws Exception {
+ public void testExecuteShouldThrowExceptionIfArchiveBasedirProvidedIsNonExistent() throws Exception {
File archiveBaseDir = new File(temporaryFolder.getRoot(), "archive");
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getArchiveBaseDirectory()).thenReturn(archiveBaseDir);
@@ -232,7 +232,7 @@ public void testExecute_ShouldThrowExceptionIfArchiveBasedirProvidedIsNonExisten
}
@Test
- public void testExecute_ShouldThrowExceptionIfArchiveBasedirProvidedIsNotADirectory() throws Exception {
+ public void testExecuteShouldThrowExceptionIfArchiveBasedirProvidedIsNotADirectory() throws Exception {
File archiveBaseDir = temporaryFolder.newFile();
final AssemblerConfigurationSource configSource = mock(AssemblerConfigurationSource.class);
when(configSource.getArchiveBaseDirectory()).thenReturn(archiveBaseDir);
diff --git a/src/test/java/org/apache/maven/plugins/assembly/artifact/DefaultDependencyResolverTest.java b/src/test/java/org/apache/maven/plugins/assembly/artifact/DefaultDependencyResolverTest.java
index 362becf8..364dc7b8 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/artifact/DefaultDependencyResolverTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/artifact/DefaultDependencyResolverTest.java
@@ -72,7 +72,7 @@ public class DefaultDependencyResolverTest {
private DefaultDependencyResolver resolver;
@Test
- public void test_getDependencySetResolutionRequirements_transitive() throws Exception {
+ public void testGetDependencySetResolutionRequirementsTransitive() throws Exception {
final DependencySet ds = new DependencySet();
ds.setScope(Artifact.SCOPE_SYSTEM);
ds.setUseTransitiveDependencies(true);
@@ -108,7 +108,7 @@ public void test_getDependencySetResolutionRequirements_transitive() throws Exce
}
@Test
- public void test_getDependencySetResolutionRequirements_nonTransitive() throws DependencyResolutionException {
+ public void testGetDependencySetResolutionRequirementsNonTransitive() throws DependencyResolutionException {
final DependencySet ds = new DependencySet();
ds.setScope(Artifact.SCOPE_SYSTEM);
ds.setUseTransitiveDependencies(false);
@@ -128,7 +128,7 @@ public void test_getDependencySetResolutionRequirements_nonTransitive() throws D
}
@Test
- public void test_getModuleSetResolutionRequirements_withoutBinaries() throws DependencyResolutionException {
+ public void testGetModuleSetResolutionRequirementsWithoutBinaries() throws DependencyResolutionException {
final File rootDir = new File("root");
final MavenProject project = createMavenProject("main-group", "main-artifact", "1", rootDir);
final MavenProject module1 = createMavenProject("main-group", "module-1", "1", new File(rootDir, "module-1"));
@@ -147,7 +147,7 @@ public void test_getModuleSetResolutionRequirements_withoutBinaries() throws Dep
}
@Test
- public void test_getModuleSetResolutionRequirements_includeDeps() throws Exception {
+ public void testGetModuleSetResolutionRequirementsIncludeDeps() throws Exception {
final File rootDir = new File("root");
final MavenProject project = createMavenProject("main-group", "main-artifact", "1", rootDir);
final MavenProject module1 = createMavenProject("main-group", "module-1", "1", new File(rootDir, "module-1"));
diff --git a/src/test/java/org/apache/maven/plugins/assembly/filter/ComponentsXmlArchiverFileFilterTest.java b/src/test/java/org/apache/maven/plugins/assembly/filter/ComponentsXmlArchiverFileFilterTest.java
index 0e1743e6..2fb7c82a 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/filter/ComponentsXmlArchiverFileFilterTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/filter/ComponentsXmlArchiverFileFilterTest.java
@@ -75,7 +75,7 @@ public void setUp() {
}
@Test
- public void testAddComponentsXml_ShouldAddComponentWithoutRoleHint() throws Exception {
+ public void testAddComponentsXmlShouldAddComponentWithoutRoleHint() throws Exception {
final Reader reader =
writeComponentsXml(Collections.singletonList(new ComponentDef("role", null, "org.apache.maven.Impl")));
@@ -92,7 +92,7 @@ public void testAddComponentsXml_ShouldAddComponentWithoutRoleHint() throws Exce
}
@Test
- public void testAddComponentsXml_ShouldAddComponentWithRoleHint() throws Exception {
+ public void testAddComponentsXmlShouldAddComponentWithRoleHint() throws Exception {
final Reader reader = writeComponentsXml(
Collections.singletonList(new ComponentDef("role", "hint", "org.apache.maven.Impl")));
@@ -109,7 +109,7 @@ public void testAddComponentsXml_ShouldAddComponentWithRoleHint() throws Excepti
}
@Test
- public void testAddComponentsXml_ShouldAddTwoComponentsWithRoleHints() throws Exception {
+ public void testAddComponentsXmlShouldAddTwoComponentsWithRoleHints() throws Exception {
final List defs = new ArrayList<>();
defs.add(new ComponentDef("role", "hint", "org.apache.maven.Impl"));
@@ -138,7 +138,7 @@ public void testAddComponentsXml_ShouldAddTwoComponentsWithRoleHints() throws Ex
}
@Test
- public void testAddToArchive_ShouldWriteComponentWithoutHintToFile() throws Exception {
+ public void testAddToArchiveShouldWriteComponentWithoutHintToFile() throws Exception {
final Xpp3Dom dom = createComponentDom(new ComponentDef("role", null, "impl"));
filter.components = new LinkedHashMap<>();
@@ -166,7 +166,7 @@ public void testAddToArchive_ShouldWriteComponentWithoutHintToFile() throws Exce
}
@Test
- public void testAddToArchive_ShouldWriteComponentWithHintToFile() throws Exception {
+ public void testAddToArchiveShouldWriteComponentWithHintToFile() throws Exception {
final Xpp3Dom dom = createComponentDom(new ComponentDef("role", "hint", "impl"));
filter.components = new LinkedHashMap<>();
@@ -194,7 +194,7 @@ public void testAddToArchive_ShouldWriteComponentWithHintToFile() throws Excepti
}
@Test
- public void testAddToArchive_ShouldWriteTwoComponentToFile() throws Exception {
+ public void testAddToArchiveShouldWriteTwoComponentToFile() throws Exception {
filter.components = new LinkedHashMap<>();
final Xpp3Dom dom = createComponentDom(new ComponentDef("role", "hint", "impl"));
@@ -237,7 +237,7 @@ public void testAddToArchive_ShouldWriteTwoComponentToFile() throws Exception {
}
@Test
- public void testAddToArchive_ShouldWriteTwoComponentToArchivedFile() throws Exception {
+ public void testAddToArchiveShouldWriteTwoComponentToArchivedFile() throws Exception {
filter.components = new LinkedHashMap<>();
final Xpp3Dom dom = createComponentDom(new ComponentDef("role", "hint", "impl"));
diff --git a/src/test/java/org/apache/maven/plugins/assembly/format/ReaderFormatterTest.java b/src/test/java/org/apache/maven/plugins/assembly/format/ReaderFormatterTest.java
index 4c58bcd7..c1d45971 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/format/ReaderFormatterTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/format/ReaderFormatterTest.java
@@ -62,7 +62,7 @@ public void lineDosFeed() throws IOException, AssemblyFormattingException {
}
@Test
- public void lineDosFeed_withoutFiltering() throws IOException, AssemblyFormattingException {
+ public void lineDosFeedWithoutFiltering() throws IOException, AssemblyFormattingException {
final PojoConfigSource cfg = getPojoConfigSource();
InputStreamTransformer fileSetTransformers =
ReaderFormatter.getFileSetTransformers(cfg, false, Collections.emptySet(), "dos");
diff --git a/src/test/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReaderTest.java b/src/test/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReaderTest.java
index 5f7ea5c9..0b898fe7 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReaderTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReaderTest.java
@@ -82,7 +82,7 @@ public static StringReader writeToStringReader(Assembly assembly) throws IOExcep
}
@Test
- public void testIncludeSiteInAssembly_ShouldFailIfSiteDirectoryNonExistent() throws Exception {
+ public void testIncludeSiteInAssemblyShouldFailIfSiteDirectoryNonExistent() throws Exception {
final File siteDir = Files.createTempFile("assembly-reader.", ".test").toFile();
siteDir.delete();
@@ -100,7 +100,7 @@ public void testIncludeSiteInAssembly_ShouldFailIfSiteDirectoryNonExistent() thr
}
@Test
- public void testIncludeSiteInAssembly_ShouldAddSiteDirFileSetWhenDirExists() throws Exception {
+ public void testIncludeSiteInAssemblyShouldAddSiteDirFileSetWhenDirExists() throws Exception {
final File siteDir = temporaryFolder.getRoot();
when(configSource.getSiteDirectory()).thenReturn(siteDir);
@@ -120,7 +120,7 @@ public void testIncludeSiteInAssembly_ShouldAddSiteDirFileSetWhenDirExists() thr
}
@Test
- public void testMergeComponentWithAssembly_ShouldAddOneFileSetToExistingListOfTwo() {
+ public void testMergeComponentWithAssemblyShouldAddOneFileSetToExistingListOfTwo() {
final Assembly assembly = new Assembly();
FileSet fs = new FileSet();
@@ -157,7 +157,7 @@ public void testMergeComponentWithAssembly_ShouldAddOneFileSetToExistingListOfTw
}
@Test
- public void testMergeComponentWithAssembly_ShouldAddOneFileItemToExistingListOfTwo() {
+ public void testMergeComponentWithAssemblyShouldAddOneFileItemToExistingListOfTwo() {
final Assembly assembly = new Assembly();
FileItem fi = new FileItem();
@@ -195,7 +195,7 @@ public void testMergeComponentWithAssembly_ShouldAddOneFileItemToExistingListOfT
}
@Test
- public void testMergeComponentWithAssembly_ShouldAddOneDependencySetToExistingListOfTwo() {
+ public void testMergeComponentWithAssemblyShouldAddOneDependencySetToExistingListOfTwo() {
final Assembly assembly = new Assembly();
DependencySet ds = new DependencySet();
@@ -228,7 +228,7 @@ public void testMergeComponentWithAssembly_ShouldAddOneDependencySetToExistingLi
}
@Test
- public void testMergeComponentWithAssembly_ShouldAddOneContainerDescriptorHandlerToExistingListOfTwo() {
+ public void testMergeComponentWithAssemblyShouldAddOneContainerDescriptorHandlerToExistingListOfTwo() {
final Assembly assembly = new Assembly();
ContainerDescriptorHandlerConfig cfg = new ContainerDescriptorHandlerConfig();
@@ -262,7 +262,7 @@ public void testMergeComponentWithAssembly_ShouldAddOneContainerDescriptorHandle
}
@Test
- public void testMergeComponentsWithMainAssembly_ShouldAddOneFileSetToAssembly() throws Exception {
+ public void testMergeComponentsWithMainAssemblyShouldAddOneFileSetToAssembly() throws Exception {
final Component component = new Component();
final FileSet fileSet = new FileSet();
@@ -308,7 +308,7 @@ public void testMergeComponentsWithMainAssembly_ShouldAddOneFileSetToAssembly()
}
@Test
- public void testReadAssembly_ShouldReadAssemblyWithoutComponentsInterpolationOrSiteDirInclusion() throws Exception {
+ public void testReadAssemblyShouldReadAssemblyWithoutComponentsInterpolationOrSiteDirInclusion() throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("test");
@@ -318,7 +318,7 @@ public void testReadAssembly_ShouldReadAssemblyWithoutComponentsInterpolationOrS
}
@Test
- public void testReadAssembly_ShouldReadAssemblyWithSiteDirInclusionFromAssemblyWithoutComponentsOrInterpolation()
+ public void testReadAssemblyShouldReadAssemblyWithSiteDirInclusionFromAssemblyWithoutComponentsOrInterpolation()
throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("test");
@@ -358,7 +358,7 @@ public void testReadAssembly_ShouldReadAssemblyWithSiteDirInclusionFromAssemblyW
}
@Test
- public void testReadAssembly_ShouldReadAssemblyWithComponentWithoutSiteDirInclusionOrInterpolation()
+ public void testReadAssemblyShouldReadAssemblyWithComponentWithoutSiteDirInclusionOrInterpolation()
throws Exception {
final File componentsFile = temporaryFolder.newFile();
@@ -409,7 +409,7 @@ public void testReadAssembly_ShouldReadAssemblyWithComponentWithoutSiteDirInclus
@Test
public void
- testReadAssembly_ShouldReadAssemblyWithComponentInterpolationWithoutSiteDirInclusionOrAssemblyInterpolation()
+ testReadAssemblyShouldReadAssemblyWithComponentInterpolationWithoutSiteDirInclusionOrAssemblyInterpolation()
throws Exception {
final File componentsFile = temporaryFolder.newFile();
@@ -460,7 +460,7 @@ public void testReadAssembly_ShouldReadAssemblyWithComponentWithoutSiteDirInclus
}
@Test
- public void testReadAssembly_ShouldReadAssemblyWithInterpolationWithoutComponentsOrSiteDirInclusion()
+ public void testReadAssemblyShouldReadAssemblyWithInterpolationWithoutComponentsOrSiteDirInclusion()
throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("${groupId}-assembly");
@@ -493,7 +493,7 @@ private Assembly doReadAssembly(Assembly assembly)
}
@Test
- public void testGetAssemblyFromDescriptorFile_ShouldReadAssembly() throws Exception {
+ public void testGetAssemblyFromDescriptorFileShouldReadAssembly() throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("test");
@@ -523,7 +523,7 @@ public void testGetAssemblyFromDescriptorFile_ShouldReadAssembly() throws Except
}
@Test
- public void testGetAssemblyForDescriptorReference_ShouldReadBinaryAssemblyRef() throws Exception {
+ public void testGetAssemblyForDescriptorReferenceShouldReadBinaryAssemblyRef() throws Exception {
final File basedir = temporaryFolder.getRoot();
when(configSource.getBasedir()).thenReturn(basedir);
@@ -538,7 +538,7 @@ public void testGetAssemblyForDescriptorReference_ShouldReadBinaryAssemblyRef()
}
@Test
- public void testReadAssemblies_ShouldGetAssemblyDescriptorFromSingleFile() throws Exception {
+ public void testReadAssembliesShouldGetAssemblyDescriptorFromSingleFile() throws Exception {
final Assembly assembly = new Assembly();
assembly.setId("test");
@@ -564,7 +564,7 @@ public void testReadAssemblies_ShouldGetAssemblyDescriptorFromSingleFile() throw
}
@Test
- public void testReadAssemblies_ShouldFailWhenSingleDescriptorFileMissing() throws Exception {
+ public void testReadAssembliesShouldFailWhenSingleDescriptorFileMissing() throws Exception {
final File basedir = temporaryFolder.getRoot();
try {
@@ -577,7 +577,7 @@ public void testReadAssemblies_ShouldFailWhenSingleDescriptorFileMissing() throw
}
@Test
- public void testReadAssemblies_ShouldIgnoreMissingSingleDescriptorFileWhenIgnoreIsConfigured() throws Exception {
+ public void testReadAssembliesShouldIgnoreMissingSingleDescriptorFileWhenIgnoreIsConfigured() throws Exception {
final File basedir = temporaryFolder.getRoot();
try {
@@ -589,7 +589,7 @@ public void testReadAssemblies_ShouldIgnoreMissingSingleDescriptorFileWhenIgnore
}
@Test
- public void testReadAssemblies_ShouldGetAssemblyDescriptorFromFileArray() throws Exception {
+ public void testReadAssembliesShouldGetAssemblyDescriptorFromFileArray() throws Exception {
final Assembly assembly1 = new Assembly();
assembly1.setId("test");
@@ -619,7 +619,7 @@ public void testReadAssemblies_ShouldGetAssemblyDescriptorFromFileArray() throws
}
@Test
- public void testReadAssemblies_ShouldGetAssemblyDescriptorFromMultipleRefs() throws Exception {
+ public void testReadAssembliesShouldGetAssemblyDescriptorFromMultipleRefs() throws Exception {
final File basedir = temporaryFolder.getRoot();
final List assemblies = performReadAssemblies(basedir, null, new String[] {"bin", "src"}, null);
@@ -637,7 +637,7 @@ public void testReadAssemblies_ShouldGetAssemblyDescriptorFromMultipleRefs() thr
}
@Test
- public void testReadAssemblies_ShouldGetAssemblyDescriptorFromDirectory() throws Exception {
+ public void testReadAssembliesShouldGetAssemblyDescriptorFromDirectory() throws Exception {
final Assembly assembly1 = new Assembly();
assembly1.setId("test");
@@ -667,7 +667,7 @@ public void testReadAssemblies_ShouldGetAssemblyDescriptorFromDirectory() throws
}
@Test
- public void testReadAssemblies_ShouldGetTwoAssemblyDescriptorsFromDirectoryWithThreeFiles() throws Exception {
+ public void testReadAssembliesShouldGetTwoAssemblyDescriptorsFromDirectoryWithThreeFiles() throws Exception {
final Assembly assembly1 = new Assembly();
assembly1.setId("test");
diff --git a/src/test/java/org/apache/maven/plugins/assembly/utils/AssemblyFormatUtilsTest.java b/src/test/java/org/apache/maven/plugins/assembly/utils/AssemblyFormatUtilsTest.java
index befc1bbb..a4cc6c64 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/utils/AssemblyFormatUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/utils/AssemblyFormatUtilsTest.java
@@ -46,197 +46,196 @@
@RunWith(MockitoJUnitRunner.class)
public class AssemblyFormatUtilsTest {
@Test
- public void testFixRelativePathRefs_ShouldRemoveRelativeRefToCurrentDir() {
+ public void testFixRelativePathRefsShouldRemoveRelativeRefToCurrentDir() {
assertEquals("path/", AssemblyFormatUtils.fixRelativeRefs("./path/"));
}
@Test
- public void testFixRelativePathRefs_ShouldRemoveEmbeddedSameDirRef() {
+ public void testFixRelativePathRefsShouldRemoveEmbeddedSameDirRef() {
assertEquals("some/path/", AssemblyFormatUtils.fixRelativeRefs("some/./path/"));
assertEquals("some\\path\\", AssemblyFormatUtils.fixRelativeRefs("some\\.\\path\\"));
}
@Test
- public void testFixRelativePathRefs_ShouldRemoveEmbeddedParentDirRef() {
+ public void testFixRelativePathRefsShouldRemoveEmbeddedParentDirRef() {
assertEquals("path/", AssemblyFormatUtils.fixRelativeRefs("some/../path/"));
}
@Test
- public void testFixRelativePathRefs_ShouldTruncateRelativeRefToParentDir() {
+ public void testFixRelativePathRefsShouldTruncateRelativeRefToParentDir() {
assertEquals("path/", AssemblyFormatUtils.fixRelativeRefs("../path/"));
}
@Test
- public void testGetDistroName_ShouldUseJustFinalNameWithNoAppendAssemblyIdOrClassifier() {
+ public void testGetDistroNameShouldUseJustFinalNameWithNoAppendAssemblyIdOrClassifier() {
verifyDistroName("assembly", "finalName", false, "finalName");
}
@Test
- public void testGetDistroName_ShouldUseFinalNamePlusAssemblyIdIsNull() {
+ public void testGetDistroNameShouldUseFinalNamePlusAssemblyIdIsNull() {
verifyDistroName("assembly", "finalName", true, "finalName-assembly");
}
@Test
- public void testGetOutputDir_ShouldResolveGroupIdInOutDir_UseArtifactInfo() throws Exception {
+ public void testGetOutputDirShouldResolveGroupIdInOutDirUseArtifactInfo() throws Exception {
verifyOutputDirUsingArtifactProject("${artifact.groupId}", null, "group", null, null, null, null, "group/");
}
@Test
- public void testGetOutputDir_ShouldResolveArtifactIdInOutDir_UseArtifactInfo() throws Exception {
+ public void testGetOutputDirShouldResolveArtifactIdInOutDirUseArtifactInfo() throws Exception {
verifyOutputDirUsingArtifactProject(
"${artifact.artifactId}", null, null, "artifact", null, null, null, "artifact/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInOutDir_UseArtifactInfo() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInOutDirUseArtifactInfo() throws Exception {
verifyOutputDirUsingArtifactProject("${artifact.version}", null, null, null, "version", null, null, "version/");
}
@Test
- public void testGetOutputDir_ShouldResolveBuildFinalNameInOutDir_UseArtifactInfo() throws Exception {
+ public void testGetOutputDirShouldResolveBuildFinalNameInOutDirUseArtifactInfo() throws Exception {
verifyOutputDirUsingArtifactProject(
"${artifact.build.finalName}", null, null, null, null, "finalName", null, "finalName/");
}
@Test
- public void testGetOutputDir_ShouldResolveGroupIdInOutDir_UseModuleInfo() throws Exception {
+ public void testGetOutputDirShouldResolveGroupIdInOutDirUseModuleInfo() throws Exception {
verifyOutputDirUsingModuleProject("${module.groupId}", null, "group", null, null, null, null, "group/");
}
@Test
- public void testGetOutputDir_ShouldResolveArtifactIdInOutDir_UseModuleInfo() throws Exception {
+ public void testGetOutputDirShouldResolveArtifactIdInOutDirUseModuleInfo() throws Exception {
verifyOutputDirUsingModuleProject(
"${module.artifactId}", null, null, "artifact", null, null, null, "artifact/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInOutDir_UseModuleInfo() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInOutDirUseModuleInfo() throws Exception {
verifyOutputDirUsingModuleProject("${module.version}", null, null, null, "version", null, null, "version/");
}
@Test
- public void testGetOutputDir_ShouldResolveBuildFinalNameInOutDir_UseModuleInfo() throws Exception {
+ public void testGetOutputDirShouldResolveBuildFinalNameInOutDirUseModuleInfo() throws Exception {
verifyOutputDirUsingModuleProject(
"${module.build.finalName}", null, null, null, null, "finalName", null, "finalName/");
}
@Test
- public void testGetOutputDir_ShouldResolveGroupIdInOutDir_UseExplicitMainProject() throws Exception {
+ public void testGetOutputDirShouldResolveGroupIdInOutDirUseExplicitMainProject() throws Exception {
verifyOutputDirUsingMainProject("${pom.groupId}", null, "group", null, null, null, null, "group/");
}
@Test
- public void testGetOutputDir_ShouldResolveArtifactIdInOutDir_UseExplicitMainProject() throws Exception {
+ public void testGetOutputDirShouldResolveArtifactIdInOutDirUseExplicitMainProject() throws Exception {
verifyOutputDirUsingMainProject("${pom.artifactId}", null, null, "artifact", null, null, null, "artifact/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInOutDir_UseExplicitMainProject() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInOutDirUseExplicitMainProject() throws Exception {
verifyOutputDirUsingMainProject("${pom.version}", null, null, null, "version", null, null, "version/");
}
@Test
- public void testGetOutputDir_ShouldResolveBuildFinalNameInOutDir_UseExplicitMainProject() throws Exception {
+ public void testGetOutputDirShouldResolveBuildFinalNameInOutDirUseExplicitMainProject() throws Exception {
verifyOutputDirUsingMainProject(
"${pom.build.finalName}", null, null, null, null, "finalName", null, "finalName/");
}
@Test
- public void testGetOutputDir_ShouldResolveGroupIdInOutDir_UseExplicitMainProject_projectRef() throws Exception {
+ public void testGetOutputDirShouldResolveGroupIdInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyOutputDirUsingMainProject("${project.groupId}", null, "group", null, null, null, null, "group/");
}
@Test
- public void testGetOutputDir_ShouldResolveArtifactIdInOutDir_UseExplicitMainProject_projectRef() throws Exception {
+ public void testGetOutputDirShouldResolveArtifactIdInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyOutputDirUsingMainProject("${project.artifactId}", null, null, "artifact", null, null, null, "artifact/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInOutDir_UseExplicitMainProject_projectRef() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyOutputDirUsingMainProject("${project.version}", null, null, null, "version", null, null, "version/");
}
@Test
- public void testGetOutputDir_ShouldResolveBuildFinalNameInOutDir_UseExplicitMainProject_projectRef()
- throws Exception {
+ public void testGetOutputDirShouldResolveBuildFinalNameInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyOutputDir("${project.build.finalName}", null, "finalName", "finalName/");
}
@Test
- public void testGetOutputDir_ShouldNotAlterOutDirWhenIncludeBaseFalseAndNoExpressions() throws Exception {
+ public void testGetOutputDirShouldNotAlterOutDirWhenIncludeBaseFalseAndNoExpressions() throws Exception {
verifyOutputDir("dir/", "finalName", null, "dir/");
}
@Test
- public void testGetOutputDir_ShouldNotAlterOutDirWhenIncludeBaseFalseAndNoExpressions_CheckWithBackslash()
+ public void testGetOutputDirShouldNotAlterOutDirWhenIncludeBaseFalseAndNoExpressionsCheckWithBackslash()
throws Exception {
verifyOutputDir("dir\\", "finalName", null, "dir\\");
}
@Test
- public void testGetOutputDir_ShouldAppendSlashToOutDirWhenMissingAndIncludeBaseFalseAndNoExpressions()
+ public void testGetOutputDirShouldAppendSlashToOutDirWhenMissingAndIncludeBaseFalseAndNoExpressions()
throws Exception {
verifyOutputDir("dir", "finalName", null, "dir/");
}
@Test
- public void testGetOutputDir_ShouldResolveGroupIdInOutDir() throws Exception {
+ public void testGetOutputDirShouldResolveGroupIdInOutDir() throws Exception {
verifyOutputDirUsingMainProject("${groupId}", "finalName", "group", null, null, null, null, "group/");
}
@Test
- public void testGetOutputDir_ShouldResolveArtifactIdInOutDir() throws Exception {
+ public void testGetOutputDirShouldResolveArtifactIdInOutDir() throws Exception {
verifyOutputDirUsingMainProject("${artifactId}", "finalName", null, "artifact", null, null, null, "artifact/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInOutDir() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInOutDir() throws Exception {
verifyOutputDirUsingMainProject("${version}", "finalName", null, null, "version", null, null, "version/");
}
@Test
- public void testGetOutputDir_ShouldResolveVersionInLargerOutDirExpr() throws Exception {
+ public void testGetOutputDirShouldResolveVersionInLargerOutDirExpr() throws Exception {
verifyOutputDirUsingMainProject(
"my-special-${version}", "finalName", null, null, "99", null, null, "my-special-99/");
}
@Test
- public void testGetOutputDir_ShouldResolveFinalNameInOutDir() throws Exception {
+ public void testGetOutputDirShouldResolveFinalNameInOutDir() throws Exception {
verifyOutputDir("${finalName}", "finalName", null, "finalName/");
}
@Test
- public void testGetOutputDir_ShouldResolveBuildFinalNameInOutDir() throws Exception {
+ public void testGetOutputDirShouldResolveBuildFinalNameInOutDir() throws Exception {
verifyOutputDir("${build.finalName}", "finalName", null, "finalName/");
}
@Test
- public void testGetOutputDir_ShouldReturnEmptyPathWhenAllInputIsEmptyAndIncludeBaseFalse() throws Exception {
+ public void testGetOutputDirShouldReturnEmptyPathWhenAllInputIsEmptyAndIncludeBaseFalse() throws Exception {
verifyOutputDir(null, null, null, "");
}
@Test
- public void testGetOutputDir_ShouldRemoveRelativeRefToCurrentDir() throws Exception {
+ public void testGetOutputDirShouldRemoveRelativeRefToCurrentDir() throws Exception {
verifyOutputDir("./path/", null, null, "path/");
}
@Test
- public void testGetOutputDir_ShouldRemoveEmbeddedSameDirRef() throws Exception {
+ public void testGetOutputDirShouldRemoveEmbeddedSameDirRef() throws Exception {
verifyOutputDir("some/./path/", null, null, "some/path/");
}
@Test
- public void testGetOutputDir_ShouldRemoveEmbeddedParentDirRef() throws Exception {
+ public void testGetOutputDirShouldRemoveEmbeddedParentDirRef() throws Exception {
verifyOutputDir("some/../path/", null, null, "path/");
}
@Test
- public void testGetOutputDir_ShouldTruncateRelativeRefToParentDir() throws Exception {
+ public void testGetOutputDirShouldTruncateRelativeRefToParentDir() throws Exception {
verifyOutputDir("../path/", null, null, "path/");
}
@Test
- public void testGetOutputDir_ShouldResolveProjectProperty() throws Exception {
+ public void testGetOutputDirShouldResolveProjectProperty() throws Exception {
final Properties props = new Properties();
props.setProperty("myProperty", "value");
@@ -244,7 +243,7 @@ public void testGetOutputDir_ShouldResolveProjectProperty() throws Exception {
}
@Test
- public void testGetOutputDir_ShouldResolveProjectPropertyAltExpr() throws Exception {
+ public void testGetOutputDirShouldResolveProjectPropertyAltExpr() throws Exception {
final Properties props = new Properties();
props.setProperty("myProperty", "value");
@@ -254,7 +253,7 @@ public void testGetOutputDir_ShouldResolveProjectPropertyAltExpr() throws Except
@Test
public void
- testEvalFileNameMapping_ShouldResolveArtifactIdAndBaseVersionInOutDir_UseArtifactInfo_WithValidMainProject() {
+ testEvalFileNameMappingShouldResolveArtifactIdAndBaseVersionInOutDirUseArtifactInfoWithValidMainProject() {
final MavenProject mainProject = createProject("group", "main", "1", null);
final String artifactVersion = "2-20070807.112233-1";
@@ -289,146 +288,144 @@ public void testGetOutputDir_ShouldResolveProjectPropertyAltExpr() throws Except
}
@Test
- public void testEvalFileNameMapping_ShouldResolveGroupIdInOutDir_UseArtifactInfo() {
+ public void testEvalFileNameMappingShouldResolveGroupIdInOutDirUseArtifactInfo() {
verifyEvalFileNameMappingUsingArtifactProject(
"${artifact.groupId}", null, "group", null, null, null, "group", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveArtifactIdInOutDir_UseArtifactInfo() {
+ public void testEvalFileNameMappingShouldResolveArtifactIdInOutDirUseArtifactInfo() {
verifyEvalFileNameMappingUsingArtifactProject(
"${artifact.artifactId}", null, null, "artifact", null, null, "artifact", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveVersionInOutDir_UseArtifactInfo() {
+ public void testEvalFileNameMappingShouldResolveVersionInOutDirUseArtifactInfo() {
verifyEvalFileNameMappingUsingArtifactProject(
"${artifact.version}", null, null, null, "version", null, "version", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveGroupIdInOutDir_UseArtifactInfoAndModulePrefix() {
+ public void testEvalFileNameMappingShouldResolveGroupIdInOutDirUseArtifactInfoAndModulePrefix() {
verifyEvalFileNameMappingUsingModuleProject(
"${module.groupId}", null, "group", null, null, null, "group", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveArtifactIdInOutDir_UseArtifactInfoAndModulePrefix() {
+ public void testEvalFileNameMappingShouldResolveArtifactIdInOutDirUseArtifactInfoAndModulePrefix() {
verifyEvalFileNameMappingUsingModuleProject(
"${module.artifactId}", null, null, "artifact", null, null, "artifact", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveVersionInOutDir_UseArtifactInfoAndModulePrefix() {
+ public void testEvalFileNameMappingShouldResolveVersionInOutDirUseArtifactInfoAndModulePrefix() {
verifyEvalFileNameMappingUsingModuleProject(
"${module.version}", null, null, null, "version", null, "version", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveGroupIdInOutDir_UseExplicitMainProject() throws Exception {
+ public void testEvalFileNameMappingShouldResolveGroupIdInOutDirUseExplicitMainProject() throws Exception {
verifyEvalFileNameMappingUsingMainProject("${pom.groupId}", null, "group", null, null, null, "group", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveArtifactIdInOutDir_UseExplicitMainProject() throws Exception {
+ public void testEvalFileNameMappingShouldResolveArtifactIdInOutDirUseExplicitMainProject() throws Exception {
verifyEvalFileNameMappingUsingMainProject(
"${pom.artifactId}", null, null, "artifact", null, null, "artifact", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveVersionInOutDir_UseExplicitMainProject() throws Exception {
+ public void testEvalFileNameMappingShouldResolveVersionInOutDirUseExplicitMainProject() throws Exception {
verifyEvalFileNameMappingUsingMainProject("${pom.version}", null, null, null, "version", null, "version", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveGroupIdInOutDir_UseExplicitMainProject_projectRef()
- throws Exception {
+ public void testEvalFileNameMappingShouldResolveGroupIdInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyEvalFileNameMappingUsingMainProject("${project.groupId}", null, "group", null, null, null, "group", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveArtifactIdInOutDir_UseExplicitMainProject_projectRef()
+ public void testEvalFileNameMappingShouldResolveArtifactIdInOutDirUseExplicitMainProjectProjectRef()
throws Exception {
verifyEvalFileNameMappingUsingMainProject(
"${project.artifactId}", null, null, "artifact", null, null, "artifact", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveVersionInOutDir_UseExplicitMainProject_projectRef()
- throws Exception {
+ public void testEvalFileNameMappingShouldResolveVersionInOutDirUseExplicitMainProjectProjectRef() throws Exception {
verifyEvalFileNameMappingUsingMainProject(
"${project.version}", null, null, null, "version", null, "version", null);
}
@Test
- public void testEvalFileNameMapping_ShouldRemoveRelativeRefToCurrentDir() throws Exception {
+ public void testEvalFileNameMappingShouldRemoveRelativeRefToCurrentDir() throws Exception {
verifyEvalFileNameMappingUsingMainProject("./path/", null, null, null, null, null, "path/", null);
}
@Test
- public void testEvalFileNameMapping_ShouldRemoveEmbeddedSameDirRef() throws Exception {
+ public void testEvalFileNameMappingShouldRemoveEmbeddedSameDirRef() throws Exception {
verifyEvalFileNameMappingUsingMainProject("some/./path/", null, null, null, null, null, "some/path/", null);
}
@Test
- public void testEvalFileNameMapping_ShouldRemoveEmbeddedParentDirRef() throws Exception {
+ public void testEvalFileNameMappingShouldRemoveEmbeddedParentDirRef() throws Exception {
verifyEvalFileNameMappingUsingMainProject("some/../path/", null, null, null, null, null, "path/", null);
}
@Test
- public void testEvalFileNameMapping_ShouldTruncateRelativeRefToParentDir() throws Exception {
+ public void testEvalFileNameMappingShouldTruncateRelativeRefToParentDir() throws Exception {
verifyEvalFileNameMappingUsingMainProject("../path/", null, null, null, null, null, "path/", null);
}
@Test
- public void testEvalFileNameMapping_ShouldPassExpressionThroughUnchanged() throws Exception {
+ public void testEvalFileNameMappingShouldPassExpressionThroughUnchanged() throws Exception {
verifyEvalFileNameMapping("filename", null, null, "filename", null);
}
@Test
- public void testEvalFileNameMapping_ShouldInsertClassifierAheadOfExtension() throws Exception {
+ public void testEvalFileNameMappingShouldInsertClassifierAheadOfExtension() throws Exception {
verifyEvalFileNameMapping(
"filename-${artifact.classifier}.ext", "classifier", null, "filename-classifier.ext", null);
}
@Test
- public void testEvalFileNameMapping_ShouldAppendDashClassifierWhenClassifierPresent() throws Exception {
+ public void testEvalFileNameMappingShouldAppendDashClassifierWhenClassifierPresent() throws Exception {
verifyEvalFileNameMapping("filename${dashClassifier?}", "classifier", null, "filename-classifier", null);
}
@Test
- public void testEvalFileNameMapping_ShouldNotAppendDashClassifierWhenClassifierMissing() throws Exception {
+ public void testEvalFileNameMappingShouldNotAppendDashClassifierWhenClassifierMissing() throws Exception {
verifyEvalFileNameMapping("filename${dashClassifier?}", null, null, "filename", null);
}
@Test
- public void testEvalFileNameMapping_ShouldNotAppendDashClassifierWhenClassifierEmpty() throws Exception {
+ public void testEvalFileNameMappingShouldNotAppendDashClassifierWhenClassifierEmpty() throws Exception {
verifyEvalFileNameMapping("filename${dashClassifier?}", "", null, "filename", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveGroupId() throws Exception {
+ public void testEvalFileNameMappingShouldResolveGroupId() throws Exception {
verifyEvalFileNameMappingUsingMainProject("${groupId}", null, "group", null, null, null, "group", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveArtifactId() throws Exception {
+ public void testEvalFileNameMappingShouldResolveArtifactId() throws Exception {
verifyEvalFileNameMappingUsingMainProject(
"${artifactId}", null, null, "artifact", null, null, "artifact", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveVersion() throws Exception {
+ public void testEvalFileNameMappingShouldResolveVersion() throws Exception {
verifyEvalFileNameMappingUsingMainProject("${version}", null, null, null, "version", null, "version", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveExtension() throws Exception {
+ public void testEvalFileNameMappingShouldResolveExtension() throws Exception {
verifyEvalFileNameMapping("file.${artifact.extension}", null, "ext", "file.ext", null);
}
@Test
- public void testEvalFileNameMapping_ShouldResolveProjectProperty() throws Exception {
+ public void testEvalFileNameMappingShouldResolveProjectProperty() throws Exception {
final Properties props = new Properties();
props.setProperty("myProperty", "value");
@@ -436,7 +433,7 @@ public void testEvalFileNameMapping_ShouldResolveProjectProperty() throws Except
}
@Test
- public void testEvalFileNameMapping_ShouldResolveProjectPropertyAltExpr() throws Exception {
+ public void testEvalFileNameMappingShouldResolveProjectPropertyAltExpr() throws Exception {
final Properties props = new Properties();
props.setProperty("myProperty", "value");
@@ -444,7 +441,7 @@ public void testEvalFileNameMapping_ShouldResolveProjectPropertyAltExpr() throws
}
@Test
- public void testEvalFileNameMapping_ShouldResolveSystemPropertyWithoutMainProjectPresent() throws Exception {
+ public void testEvalFileNameMappingShouldResolveSystemPropertyWithoutMainProjectPresent() throws Exception {
verifyEvalFileNameMapping(
"file.${java.version}", null, null, "file." + System.getProperty("java.version"), null);
}
@@ -460,6 +457,7 @@ private void verifyEvalFileNameMapping(
expression, classifier, null, null, null, extension, checkValue, projectProperties);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyEvalFileNameMappingUsingMainProject(
final String expression,
final String classifier,
@@ -470,7 +468,6 @@ private void verifyEvalFileNameMappingUsingMainProject(
final String checkValue,
final Properties projectProperties) {
final MavenProject mainProject = createProject(groupId, artifactId, version, projectProperties);
-
final MavenProject artifactProject = createProject("unknown", "unknown", "unknown", null);
final MavenProject moduleProject = createProject("unknown", "unknown", "unknown", null);
@@ -478,6 +475,7 @@ private void verifyEvalFileNameMappingUsingMainProject(
expression, classifier, extension, mainProject, moduleProject, artifactProject, checkValue);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyEvalFileNameMappingUsingArtifactProject(
final String expression,
final String classifier,
@@ -496,6 +494,7 @@ private void verifyEvalFileNameMappingUsingArtifactProject(
expression, classifier, extension, mainProject, moduleProject, artifactProject, checkValue);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyEvalFileNameMappingUsingModuleProject(
final String expression,
final String classifier,
@@ -587,6 +586,7 @@ private void verifyOutputDir(
verifyOutputDirUsingMainProject(outDir, finalName, null, null, null, projectFinalName, null, checkValue);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyOutputDirUsingMainProject(
final String outDir,
final String finalName,
@@ -612,6 +612,7 @@ private void verifyOutputDirUsingMainProject(
verifyOutputDir(outDir, finalName, project, moduleProject, artifactProject, checkValue);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyOutputDirUsingModuleProject(
final String outDir,
final String finalName,
@@ -637,6 +638,7 @@ private void verifyOutputDirUsingModuleProject(
verifyOutputDir(outDir, finalName, mainProject, project, artifactProject, checkValue);
}
+ @SuppressWarnings("checkstyle:parameternumber")
private void verifyOutputDirUsingArtifactProject(
final String outDir,
final String finalName,
@@ -721,7 +723,7 @@ public void testLinuxRootReferencePath() {
}
@Test
- public void groupIdPath_artifactProjectInterpolator() {
+ public void groupIdPathArtifactProjectInterpolator() {
Artifact artifact = mock(Artifact.class);
when(artifact.getFile()).thenReturn(new File("dir", "artifactId.jar"));
@@ -735,7 +737,7 @@ public void groupIdPath_artifactProjectInterpolator() {
}
@Test
- public void groupIdPath_artifactInterpolator() {
+ public void groupIdPathArtifactInterpolator() {
Artifact artifact = mock(Artifact.class);
when(artifact.getGroupId()).thenReturn("a.b.c");
when(artifact.getFile()).thenReturn(new File("dir", "artifactId.jar"));
diff --git a/src/test/java/org/apache/maven/plugins/assembly/utils/FilterUtilsTest.java b/src/test/java/org/apache/maven/plugins/assembly/utils/FilterUtilsTest.java
index 6d726c82..fe8f5709 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/utils/FilterUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/utils/FilterUtilsTest.java
@@ -39,13 +39,15 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.lenient;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class FilterUtilsTest {
@Test
- public void testFilterArtifacts_ShouldThrowExceptionUsingStrictModeWithUnmatchedInclude() {
+ public void testFilterArtifactsShouldThrowExceptionUsingStrictModeWithUnmatchedInclude() {
final Artifact artifact = mock(Artifact.class);
when(artifact.getGroupId()).thenReturn("group");
lenient().when(artifact.getArtifactId()).thenReturn("artifact");
@@ -72,13 +74,13 @@ public void testFilterArtifacts_ShouldThrowExceptionUsingStrictModeWithUnmatched
}
@Test
- public void testFilterArtifacts_ShouldNotRemoveArtifactDirectlyIncluded() throws Exception {
+ public void testFilterArtifactsShouldNotRemoveArtifactDirectlyIncluded() throws Exception {
verifyArtifactInclusion("group", "artifact", "group:artifact", null, null, null);
verifyArtifactInclusion("group", "artifact", "group:artifact:jar", null, null, null);
}
@Test
- public void testFilterArtifacts_ShouldNotRemoveArtifactTransitivelyIncluded() throws Exception {
+ public void testFilterArtifactsShouldNotRemoveArtifactTransitivelyIncluded() throws Exception {
verifyArtifactInclusion(
"group",
"artifact",
@@ -89,7 +91,7 @@ public void testFilterArtifacts_ShouldNotRemoveArtifactTransitivelyIncluded() th
}
@Test
- public void testFilterArtifacts_ShouldRemoveArtifactTransitivelyExcluded() throws Exception {
+ public void testFilterArtifactsShouldRemoveArtifactTransitivelyExcluded() throws Exception {
verifyArtifactExclusion(
"group",
"artifact",
@@ -100,19 +102,19 @@ public void testFilterArtifacts_ShouldRemoveArtifactTransitivelyExcluded() throw
}
@Test
- public void testFilterArtifacts_ShouldRemoveArtifactDirectlyExcluded() throws Exception {
+ public void testFilterArtifactsShouldRemoveArtifactDirectlyExcluded() throws Exception {
verifyArtifactExclusion("group", "artifact", null, "group:artifact", null, null);
verifyArtifactExclusion("group", "artifact", null, "group:artifact:jar", null, null);
}
@Test
- public void testFilterArtifacts_ShouldNotRemoveArtifactNotIncludedAndNotExcluded() throws Exception {
+ public void testFilterArtifactsShouldNotRemoveArtifactNotIncludedAndNotExcluded() throws Exception {
verifyArtifactInclusion("group", "artifact", null, null, null, null);
verifyArtifactInclusion("group", "artifact", null, null, null, null);
}
@Test
- public void testFilterArtifacts_ShouldRemoveArtifactExcludedByAdditionalFilter() throws Exception {
+ public void testFilterArtifactsShouldRemoveArtifactExcludedByAdditionalFilter() throws Exception {
final ArtifactFilter filter = new ArtifactFilter() {
public boolean include(final Artifact artifact) {
@@ -124,13 +126,13 @@ public boolean include(final Artifact artifact) {
}
@Test
- public void testFilterProjects_ShouldNotRemoveProjectDirectlyIncluded() {
+ public void testFilterProjectsShouldNotRemoveProjectDirectlyIncluded() {
verifyProjectInclusion("group", "artifact", "group:artifact", null, null);
verifyProjectInclusion("group", "artifact", "group:artifact:jar", null, null);
}
@Test
- public void testFilterProjects_ShouldNotRemoveProjectTransitivelyIncluded() {
+ public void testFilterProjectsShouldNotRemoveProjectTransitivelyIncluded() {
verifyProjectInclusion(
"group",
"artifact",
@@ -140,7 +142,7 @@ public void testFilterProjects_ShouldNotRemoveProjectTransitivelyIncluded() {
}
@Test
- public void testFilterProjects_ShouldRemoveProjectTransitivelyExcluded() {
+ public void testFilterProjectsShouldRemoveProjectTransitivelyExcluded() {
verifyProjectExclusion(
"group",
"artifact",
@@ -150,13 +152,13 @@ public void testFilterProjects_ShouldRemoveProjectTransitivelyExcluded() {
}
@Test
- public void testFilterProjects_ShouldRemoveProjectDirectlyExcluded() {
+ public void testFilterProjectsShouldRemoveProjectDirectlyExcluded() {
verifyProjectExclusion("group", "artifact", null, "group:artifact", null);
verifyProjectExclusion("group", "artifact", null, "group:artifact:jar", null);
}
@Test
- public void testFilterProjects_ShouldNotRemoveProjectNotIncludedAndNotExcluded() {
+ public void testFilterProjectsShouldNotRemoveProjectNotIncludedAndNotExcluded() {
verifyProjectInclusion("group", "artifact", null, null, null);
verifyProjectInclusion("group", "artifact", null, null, null);
}
diff --git a/src/test/java/org/apache/maven/plugins/assembly/utils/LineEndingsUtilsTest.java b/src/test/java/org/apache/maven/plugins/assembly/utils/LineEndingsUtilsTest.java
index 45af4b0b..bada093e 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/utils/LineEndingsUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/utils/LineEndingsUtilsTest.java
@@ -64,31 +64,31 @@ public void shouldReturnNullAsLineEndingForKeep() {
}
@Test
- public void testGetLineEndingChars_ShouldReturnDosLineEnding() throws AssemblyFormattingException {
+ public void testGetLineEndingCharsShouldReturnDosLineEnding() throws AssemblyFormattingException {
assertEquals("\r\n", LineEndingsUtils.getLineEndingCharacters("windows"));
assertEquals("\r\n", LineEndingsUtils.getLineEndingCharacters("dos"));
assertEquals("\r\n", LineEndingsUtils.getLineEndingCharacters("crlf"));
}
@Test
- public void testGetLineEndingChars_ShouldReturnUnixLineEnding() throws AssemblyFormattingException {
+ public void testGetLineEndingCharsShouldReturnUnixLineEnding() throws AssemblyFormattingException {
assertEquals("\n", LineEndingsUtils.getLineEndingCharacters("unix"));
assertEquals("\n", LineEndingsUtils.getLineEndingCharacters("lf"));
}
@Test
- public void testGetLineEndingChars_ShouldReturnNullLineEnding() throws AssemblyFormattingException {
+ public void testGetLineEndingCharsShouldReturnNullLineEnding() throws AssemblyFormattingException {
assertNull(LineEndingsUtils.getLineEndingCharacters("keep"));
}
@Test(expected = AssemblyFormattingException.class)
- public void testGetLineEndingChars_ShouldThrowFormattingExceptionWithInvalidHint()
+ public void testGetLineEndingCharsShouldThrowFormattingExceptionWithInvalidHint()
throws AssemblyFormattingException {
LineEndingsUtils.getLineEndingCharacters("invalid");
}
@Test
- public void testConvertLineEndings_ShouldReplaceLFWithCRLF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceLFWithCRLF() throws IOException {
String test = "This is a \ntest.";
String check = "This is a \r\ntest.";
@@ -96,7 +96,7 @@ public void testConvertLineEndings_ShouldReplaceLFWithCRLF() throws IOException
}
@Test
- public void testConvertLineEndings_ShouldReplaceLFWithCRLFAtEOF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceLFWithCRLFAtEOF() throws IOException {
String test = "This is a \ntest.\n";
String check = "This is a \r\ntest.\r\n";
@@ -104,7 +104,7 @@ public void testConvertLineEndings_ShouldReplaceLFWithCRLFAtEOF() throws IOExcep
}
@Test
- public void testConvertLineEndings_ShouldReplaceCRLFWithLF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceCRLFWithLF() throws IOException {
String test = "This is a \r\ntest.";
String check = "This is a \ntest.";
@@ -112,7 +112,7 @@ public void testConvertLineEndings_ShouldReplaceCRLFWithLF() throws IOException
}
@Test
- public void testConvertLineEndings_ShouldReplaceCRLFWithLFAtEOF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceCRLFWithLFAtEOF() throws IOException {
String test = "This is a \r\ntest.\r\n";
String check = "This is a \ntest.\n";
@@ -120,7 +120,7 @@ public void testConvertLineEndings_ShouldReplaceCRLFWithLFAtEOF() throws IOExcep
}
@Test
- public void testConvertLineEndings_ShouldReplaceLFWithLF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceLFWithLF() throws IOException {
String test = "This is a \ntest.";
String check = "This is a \ntest.";
@@ -128,7 +128,7 @@ public void testConvertLineEndings_ShouldReplaceLFWithLF() throws IOException {
}
@Test
- public void testConvertLineEndings_ShouldReplaceLFWithLFAtEOF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceLFWithLFAtEOF() throws IOException {
String test = "This is a \ntest.\n";
String check = "This is a \ntest.\n";
@@ -136,7 +136,7 @@ public void testConvertLineEndings_ShouldReplaceLFWithLFAtEOF() throws IOExcepti
}
@Test
- public void testConvertLineEndings_ShouldReplaceCRLFWithCRLF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceCRLFWithCRLF() throws IOException {
String test = "This is a \r\ntest.";
String check = "This is a \r\ntest.";
@@ -144,7 +144,7 @@ public void testConvertLineEndings_ShouldReplaceCRLFWithCRLF() throws IOExceptio
}
@Test
- public void testConvertLineEndings_ShouldReplaceCRLFWithCRLFAtEOF() throws IOException {
+ public void testConvertLineEndingsShouldReplaceCRLFWithCRLFAtEOF() throws IOException {
String test = "This is a \r\ntest.\r\n";
String check = "This is a \r\ntest.\r\n";
@@ -152,7 +152,7 @@ public void testConvertLineEndings_ShouldReplaceCRLFWithCRLFAtEOF() throws IOExc
}
@Test
- public void testConvertLineEndings_LFToCRLFNoEOFForceEOF() throws IOException {
+ public void testConvertLineEndingsLFToCRLFNoEOFForceEOF() throws IOException {
String test = "This is a \ntest.";
String check = "This is a \r\ntest.\r\n";
@@ -160,7 +160,7 @@ public void testConvertLineEndings_LFToCRLFNoEOFForceEOF() throws IOException {
}
@Test
- public void testConvertLineEndings_LFToCRLFWithEOFForceEOF() throws IOException {
+ public void testConvertLineEndingsLFToCRLFWithEOFForceEOF() throws IOException {
String test = "This is a \ntest.\n";
String check = "This is a \r\ntest.\r\n";
@@ -168,7 +168,7 @@ public void testConvertLineEndings_LFToCRLFWithEOFForceEOF() throws IOException
}
@Test
- public void testConvertLineEndings_LFToCRLFNoEOFStripEOF() throws IOException {
+ public void testConvertLineEndingsLFToCRLFNoEOFStripEOF() throws IOException {
String test = "This is a \ntest.";
String check = "This is a \r\ntest.";
@@ -176,7 +176,7 @@ public void testConvertLineEndings_LFToCRLFNoEOFStripEOF() throws IOException {
}
@Test
- public void testConvertLineEndings_LFToCRLFWithEOFStripEOF() throws IOException {
+ public void testConvertLineEndingsLFToCRLFWithEOFStripEOF() throws IOException {
String test = "This is a \ntest.\n";
String check = "This is a \r\ntest.";
@@ -184,7 +184,7 @@ public void testConvertLineEndings_LFToCRLFWithEOFStripEOF() throws IOException
}
@Test
- public void testConvertLineEndings_CRLFToLFNoEOFForceEOF() throws IOException {
+ public void testConvertLineEndingsCRLFToLFNoEOFForceEOF() throws IOException {
String test = "This is a \r\ntest.";
String check = "This is a \ntest.\n";
@@ -192,7 +192,7 @@ public void testConvertLineEndings_CRLFToLFNoEOFForceEOF() throws IOException {
}
@Test
- public void testConvertLineEndings_CRLFToLFWithEOFForceEOF() throws IOException {
+ public void testConvertLineEndingsCRLFToLFWithEOFForceEOF() throws IOException {
String test = "This is a \r\ntest.\r\n";
String check = "This is a \ntest.\n";
@@ -200,7 +200,7 @@ public void testConvertLineEndings_CRLFToLFWithEOFForceEOF() throws IOException
}
@Test
- public void testConvertLineEndings_CRLFToLFNoEOFStripEOF() throws IOException {
+ public void testConvertLineEndingsCRLFToLFNoEOFStripEOF() throws IOException {
String test = "This is a \r\ntest.";
String check = "This is a \ntest.";
@@ -208,7 +208,7 @@ public void testConvertLineEndings_CRLFToLFNoEOFStripEOF() throws IOException {
}
@Test
- public void testConvertLineEndings_CRLFToLFWithEOFStripEOF() throws IOException {
+ public void testConvertLineEndingsCRLFToLFWithEOFStripEOF() throws IOException {
String test = "This is a \r\ntest.\r\n";
String check = "This is a \ntest.";
diff --git a/src/test/java/org/apache/maven/plugins/assembly/utils/ProjectUtilsTest.java b/src/test/java/org/apache/maven/plugins/assembly/utils/ProjectUtilsTest.java
index 8362ad96..f74334e4 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/utils/ProjectUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/utils/ProjectUtilsTest.java
@@ -50,7 +50,7 @@ private MavenProject createTestProject(final String artifactId, final String gro
}
@Test
- public void testGetProjectModules_ShouldIncludeDirectModuleOfMasterProject() throws IOException {
+ public void testGetProjectModulesShouldIncludeDirectModuleOfMasterProject() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
master.setFile(new File("pom.xml"));
@@ -74,7 +74,7 @@ public void testGetProjectModules_ShouldIncludeDirectModuleOfMasterProject() thr
}
@Test
- public void testGetProjectModules_ShouldNotIncludeMasterProject() throws IOException {
+ public void testGetProjectModulesShouldNotIncludeMasterProject() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
final Set result =
@@ -85,7 +85,7 @@ public void testGetProjectModules_ShouldNotIncludeMasterProject() throws IOExcep
}
@Test
- public void testGetProjectModules_ShouldIncludeInDirectModuleOfMasterWhenIncludeSubModulesIsTrue()
+ public void testGetProjectModulesShouldIncludeInDirectModuleOfMasterWhenIncludeSubModulesIsTrue()
throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
@@ -121,7 +121,7 @@ public void testGetProjectModules_ShouldIncludeInDirectModuleOfMasterWhenInclude
}
@Test
- public void testGetProjectModules_ShouldExcludeInDirectModuleOfMasterWhenIncludeSubModulesIsFalse()
+ public void testGetProjectModulesShouldExcludeInDirectModuleOfMasterWhenIncludeSubModulesIsFalse()
throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
@@ -158,7 +158,7 @@ public void testGetProjectModules_ShouldExcludeInDirectModuleOfMasterWhenInclude
}
@Test
- public void testGetProjectModules_ShouldExcludeNonModuleOfMasterProject() throws IOException {
+ public void testGetProjectModulesShouldExcludeNonModuleOfMasterProject() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
master.setFile(new File("project/pom.xml"));
diff --git a/src/test/java/org/apache/maven/plugins/assembly/utils/TypeConversionUtilsTest.java b/src/test/java/org/apache/maven/plugins/assembly/utils/TypeConversionUtilsTest.java
index 6d37c696..f5792d1f 100644
--- a/src/test/java/org/apache/maven/plugins/assembly/utils/TypeConversionUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/assembly/utils/TypeConversionUtilsTest.java
@@ -37,7 +37,7 @@ public class TypeConversionUtilsTest {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Test
- public void testModeToInt_InterpretAsOctalWithoutLeadingZero() throws AssemblyFormattingException {
+ public void testModeToIntInterpretAsOctalWithoutLeadingZero() throws AssemblyFormattingException {
final int check = Integer.decode("0777");
final int test = TypeConversionUtils.modeToInt("777", logger);
@@ -45,7 +45,7 @@ public void testModeToInt_InterpretAsOctalWithoutLeadingZero() throws AssemblyFo
}
@Test
- public void testModeToInt_InterpretValuesWithLeadingZeroAsOctal() throws AssemblyFormattingException {
+ public void testModeToIntInterpretValuesWithLeadingZeroAsOctal() throws AssemblyFormattingException {
final int check = Integer.decode("0777");
final int test = TypeConversionUtils.modeToInt("0777", logger);
@@ -53,7 +53,7 @@ public void testModeToInt_InterpretValuesWithLeadingZeroAsOctal() throws Assembl
}
@Test
- public void testModeToInt_FailOnInvalidOctalValue() {
+ public void testModeToIntFailOnInvalidOctalValue() {
try {
TypeConversionUtils.modeToInt("493", logger);
@@ -64,7 +64,7 @@ public void testModeToInt_FailOnInvalidOctalValue() {
}
@Test
- public void testVerifyModeSanity_WarnOnNonsensicalOctalValue_002() {
+ public void testVerifyModeSanityWarnOnNonsensicalOctalValue002() {
final List messages = new ArrayList<>(2);
messages.add("World has write access, but user does not.");
messages.add("World has write access, but group does not.");
@@ -73,7 +73,7 @@ public void testVerifyModeSanity_WarnOnNonsensicalOctalValue_002() {
}
@Test
- public void testVerifyModeSanity_WarnOnNonsensicalOctalValue_020() {
+ public void testVerifyModeSanityWarnOnNonsensicalOctalValue020() {
final List messages = new ArrayList<>(1);
messages.add("Group has write access, but user does not.");
@@ -81,7 +81,7 @@ public void testVerifyModeSanity_WarnOnNonsensicalOctalValue_020() {
}
@Test
- public void testVerifyModeSanity_ReturnTrueForValidOctalValue_775() {
+ public void testVerifyModeSanityReturnTrueForValidOctalValue775() {
checkFileModeSanity("775", true, null);
}