- Improved code
  Make test code more Java 5 like to reduce the number of warnings.


git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1622522 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/maven/plugin/war/AbstractWarExplodedMojoTest.java b/src/test/java/org/apache/maven/plugin/war/AbstractWarExplodedMojoTest.java
index 0a29feb..c8ac119 100644
--- a/src/test/java/org/apache/maven/plugin/war/AbstractWarExplodedMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/AbstractWarExplodedMojoTest.java
@@ -109,7 +109,7 @@
             }
         }
 
-        configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "workDirectory", workDirectory );
 
         return webAppDirectory;
@@ -152,7 +152,7 @@
      * @param webAppDirectory the webapp directory
      * @return a list of File objects that have been asserted
      */
-    protected List assertDefaultContent( File webAppDirectory )
+    protected List<File> assertDefaultContent( File webAppDirectory )
     {
         // Validate content of the webapp
         File expectedWebSourceFile = new File( webAppDirectory, "pansit.jsp" );
@@ -161,7 +161,7 @@
         assertTrue( "source file not found: " + expectedWebSourceFile.toString(), expectedWebSourceFile.exists() );
         assertTrue( "source file not found: " + expectedWebSource2File.toString(), expectedWebSource2File.exists() );
 
-        final List content = new ArrayList();
+        final List<File> content = new ArrayList<File>();
         content.add( expectedWebSourceFile );
         content.add( expectedWebSource2File );
 
@@ -176,12 +176,12 @@
      * @param webAppDirectory the webapp directory
      * @return a list with the web.xml File object
      */
-    protected List assertWebXml( File webAppDirectory )
+    protected List<File> assertWebXml( File webAppDirectory )
     {
         File expectedWEBXMLFile = new File( webAppDirectory, "WEB-INF/web.xml" );
         assertTrue( "web xml not found: " + expectedWEBXMLFile.toString(), expectedWEBXMLFile.exists() );
 
-        final List content = new ArrayList();
+        final List<File> content = new ArrayList<File>();
         content.add( expectedWEBXMLFile );
 
         return content;
@@ -196,9 +196,9 @@
      * @param customMessage   a custom message if an assertion fails
      * @return a list of File objects that have been inspected
      */
-    protected List assertCustomContent( File webAppDirectory, String[] filePaths, String customMessage )
+    protected List<File> assertCustomContent( File webAppDirectory, String[] filePaths, String customMessage )
     {
-        final List content = new ArrayList();
+        final List<File> content = new ArrayList<File>();
         for (String filePath : filePaths) {
             final File expectedFile = new File(webAppDirectory, filePath);
             if (customMessage != null) {
@@ -218,9 +218,9 @@
      * @param expectedFiles   the expected files
      * @param filter          an optional filter to ignore some resources
      */
-    protected void assertWebAppContent( File webAppDirectory, List expectedFiles, FileFilter filter )
+    protected void assertWebAppContent( File webAppDirectory, List<File> expectedFiles, FileFilter filter )
     {
-        final List webAppContent = new ArrayList();
+        final List<File> webAppContent = new ArrayList<File>();
         if ( filter != null )
         {
             buildFilesList( webAppDirectory, filter, webAppContent );
@@ -248,7 +248,7 @@
      * @param filter  the filter
      * @param content the current content, updated recursivly
      */
-    private void buildFilesList( final File dir, FileFilter filter, final List content )
+    private void buildFilesList( final File dir, FileFilter filter, final List<File> content )
     {
         final File[] files = dir.listFiles();
 
@@ -270,7 +270,7 @@
         implements FileFilter
     {
 
-        private final List rejectedFilePaths;
+        private final List<String> rejectedFilePaths;
 
         private final int webAppDirIndex;
 
@@ -283,7 +283,7 @@
             }
             else
             {
-                this.rejectedFilePaths = new ArrayList();
+                this.rejectedFilePaths = new ArrayList<String>();
             }
             this.webAppDirIndex = webAppDirectory.getAbsolutePath().length() + 1;
         }
diff --git a/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java b/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
index fcc72a1..be0d2bd 100644
--- a/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
@@ -58,7 +58,7 @@
      * @param project
      * @throws Exception
      */
-    protected void configureMojo( AbstractWarMojo mojo, List filters, File classesDir, File webAppSource,
+    protected void configureMojo( AbstractWarMojo mojo, List<String> filters, File classesDir, File webAppSource,
                                   File webAppDir, MavenProjectBasicStub project )
         throws Exception
     {
diff --git a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java
index 7262a38..8aec4a4 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java
@@ -64,7 +64,7 @@
         File webAppResource = new File( getTestDirectory(), testId + "-test-data/resources" );
         File sampleResource = new File( webAppResource, "custom-setting.cfg" );
         File sampleResourceWDir = new File( webAppResource, "custom-config/custom-setting.cfg" );
-        List filterList = new LinkedList();
+        List<String> filterList = new LinkedList<String>();
         ResourceStub[] resources = new ResourceStub[]{new ResourceStub()};
 
         createFile( sampleResource );
diff --git a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
index 75f2552..099a079 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoTest.java
@@ -78,7 +78,7 @@
 
         // configure mojo
         resources[0].setDirectory( webAppResource.getAbsolutePath() );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "webResources", resources );
         mojo.execute();
 
@@ -122,7 +122,7 @@
         // configure mojo
         resources[0].setDirectory( webAppResource.getAbsolutePath() );
         resources[0].setTargetPath( "targetPath" );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "webResources", resources );
         mojo.execute();
 
@@ -160,7 +160,7 @@
         File webAppDirectory = new File( getTestDirectory(), testId );
 
         // configure mojo
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
         mojo.execute();
 
@@ -198,7 +198,7 @@
         File webAppDirectory = new File( getTestDirectory(), testId );
 
         // configure mojo
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.setContainerConfigXML( new File( xmlSource, "config.xml" ) );
         mojo.execute();
 
@@ -244,7 +244,7 @@
 
         // configure mojo
         project.addArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "workDirectory", workDirectory );
         mojo.execute();
 
@@ -306,7 +306,7 @@
         expectedFile.setLastModified( time );
 
         project.addArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "workDirectory", workDirectory );
         mojo.execute();
 
@@ -391,7 +391,7 @@
 
         // configure mojo
         project.addArtifact( ejbArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -428,7 +428,7 @@
 
         // configure mojo
         project.addArtifact( jarArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -466,7 +466,7 @@
 
         // configure mojo
         project.addArtifact( ejbArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -504,7 +504,7 @@
 
         // configure mojo
         project.addArtifact( tldArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -542,7 +542,7 @@
 
         // configure mojo
         project.addArtifact( parartifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -579,7 +579,7 @@
 
         // configure mojo
         project.addArtifact( aarArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -616,7 +616,7 @@
 
         // configure mojo
         project.addArtifact( marArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -653,7 +653,7 @@
 
         // configure mojo
         project.addArtifact( xarArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -696,7 +696,7 @@
         ejbArtifactDup.setGroupId( "org.dup.ejb" );
         project.addArtifact( ejbArtifact );
         project.addArtifact( ejbArtifactDup );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -749,7 +749,7 @@
         project.addArtifact( ejbArtifact );
         project.addArtifact( ejbArtifactDup );
 
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -786,7 +786,7 @@
         File classesDir = createClassesDir( testId, false );
 
         // configure mojo
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -816,7 +816,7 @@
         File webAppDirectory = new File( getTestDirectory(), testId );
 
         // configure mojo
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "warSourceIncludes", "**/*sit.jsp" );
         setVariableValueToObject( mojo, "warSourceExcludes", "**/last*.*" );
         mojo.execute();
@@ -858,7 +858,7 @@
 
         // configure mojo
         project.addArtifact( includeexcludeWarArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "dependentWarIncludes", "**/*Include.jsp,**/*.xml" );
         setVariableValueToObject( mojo, "dependentWarExcludes", "**/*Exclude*,**/MANIFEST.MF" );
         setVariableValueToObject( mojo, "workDirectory", workDirectory );
@@ -900,7 +900,7 @@
         File webAppDirectory = new File( getTestDirectory(), testId );
 
         // configure mojo
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
 
         // destination file is already created manually containing an "error" string
         // source is newer than the destination file
@@ -960,7 +960,7 @@
         // configure mojo
         project.addArtifact( jarArtifact );
         mojo.setOutputFileNameMapping( "@{artifactId}@.@{extension}@" );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
@@ -1004,7 +1004,7 @@
         project.addArtifact( ejbArtifact );
         project.addArtifact( ejbArtifactDup );
         mojo.setOutputFileNameMapping( "@{artifactId}@.@{extension}@" );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         mojo.execute();
 
         // validate operation
diff --git a/src/test/java/org/apache/maven/plugin/war/WarInPlaceMojoTest.java b/src/test/java/org/apache/maven/plugin/war/WarInPlaceMojoTest.java
index 0179fc4..7be7107 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarInPlaceMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarInPlaceMojoTest.java
@@ -73,7 +73,7 @@
 
         // configure mojo
         resources[0].setDirectory( webAppResource.getAbsolutePath() );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, null, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, null, project );
         setVariableValueToObject( mojo, "webResources", resources );
         mojo.execute();
 
diff --git a/src/test/java/org/apache/maven/plugin/war/WarMojoTest.java b/src/test/java/org/apache/maven/plugin/war/WarMojoTest.java
index b922631..0ba2705 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarMojoTest.java
@@ -78,7 +78,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -107,7 +107,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -140,7 +140,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "projectHelper", projectHelper );
         setVariableValueToObject( mojo, "classifier", "test-classifier" );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
@@ -173,7 +173,7 @@
 
         warArtifact.setFile( new File( "error.war" ) );
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "projectHelper", projectHelper );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
@@ -209,7 +209,7 @@
 
         warArtifact.setFile( new File( "error.war" ) );
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "projectHelper", projectHelper );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
@@ -243,7 +243,7 @@
         createFile( configFile, "<config></config>" );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -277,7 +277,7 @@
         createFile( configFile, "<config></config>" );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -309,7 +309,7 @@
         File classesDir = createClassesDir( testId, true );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setFailOnMissingWebXml( false );
@@ -317,7 +317,7 @@
 
         //validate jar file
         File expectedJarFile = new File( outputDir, "simple.war" );
-        final Map jarContent = assertJarContent( expectedJarFile, new String[]{"META-INF/MANIFEST.MF", "pansit.jsp",
+        final Map<String, JarEntry> jarContent = assertJarContent( expectedJarFile, new String[]{"META-INF/MANIFEST.MF", "pansit.jsp",
             "org/web/app/last-exile.jsp", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml",
             "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties"},
                                                                   new String[]{null, null, null, null, null} );
@@ -339,7 +339,7 @@
         File classesDir = createClassesDir( testId, true );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setFailOnMissingWebXml( true );
@@ -369,7 +369,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -397,7 +397,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
 
         project.setArtifact( warArtifact );
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         mojo.setWebXml( new File( xmlSource, "web.xml" ) );
@@ -413,13 +413,13 @@
     }
 
 
-    protected Map assertJarContent( final File expectedJarFile, final String[] files, final String[] filesContent )
+    protected Map<String, JarEntry> assertJarContent( final File expectedJarFile, final String[] files, final String[] filesContent )
         throws IOException
     {
         return assertJarContent( expectedJarFile, files, filesContent, null );
     }
 
-    protected Map assertJarContent( final File expectedJarFile, final String[] files, final String[] filesContent, final String[] mustNotBeInJar )
+    protected Map<String, JarEntry> assertJarContent( final File expectedJarFile, final String[] files, final String[] filesContent, final String[] mustNotBeInJar )
         throws IOException
     {
         // Sanity check
@@ -427,11 +427,11 @@
                       filesContent.length );
 
         assertTrue( "war file not created: " + expectedJarFile.toString(), expectedJarFile.exists() );
-        final Map jarContent = new HashMap();
+        final Map<String, JarEntry> jarContent = new HashMap<String, JarEntry>();
         final JarFile jarFile = new JarFile( expectedJarFile );
 
         JarEntry entry;
-        Enumeration enumeration = jarFile.entries();
+        Enumeration<JarEntry> enumeration = jarFile.entries();
         while ( enumeration.hasMoreElements() )
         {
             entry = (JarEntry) enumeration.nextElement();
diff --git a/src/test/java/org/apache/maven/plugin/war/WarOverlaysTest.java b/src/test/java/org/apache/maven/plugin/war/WarOverlaysTest.java
index e7bc58c..b16b634 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarOverlaysTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarOverlaysTest.java
@@ -98,7 +98,7 @@
         final ArtifactStub overlay = buildWarOverlayStub( "overlay-one" );
 
         final File webAppDirectory = setUpMojo( testId, new ArtifactStub[]{overlay} );
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             mojo.execute();
@@ -132,7 +132,7 @@
         final ArtifactStub overlay2 = buildWarOverlayStub( "overlay-two" );
 
         final File webAppDirectory = setUpMojo( testId, new ArtifactStub[]{overlay, overlay2} );
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             mojo.execute();
@@ -212,7 +212,7 @@
                                                 new String[]{"org/sample/company/test.jsp", "jsp/b.jsp"} );
 
         // Add the tags
-        final List overlays = new ArrayList();
+        final List<Overlay> overlays = new ArrayList<Overlay>();
         overlays.add( new DefaultOverlay( overlay1 ) );
         overlays.add( new DefaultOverlay( overlay2 ) );
         overlays.add( new DefaultOverlay( overlay3 ) );
@@ -246,7 +246,7 @@
                                                 new String[]{"org/sample/company/test.jsp", "jsp/b.jsp"} );
 
         // Add the tags
-        final List overlays = new ArrayList();
+        final List<Overlay> overlays = new ArrayList<Overlay>();
 
         // Add the default project explicitely
         overlays.add( mojo.getCurrentProjectOverlay() );
@@ -273,7 +273,7 @@
     private void assertScenariOne( String testId, File webAppDirectory )
         throws Exception
     {
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             mojo.execute();
@@ -337,14 +337,14 @@
 
         Overlay over4 = new DefaultOverlay( overlay2 );
 
-        mojo.setOverlays( new LinkedList() );
+        mojo.setOverlays( new LinkedList<Overlay>() );
         mojo.addOverlay( over1 );
         mojo.addOverlay( over2 );
         mojo.addOverlay( over3 );
         mojo.addOverlay( mojo.getCurrentProjectOverlay());
         mojo.addOverlay( over4 );
 
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             mojo.execute();
@@ -407,14 +407,14 @@
 
         Overlay over4 = new DefaultOverlay( overlay2 );
 
-        mojo.setOverlays( new LinkedList() );
+        mojo.setOverlays( new LinkedList<Overlay>() );
         mojo.addOverlay( over1 );
         mojo.addOverlay( over2 );
         mojo.addOverlay( over3 );
         mojo.addOverlay( mojo.getCurrentProjectOverlay() );
         mojo.addOverlay( over4 );
 
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             mojo.execute();
@@ -461,14 +461,14 @@
         final ArtifactStub overlay2 = buildWarOverlayStub( "overlay-two" );
 
         final File webAppDirectory = setUpMojo( testId, new ArtifactStub[]{overlay, overlay2} );
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             // Use the cache
             setVariableValueToObject( mojo, "useCache", Boolean.TRUE );
             setVariableValueToObject( mojo, "cacheFile", new File( mojo.getWorkDirectory(), "cache.xml" ) );
 
-            final LinkedList overlays = new LinkedList();
+            final LinkedList<Overlay> overlays = new LinkedList<Overlay>();
             overlays.add( new DefaultOverlay( overlay ) );
             overlays.add( new DefaultOverlay( overlay2 ) );
             mojo.setOverlays( overlays );
@@ -476,7 +476,7 @@
             mojo.execute();
 
             // Now change the overlay order and make sure the right file is overwritten
-            final LinkedList updatedOverlays = new LinkedList();
+            final LinkedList<Overlay> updatedOverlays = new LinkedList<Overlay>();
             updatedOverlays.add( new DefaultOverlay( overlay2 ) );
             updatedOverlays.add( new DefaultOverlay( overlay ) );
             mojo.setOverlays( updatedOverlays );
@@ -515,14 +515,14 @@
         final ArtifactStub overlay2 = buildWarOverlayStub( "overlay-two" );
 
         final File webAppDirectory = setUpMojo( testId, new ArtifactStub[]{overlay, overlay2} );
-        final List assertedFiles = new ArrayList();
+        final List<File> assertedFiles = new ArrayList<File>();
         try
         {
             // Use the cache
             setVariableValueToObject( mojo, "useCache", Boolean.TRUE );
             setVariableValueToObject( mojo, "cacheFile", new File( mojo.getWorkDirectory(), "cache.xml" ) );
 
-            final LinkedList overlays = new LinkedList();
+            final LinkedList<Overlay> overlays = new LinkedList<Overlay>();
             overlays.add( new DefaultOverlay( overlay ) );
             overlays.add( new DefaultOverlay( overlay2 ) );
             mojo.setOverlays( overlays );
@@ -530,7 +530,7 @@
             mojo.execute();
 
             // Now remove overlay one the right file is overwritten
-            final LinkedList updatedOverlays = new LinkedList();
+            final LinkedList<Overlay> updatedOverlays = new LinkedList<Overlay>();
             updatedOverlays.add( new DefaultOverlay( overlay2 ) );
             mojo.setOverlays( updatedOverlays );
 
diff --git a/src/test/java/org/apache/maven/plugin/war/WarZipTest.java b/src/test/java/org/apache/maven/plugin/war/WarZipTest.java
index 09a651c..1cdc204 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarZipTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarZipTest.java
@@ -82,7 +82,7 @@
         File xmlSource = createXMLConfigDir( testId, new String[]{"web.xml"} );
         project.setArtifact( warArtifact );
 
-        this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
+        this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
         setVariableValueToObject( mojo, "outputDirectory", outputDir );
         setVariableValueToObject( mojo, "warName", warName );
         setVariableValueToObject( mojo, "workDirectory", new File( getTestDirectory(), "work" ) );
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java b/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
index ab1820d..e7c0726 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/ModelStub.java
@@ -25,6 +25,7 @@
 
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Parent;
+import org.apache.maven.model.Profile;
 
 /**
  * Stub
@@ -82,13 +83,13 @@
         return new LinkedList();
     }
 
-    public List getProfiles()
+    public List<Profile> getProfiles()
     {
-        return new LinkedList();
+        return new LinkedList<Profile>();
     }
 
-    public List getModules()
+    public List<String> getModules()
     {
-        return new LinkedList();
+        return new LinkedList<String>();
     }
 }
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/ProjectHelperStub.java b/src/test/java/org/apache/maven/plugin/war/stub/ProjectHelperStub.java
index a576218..2d037d1 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/ProjectHelperStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/ProjectHelperStub.java
@@ -67,11 +67,13 @@
         artifactFile = _artifactFile;
     }
 
+    @SuppressWarnings( "rawtypes" )
     public void addResource( MavenProject project, String resourceDirectory, List includes, List excludes )
     {
 
     }
 
+    @SuppressWarnings( "rawtypes" )
     public void addTestResource( MavenProject project, String resourceDirectory, List includes, List excludes )
     {
 
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/ResourceStub.java b/src/test/java/org/apache/maven/plugin/war/stub/ResourceStub.java
index ed48bed..d8daecc 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/ResourceStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/ResourceStub.java
@@ -27,16 +27,21 @@
 public class ResourceStub
     extends Resource
 {
-    String directory;
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 7685068931840967662L;
 
-    public List getIncludes()
+    private String directory;
+
+    public List<String> getIncludes()
     {
-        return new ArrayList();
+        return new ArrayList<String>();
     }
 
-    public List getExcludes()
+    public List<String> getExcludes()
     {
-        return new ArrayList();
+        return new ArrayList<String>();
     }
 
     public void setDirectory( String _directory )
diff --git a/src/test/java/org/apache/maven/plugin/war/stub/ZipArtifactStub.java b/src/test/java/org/apache/maven/plugin/war/stub/ZipArtifactStub.java
index 99dd1e2..0365ec7 100644
--- a/src/test/java/org/apache/maven/plugin/war/stub/ZipArtifactStub.java
+++ b/src/test/java/org/apache/maven/plugin/war/stub/ZipArtifactStub.java
@@ -31,14 +31,12 @@
 public class ZipArtifactStub
     extends AbstractArtifactStub
 {
-    private ArtifactHandler artifactHandler;
-
     private File zip;
 
     public ZipArtifactStub( String basedir, ArtifactHandler artifactHandler, File zipFile )
     {
         super( basedir );
-        this.artifactHandler = artifactHandler;
+        super.setArtifactHandler( artifactHandler );
         this.zip = zipFile;
     }
 
diff --git a/src/test/java/org/apache/maven/plugin/war/util/PathSetTest.java b/src/test/java/org/apache/maven/plugin/war/util/PathSetTest.java
index e628ca4..52b9ce9 100644
--- a/src/test/java/org/apache/maven/plugin/war/util/PathSetTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/util/PathSetTest.java
@@ -94,7 +94,7 @@
     {
         PathSet ps = new PathSet();
         assertEquals( "Unexpected PathSet size", ps.size(), 0 );
-        Iterator iter = ps.iterator();
+        Iterator<String> iter = ps.iterator();
         assertNotNull( "Iterator is null", iter );
         assertFalse( "Can iterate on empty set", iter.hasNext() );
 
@@ -152,7 +152,7 @@
      */
     public void testPathsSetAddAlls()
     {
-        Set s1set = new HashSet();
+        Set<String> s1set = new HashSet<String>();
         s1set.add( "/a/b" );
         s1set.add( "a/b/c" );
         s1set.add( "a\\b/c" );
diff --git a/src/test/java/org/apache/maven/plugin/war/util/WebappStructureTest.java b/src/test/java/org/apache/maven/plugin/war/util/WebappStructureTest.java
index 6eae1a7..aa55f20 100644
--- a/src/test/java/org/apache/maven/plugin/war/util/WebappStructureTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/util/WebappStructureTest.java
@@ -36,7 +36,7 @@
 
     public void testDependencyAnalysisNoChange()
     {
-        final List dependencies = new ArrayList();
+        final List<Dependency> dependencies = new ArrayList<Dependency>();
         dependencies.add( createDependency( "groupTest", "artifactTest", "1.0" ) );
         final WebappStructure cache = new WebappStructure( dependencies );
 
@@ -95,10 +95,10 @@
 
     public void testDependencyAnalysisWithNewDependency()
     {
-        final List dependencies = new ArrayList();
+        final List<Dependency> dependencies = new ArrayList<Dependency>();
         dependencies.add( createDependency( "groupTest", "artifactTest", "1.0" ) );
         final WebappStructure cache = new WebappStructure( dependencies );
-        final List newDependencies = new ArrayList( dependencies );
+        final List<Dependency> newDependencies = new ArrayList<Dependency>( dependencies );
         final Dependency newDependency = createDependency( "groupTest", "nexArtifact", "2.0" );
         newDependencies.add( newDependency );
 
@@ -159,13 +159,13 @@
 
     public void testDependencyAnalysisWithRemovedDependency()
     {
-        final List dependencies = new ArrayList();
+        final List<Dependency> dependencies = new ArrayList<Dependency>();
         dependencies.add( createDependency( "groupTest", "artifactTest", "1.0" ) );
         final Dependency removedDependency = createDependency( "groupTest", "removedDep", "5.2" );
         dependencies.add( removedDependency );
         final WebappStructure cache = new WebappStructure( dependencies );
 
-        final List newDependencies = new ArrayList( dependencies );
+        final List<Dependency> newDependencies = new ArrayList<Dependency>( dependencies );
         newDependencies.remove( removedDependency );
         final WebappStructure webappStructure = new WebappStructure( newDependencies, cache );
 
@@ -224,13 +224,13 @@
 
     public void testUnknownFileNotAvailable()
     {
-        final WebappStructure structure = new WebappStructure( new ArrayList() );
+        final WebappStructure structure = new WebappStructure( new ArrayList<Dependency>() );
         assertFalse( structure.isRegistered( "/foo/bar.txt" ) );
     }
 
     public void testRegisterSamePathTwice()
     {
-        final WebappStructure structure = new WebappStructure( new ArrayList() );
+        final WebappStructure structure = new WebappStructure( new ArrayList<Dependency>() );
         structure.registerFile( "overlay1", "WEB-INF/web.xml" );
         assertFalse( structure.registerFile( "currentBuild", "WEB-INF/web.xml" ) );
 
@@ -239,7 +239,7 @@
     public void testRegisterForced()
     {
         final String path = "WEB-INF/web.xml";
-        final WebappStructure structure = new WebappStructure( new ArrayList() );
+        final WebappStructure structure = new WebappStructure( new ArrayList<Dependency>() );
         assertFalse("New file should return false",
                     structure.registerFileForced( "overlay1", path ));
         assertEquals( "overlay1", structure.getOwner( path ) );         
@@ -248,7 +248,7 @@
     public void testRegisterSamePathTwiceForced()
     {
         final String path = "WEB-INF/web.xml";
-        final WebappStructure structure = new WebappStructure( new ArrayList() );
+        final WebappStructure structure = new WebappStructure( new ArrayList<Dependency>() );
         structure.registerFile( "overlay1", path );
         assertEquals( "overlay1", structure.getOwner( path ) );
         assertTrue("owner replacement should have returned true",