
Property changes on: .
___________________________________________________________________
Modified: svn:ignore
   - target
.classpath
.project

   + target
.classpath
.project
.settings


Index: pom.xml
===================================================================
--- pom.xml	(revision 10219)
+++ pom.xml	(working copy)
@@ -96,6 +96,12 @@
       <version>[9.0,11.0)</version>
     </dependency>
     <dependency>
+      <groupId>weblogic</groupId>
+      <artifactId>webserviceclient</artifactId>
+      <version>[9.0,11.0)</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
       <version>1.1</version>
Index: src/main/java/org/codehaus/mojo/weblogic/AppcMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/AppcMojo.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/AppcMojo.java	(working copy)
@@ -20,9 +20,12 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.Path;
 import org.codehaus.mojo.weblogic.util.WeblogicMojoUtilities;
+import org.codehaus.plexus.util.ReflectionUtils;
+
 import weblogic.ant.taskdefs.j2ee.Appc;
 
 import java.io.File;
+import java.lang.reflect.Method;
 
 /**
  * Run the weblogic appc compiler against an artifact.
@@ -88,13 +91,27 @@
     private boolean lineNumbers;
 
     /**
-     * If set to true the basic client jar will be created without descriptors, ets.
+     * If set to true the basic client jar will be created without descriptors, etc.
      *
      * @parameter default-value="false"
      */
     private boolean basicClientJar;
 
     /**
+     * The full path to create the generated client jar file.
+     *
+     * @parameter default-value="${project.build.directory}"
+     */
+    private String clientJarOutputDir;
+
+    /**
+     * If set to false the plugin stops after if compilation of a JSP file fails.
+     *
+     * @parameter default-value="true"
+     */
+    private boolean continueCompilation;
+
+    /**
      * Getter for property input artifact path.
      *
      * @return The value of input artifact path.
@@ -118,7 +135,7 @@
      * This method will perform the appc compilation of artifact.
      * Calls super.execute()
      *
-     * @throws MojoExecutionException Thrown if we fail to access the complier or the comilation fails.
+     * @throws MojoExecutionException Thrown if we fail to access the complier or the compilation fails.
      */
     public void execute()
         throws MojoExecutionException
@@ -155,8 +172,17 @@
             appc.setVerbose( this.verbose );
             appc.setKeepGenerated( this.keepGenerated );
             appc.setBasicClientJar( this.basicClientJar );
-            appc.setForceGeneration( this.forceGeneration );
+
+            // use reflection here to maintain compatibility with previous WebLogic versions
+//            appc.setClientJarOutputDir( this.clientJarOutputDir );
+			Method method = ReflectionUtils.getSetter("clientJarOutputDir", appc.getClass());
+			if (method != null) {
+				method.invoke(appc, new Object[] { this.clientJarOutputDir });
+			}
+
+			appc.setForceGeneration( this.forceGeneration );
             appc.setLineNumbers( this.lineNumbers );
+            appc.setContinueCompilation( this.continueCompilation );
 
             Project antProject = new Project();
             antProject.setName( "appc" );
