cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r678028 - in /cxf/trunk: maven-plugins/java2ws-plugin/pom.xml maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
Date Fri, 18 Jul 2008 20:32:53 GMT
Author: dkulp
Date: Fri Jul 18 13:32:52 2008
New Revision: 678028

URL: http://svn.apache.org/viewvc?rev=678028&view=rev
Log:
[CXF-1707] Remove use of security manager in the plugin (matches the wsdl2java mojo now)

Modified:
    cxf/trunk/maven-plugins/java2ws-plugin/pom.xml
    cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
    cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java

Modified: cxf/trunk/maven-plugins/java2ws-plugin/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/java2ws-plugin/pom.xml?rev=678028&r1=678027&r2=678028&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/java2ws-plugin/pom.xml (original)
+++ cxf/trunk/maven-plugins/java2ws-plugin/pom.xml Fri Jul 18 13:32:52 2008
@@ -87,14 +87,6 @@
             <version>${project.version}</version>
         </dependency>
                      
-        <dependency>
-            <groupId>ant</groupId>
-            <artifactId>ant</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>ant</groupId>
-            <artifactId>ant-nodeps</artifactId>
-        </dependency>
     </dependencies>
 
     <scm>
@@ -102,4 +94,4 @@
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/trunk/maven-plugins/java2ws-plugin</developerConnection>
     </scm>
 
-</project>
\ No newline at end of file
+</project>

Modified: cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java?rev=678028&r1=678027&r2=678028&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
(original)
+++ cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java
Fri Jul 18 13:32:52 2008
@@ -25,12 +25,11 @@
 import java.util.StringTokenizer;
 
 import org.apache.cxf.helpers.FileUtils;
+import org.apache.cxf.tools.common.CommandInterfaceUtils;
 import org.apache.cxf.tools.java2ws.JavaToWS;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
-import org.apache.tools.ant.ExitException;
-import org.apache.tools.ant.util.optional.NoExitSecurityManager;
 
 /**
  * @goal java2ws
@@ -131,13 +130,10 @@
         }
         String newCp = buf.toString();
         String cp = System.getProperty("java.class.path");
-        SecurityManager oldSm = System.getSecurityManager();
         try {
             System.setProperty("java.class.path", newCp);
-            System.setSecurityManager(new NoExitSecurityManager());
             processJavaClass();
         } finally {
-            System.setSecurityManager(oldSm);
             System.setProperty("java.class.path", cp);
         }
 
@@ -245,17 +241,9 @@
         args.add(className);
 
         try {
-            String exitOnFinish = System.getProperty("exitOnFinish", "");
-            try {
-                System.setProperty("exitOnFinish", "YES");
-                JavaToWS.main(args.toArray(new String[args.size()]));
-            } catch (ExitException e) {
-                if (e.getStatus() != 0) {
-                    throw e;
-                }
-            } finally {
-                System.setProperty("exitOnFinish", exitOnFinish);
-            }
+            CommandInterfaceUtils.commandCommonMain();
+            JavaToWS j2w = new JavaToWS(args.toArray(new String[args.size()]));
+            j2w.run();
         } catch (Throwable e) {
             getLog().debug(e);
             throw new MojoExecutionException(e.getMessage(), e);

Modified: cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java?rev=678028&r1=678027&r2=678028&view=diff
==============================================================================
--- cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java (original)
+++ cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWS.java Fri
Jul 18 13:32:52 2008
@@ -72,7 +72,7 @@
         return false;
     }
 
-    private void run() throws Exception {
+    public void run() throws Exception {
         ToolRunner.runTool(JavaToWSContainer.class, JavaToWSContainer.class
                            .getResourceAsStream("java2ws.xml"), false, args);      
     }



Mime
View raw message