cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r810527 - in /cxf/branches/2.2.x-fixes: ./ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
Date Wed, 02 Sep 2009 14:37:13 GMT
Author: dkulp
Date: Wed Sep  2 14:37:12 2009
New Revision: 810527

URL: http://svn.apache.org/viewvc?rev=810527&view=rev
Log:
Merged revisions 810526 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r810526 | dkulp | 2009-09-02 10:35:46 -0400 (Wed, 02 Sep 2009) | 2 lines
  
  Set eol-style
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
  (contents, props changed)

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  2 14:37:12 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505,797517,797534,797581-797583,797587,797640,797651,797699,797882-797883,798344-798346,798363,798461,798479,798533,798551,798557,798561-798562,798570,798573,79858
 4,798654,798748-798749,798816,798891,798929-798930,799245,799267,799439,799448,799637,799723-799724,799792,800453,800497-800498,801380-801381,801447,801962,802892,803056,803129,803174,803419,803460,803493,803689,804002,804175,804276,805784,805907,805909,806020-806021,806023,806405-806406,806576,806602-806604,806620,806627,806631,806633,806638,806687,806876,806922,806979-806982,807181,807205,807295,807748,807807,808035,808069,808085,808107,808464,808488,808731,808885,808925,809082-809083,809162,809190,809417-809626,809631,809663,809706,809738,809962,810090,810143,810349,810376,810513
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505,797517,797534,797581-797583,797587,797640,797651,797699,797882-797883,798344-798346,798363,798461,798479,798533,798551,798557,798561-798562,798570,798573,79858
 4,798654,798748-798749,798816,798891,798929-798930,799245,799267,799439,799448,799637,799723-799724,799792,800453,800497-800498,801380-801381,801447,801962,802892,803056,803129,803174,803419,803460,803493,803689,804002,804175,804276,805784,805907,805909,806020-806021,806023,806405-806406,806576,806602-806604,806620,806627,806631,806633,806638,806687,806876,806922,806979-806982,807181,807205,807295,807748,807807,808035,808069,808085,808107,808464,808488,808731,808885,808925,809082-809083,809162,809190,809417-809626,809631,809663,809706,809738,809962,810090,810143,810349,810376,810513,810526

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java?rev=810527&r1=810526&r2=810527&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
(original)
+++ cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
Wed Sep  2 14:37:12 2009
@@ -1,122 +1,122 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.maven_plugin;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Manages switching to the classloader needed for creating the java sources and restoring
the old classloader
- * when finished
- */
-public class ClassLoaderSwitcher {
-
-    private Log log;
-    private String origClassPath;
-    private Map<Object, Object> origProps;
-    private ClassLoader origContextClassloader;
-
-    public ClassLoaderSwitcher(Log log) {
-        this.log = log;
-    }
-
-    /**
-     * Create and set the classloader that is needed for creating the java sources from wsdl
-     * 
-     * @param project
-     * @param useCompileClasspath
-     * @param classesDir
-     */
-    public void switchClassLoader(MavenProject project, boolean useCompileClasspath, File
classesDir) {
-        List<URL> urlList = new ArrayList<URL>();
-        StringBuffer buf = new StringBuffer();
-
-        try {
-            urlList.add(classesDir.toURI().toURL());
-            if (!useCompileClasspath) {
-                urlList.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
-            }
-        } catch (MalformedURLException e) {
-            // ignore
-        }
-
-        buf.append(classesDir.getAbsolutePath());
-        buf.append(File.pathSeparatorChar);
-        if (!useCompileClasspath) {
-            buf.append(project.getBuild().getOutputDirectory());
-            buf.append(File.pathSeparatorChar);
-        }
-        List<?> artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
-        for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
-            try {
-                if (a.getFile() != null && a.getFile().exists()) {
-                    urlList.add(a.getFile().toURI().toURL());
-                    buf.append(a.getFile().getAbsolutePath());
-                    buf.append(File.pathSeparatorChar);
-                    // System.out.println("     " +
-                    // a.getFile().getAbsolutePath());
-                }
-            } catch (MalformedURLException e) {
-                // ignore
-            }
-        }
-
-        origContextClassloader = Thread.currentThread().getContextClassLoader();
-        URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
-                                                   origContextClassloader);
-        String newCp = buf.toString();
-
-        log.debug("Classpath: " + urlList.toString());
-
-        origProps = new HashMap<Object, Object>(System.getProperties());
-
-        origClassPath = System.getProperty("java.class.path");
-
-        Thread.currentThread().setContextClassLoader(loader);
-        System.setProperty("java.class.path", newCp);
-    }
-
-    /**
-     * Restore the old classloader
-     */
-    public void restoreClassLoader() {
-        Thread.currentThread().setContextClassLoader(origContextClassloader);
-        System.setProperty("java.class.path", origClassPath);
-
-        Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
-        for (Object o : newProps.keySet()) {
-            if (!origProps.containsKey(o)) {
-                System.clearProperty(o.toString());
-            }
-        }
-        System.getProperties().putAll(origProps);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.maven_plugin;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Manages switching to the classloader needed for creating the java sources and restoring
the old classloader
+ * when finished
+ */
+public class ClassLoaderSwitcher {
+
+    private Log log;
+    private String origClassPath;
+    private Map<Object, Object> origProps;
+    private ClassLoader origContextClassloader;
+
+    public ClassLoaderSwitcher(Log log) {
+        this.log = log;
+    }
+
+    /**
+     * Create and set the classloader that is needed for creating the java sources from wsdl
+     * 
+     * @param project
+     * @param useCompileClasspath
+     * @param classesDir
+     */
+    public void switchClassLoader(MavenProject project, boolean useCompileClasspath, File
classesDir) {
+        List<URL> urlList = new ArrayList<URL>();
+        StringBuffer buf = new StringBuffer();
+
+        try {
+            urlList.add(classesDir.toURI().toURL());
+            if (!useCompileClasspath) {
+                urlList.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
+            }
+        } catch (MalformedURLException e) {
+            // ignore
+        }
+
+        buf.append(classesDir.getAbsolutePath());
+        buf.append(File.pathSeparatorChar);
+        if (!useCompileClasspath) {
+            buf.append(project.getBuild().getOutputDirectory());
+            buf.append(File.pathSeparatorChar);
+        }
+        List<?> artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
+        for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
+            try {
+                if (a.getFile() != null && a.getFile().exists()) {
+                    urlList.add(a.getFile().toURI().toURL());
+                    buf.append(a.getFile().getAbsolutePath());
+                    buf.append(File.pathSeparatorChar);
+                    // System.out.println("     " +
+                    // a.getFile().getAbsolutePath());
+                }
+            } catch (MalformedURLException e) {
+                // ignore
+            }
+        }
+
+        origContextClassloader = Thread.currentThread().getContextClassLoader();
+        URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+                                                   origContextClassloader);
+        String newCp = buf.toString();
+
+        log.debug("Classpath: " + urlList.toString());
+
+        origProps = new HashMap<Object, Object>(System.getProperties());
+
+        origClassPath = System.getProperty("java.class.path");
+
+        Thread.currentThread().setContextClassLoader(loader);
+        System.setProperty("java.class.path", newCp);
+    }
+
+    /**
+     * Restore the old classloader
+     */
+    public void restoreClassLoader() {
+        Thread.currentThread().setContextClassLoader(origContextClassloader);
+        System.setProperty("java.class.path", origClassPath);
+
+        Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
+        for (Object o : newProps.keySet()) {
+            if (!origProps.containsKey(o)) {
+                System.clearProperty(o.toString());
+            }
+        }
+        System.getProperties().putAll(origProps);
+    }
+}

Propchange: cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message