@@ -221,6 +247,16 @@
     }
 
     /**
+     * Setter for the path to place the client jar.
+     *
+     * @param clientJarOutputDir The path to place the client jar.
+     */
+    public void setClientJarOutputDir( final String clientJarOutputDir )
+    {
+        this.clientJarOutputDir = clientJarOutputDir;
+    }
+
+    /**
      * Getter for property force generation.
      *
      * @return The value of force generation.
@@ -330,14 +366,16 @@
         StringBuffer buffer = new StringBuffer();
         buffer.append( "AppcMojo[" );
         buffer.append( "\n basicClientJar = " ).append( basicClientJar );
+        buffer.append( "\n clientJarOutputDir = " ).append( clientJarOutputDir );
         buffer.append( "\n forceGeneration = " ).append( forceGeneration );
         buffer.append( "\n keepGenerated = " ).append( keepGenerated );
         buffer.append( "\n lineNumbers = " ).append( lineNumbers );
         buffer.append( "\n inputArtifactPath = " ).append( inputArtifactPath );
         buffer.append( "\n outputArtifactPath = " ).append( outputArtifactPath );
-        buffer.append( "\n artifacts = " ).append( this.getArtifacts() );
+        buffer.append( "\n artifacts = " ).append( getArtifacts() );
         buffer.append( "\n project Packaging = " ).append( projectPackaging );
         buffer.append( "\n verbose = " ).append( verbose );
+        buffer.append( "\n continueCompilation = " ).append( continueCompilation );
         buffer.append( "]" );
 
         return buffer.toString();
Index: src/main/java/org/codehaus/mojo/weblogic/ClientGen9Mojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/ClientGen9Mojo.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/ClientGen9Mojo.java	(working copy)
@@ -20,9 +20,12 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.Path;
 import org.codehaus.mojo.weblogic.util.WeblogicMojoUtilities;
+import org.codehaus.plexus.util.ReflectionUtils;
+
 import weblogic.wsee.tools.anttasks.ClientGenTask;
 
 import java.io.File;
+import java.lang.reflect.Method;
 
 /**
  * Runs Client Gen on a given WSDL. This client gen uses the BEA refactored client gen tool
@@ -135,9 +138,26 @@
                 .getDependencies( this.getArtifacts(), this.getPluginArtifacts() ) );
             clientGen.setProject( project );
             clientGen.setClasspath( path );
-            clientGen.setOverwrite( true );
+
+			// in WebLogic 10.3 some methods were renamed (e.g. "setDestDir()") or removed (e.g. "setOverwrite()") 			
+            // so we have to use reflection here
+//            clientGen.setOverwrite( true );
+			Method method = ReflectionUtils.getSetter("overwrite", clientGen.getClass());
+			if (method != null) {
+				method.invoke(clientGen, new Object[] { Boolean.TRUE });
+			}
+//            clientGen.setDestdir( new File( this.outputDir ) );
+			method = ReflectionUtils.getSetter("destdir", clientGen.getClass());
+			if (method != null) {
+				method.invoke(clientGen, new Object[] { new File( this.outputDir ) });
+			}
+//            clientGen.setDestDir( new File( this.outputDir ) );
+			method = ReflectionUtils.getSetter("destDir", clientGen.getClass());
+			if (method != null) {
+				method.invoke(clientGen, new Object[] { new File( this.outputDir ) });
+			}
+
             clientGen.setVerbose( this.verbose );
-            clientGen.setDestdir( new File( this.outputDir ) );
             clientGen.setPackageName( this.packageName );
             clientGen.setIncludeGlobalTypes( this.useServerTypes );
             clientGen.setJaxRPCWrappedArrayStyle( this.jaxRPCWrappedArrayStyle );
Index: src/main/java/org/codehaus/mojo/weblogic/ListAppsMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/ListAppsMojo.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/ListAppsMojo.java	(working copy)
@@ -17,8 +17,6 @@
  */
 
 import org.apache.maven.plugin.MojoExecutionException;
-import org.codehaus.mojo.weblogic.util.WeblogicMojoUtilities;
-import weblogic.Deployer;
 
 /**
  * List the atifacts on Weblogic server(s) or cluster(s).
Index: src/main/java/org/codehaus/mojo/weblogic/ReDeployMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/ReDeployMojo.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/ReDeployMojo.java	(working copy)
@@ -17,7 +17,6 @@
  */
 
 import org.apache.maven.plugin.MojoExecutionException;
-import org.codehaus.mojo.weblogic.util.WeblogicMojoUtilities;
 
 /**
  * Redeploy artifact on Weblogic server(s) or cluster(s).
Index: src/main/java/org/codehaus/mojo/weblogic/UnDeployMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/UnDeployMojo.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/UnDeployMojo.java	(working copy)
@@ -18,9 +18,6 @@
 
 import org.apache.maven.plugin.MojoExecutionException;
 
-import org.codehaus.mojo.weblogic.util.WeblogicMojoUtilities;
-import weblogic.Deployer;
-
 /**
  * Undeploy artifacts from Weblogic server(s) or cluster(s).
  * 
Index: src/main/java/org/codehaus/mojo/weblogic/util/WeblogicMojoUtilities.java
===================================================================
--- src/main/java/org/codehaus/mojo/weblogic/util/WeblogicMojoUtilities.java	(revision 10219)
+++ src/main/java/org/codehaus/mojo/weblogic/util/WeblogicMojoUtilities.java	(working copy)
@@ -48,7 +48,7 @@
     {
         if ( "weblogic.utils".equals(System.getProperty("java.protocol.handler.pkgs") ) )
         {
-            System.setProperty( "java.protocol.handler.pkgs", null );
+            System.clearProperty( "java.protocol.handler.pkgs" );
         }
     }
 
