- Cleaned up Code
  o Removed unused SuppressWarnings
  o Removed calling deprecated code.


git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1727754 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java b/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
index cafc4db..008b6b3 100644
--- a/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
+++ b/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
@@ -436,7 +436,6 @@
      * @throws MojoFailureException if an unexpected error occurred while packaging the webapp
      * @throws IOException if an error occurred while copying the files
      */
-    @SuppressWarnings( "unchecked" )
     public void buildWebapp( MavenProject mavenProject, File webapplicationDirectory )
         throws MojoExecutionException, MojoFailureException, IOException
     {
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 5b01b07..d379147 100644
--- a/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
@@ -19,20 +19,24 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.stubs.ArtifactStub;
 import org.apache.maven.plugin.war.stub.MavenProjectBasicStub;
 import org.apache.maven.plugin.war.stub.WarOverlayStub;
 import org.apache.maven.shared.filtering.MavenFileFilter;
+import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.archiver.Archiver;
 import org.codehaus.plexus.archiver.ArchiverException;
 import org.codehaus.plexus.archiver.jar.JarArchiver;
 import org.codehaus.plexus.util.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
+import org.sonatype.aether.RepositorySystemSession;
 
 public abstract class AbstractWarMojoTest
     extends AbstractMojoTestCase
@@ -60,14 +64,18 @@
      */
     protected void configureMojo( AbstractWarMojo mojo, List<String> filters, File classesDir, File webAppSource,
                                   File webAppDir, MavenProjectBasicStub project )
-        throws Exception
+                                      throws Exception
     {
         setVariableValueToObject( mojo, "filters", filters );
         setVariableValueToObject( mojo, "useCache", Boolean.FALSE );
         setVariableValueToObject( mojo, "mavenFileFilter", lookup( MavenFileFilter.class.getName() ) );
         setVariableValueToObject( mojo, "useJvmChmod", Boolean.TRUE );
+
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest();
+        request.setSystemProperties( System.getProperties() );
+
         MavenSession mavenSession =
-            new MavenSession( null, null, null, null, null, null, null, System.getProperties(), null );
+            new MavenSession( (PlexusContainer) null, (RepositorySystemSession) null, request, null );
         setVariableValueToObject( mojo, "session", mavenSession );
         mojo.setClassesDirectory( classesDir );
         mojo.setWarSourceDirectory( webAppSource );
@@ -248,10 +256,9 @@
         // Archive was not yet created for that id so let's create it
         final File rootDir = new File( OVERLAYS_ROOT_DIR, id );
         rootDir.mkdirs();
-        String[] filePaths =
-            new String[] { "jsp/d/a.jsp", "jsp/d/b.jsp", "jsp/d/c.jsp", "jsp/a.jsp", "jsp/b.jsp", "jsp/c.jsp",
-                "WEB-INF/classes/a.class", "WEB-INF/classes/b.class", "WEB-INF/classes/c.class", "WEB-INF/lib/a.jar",
-                "WEB-INF/lib/b.jar", "WEB-INF/lib/c.jar", "WEB-INF/web.xml" };
+        String[] filePaths = new String[] { "jsp/d/a.jsp", "jsp/d/b.jsp", "jsp/d/c.jsp", "jsp/a.jsp", "jsp/b.jsp",
+            "jsp/c.jsp", "WEB-INF/classes/a.class", "WEB-INF/classes/b.class", "WEB-INF/classes/c.class",
+            "WEB-INF/lib/a.jar", "WEB-INF/lib/b.jar", "WEB-INF/lib/c.jar", "WEB-INF/web.xml" };
 
         for ( String filePath : filePaths )
         {
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 fbb3019..02cb9aa 100644
--- a/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java
+++ b/src/test/java/org/apache/maven/plugin/war/WarExplodedMojoFilteringTest.java
@@ -135,6 +135,7 @@
 
         // update property, and generate again
         System.setProperty( "system.property", "new-system-property-value" );
+        this.configureMojo( mojo, filterList, classesDir, webAppSource, webAppDirectory, project );
 
         mojo.execute();