servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [2/2] servicemix-bundles git commit: [SM-2541]add TCCL into SwaggerContext classloaders
Date Tue, 05 May 2015 10:28:21 GMT
[SM-2541]add TCCL into SwaggerContext classloaders


Project: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/commit/046ed2ba
Tree: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/tree/046ed2ba
Diff: http://git-wip-us.apache.org/repos/asf/servicemix-bundles/diff/046ed2ba

Branch: refs/heads/master
Commit: 046ed2ba3b73768f45e97fc4562fe622e210ec70
Parents: a376180
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Tue May 5 18:24:49 2015 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Tue May 5 18:24:49 2015 +0800

----------------------------------------------------------------------
 pom.xml                                         |  5 +++
 swagger-core-1.3.10/pom.xml                     | 23 +++++++++++++-
 .../wordnik/swagger/core/SwaggerContext.scala   | 33 ++++++++++++++++++++
 swagger-core-1.3.11/pom.xml                     | 23 +++++++++++++-
 .../wordnik/swagger/core/SwaggerContext.scala   | 33 ++++++++++++++++++++
 swagger-core-1.3.12/pom.xml                     | 23 +++++++++++++-
 .../wordnik/swagger/core/SwaggerContext.scala   | 33 ++++++++++++++++++++
 swagger-core-1.3.7/pom.xml                      | 23 +++++++++++++-
 .../wordnik/swagger/core/SwaggerContext.scala   | 33 ++++++++++++++++++++
 swagger-core-1.3.8/pom.xml                      | 23 +++++++++++++-
 .../wordnik/swagger/core/SwaggerContext.scala   | 33 ++++++++++++++++++++
 11 files changed, 280 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 09ec3bb..8f7ce7d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,11 @@
         <module>swagger-core-1.3.2</module>
         <module>swagger-core-1.3.4</module>
         <module>swagger-core-1.3.5</module>
+        <module>swagger-core-1.3.7</module>
+        <module>swagger-core-1.3.8</module>
+        <module>swagger-core-1.3.10</module>
+        <module>swagger-core-1.3.11</module>
+        <module>swagger-core-1.3.12</module>
     </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.10/pom.xml
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.10/pom.xml b/swagger-core-1.3.10/pom.xml
index f808469..9194e42 100644
--- a/swagger-core-1.3.10/pom.xml
+++ b/swagger-core-1.3.10/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>bundles-pom</artifactId>
-        <version>11</version>
+        <version>12</version>
         <relativePath>../bundles-pom/pom.xml</relativePath>
     </parent>
 
@@ -80,6 +80,27 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>scala-test-compile</id>
+                            <phase>process-test-resources</phase>
+                            <goals>
+                                <goal>testCompile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <executions>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.10/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.10/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
b/swagger-core-1.3.10/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
new file mode 100644
index 0000000..0924949
--- /dev/null
+++ b/swagger-core-1.3.10/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
@@ -0,0 +1,33 @@
+package com.wordnik.swagger.core
+
+import collection.mutable.ListBuffer
+import org.slf4j.{ LoggerFactory, Logger }
+
+object SwaggerContext {
+  private val LOGGER = LoggerFactory.getLogger("com.wordnik.swagger.core.SwaggerContext")
+
+  var suffixResponseFormat = true
+
+  private val classLoaders = ListBuffer.empty[ClassLoader]
+  registerClassLoader(this.getClass.getClassLoader)
+  registerClassLoader(Thread.currentThread().getContextClassLoader())
+
+  def registerClassLoader(cl: ClassLoader) = this.classLoaders += cl
+
+  def loadClass(name: String) = {
+    var cls: Class[_] = null
+    val itr = classLoaders.reverse.iterator
+    while (cls == null && itr.hasNext) {
+      try {
+        cls = Class.forName(name.trim, true, itr.next)
+      } catch {
+        case e: ClassNotFoundException => {
+          LOGGER.debug("Class %s not found in classLoader".format(name))
+        }
+      }
+    }
+    if (cls == null)
+      throw new ClassNotFoundException("class " + name + " not found")
+    cls
+  }
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.11/pom.xml
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.11/pom.xml b/swagger-core-1.3.11/pom.xml
index 1eb5f1d..4238779 100644
--- a/swagger-core-1.3.11/pom.xml
+++ b/swagger-core-1.3.11/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>bundles-pom</artifactId>
-        <version>11</version>
+        <version>12</version>
         <relativePath>../bundles-pom/pom.xml</relativePath>
     </parent>
 
@@ -80,6 +80,27 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>scala-test-compile</id>
+                            <phase>process-test-resources</phase>
+                            <goals>
+                                <goal>testCompile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <executions>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.11/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.11/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
b/swagger-core-1.3.11/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
new file mode 100644
index 0000000..0924949
--- /dev/null
+++ b/swagger-core-1.3.11/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
@@ -0,0 +1,33 @@
+package com.wordnik.swagger.core
+
+import collection.mutable.ListBuffer
+import org.slf4j.{ LoggerFactory, Logger }
+
+object SwaggerContext {
+  private val LOGGER = LoggerFactory.getLogger("com.wordnik.swagger.core.SwaggerContext")
+
+  var suffixResponseFormat = true
+
+  private val classLoaders = ListBuffer.empty[ClassLoader]
+  registerClassLoader(this.getClass.getClassLoader)
+  registerClassLoader(Thread.currentThread().getContextClassLoader())
+
+  def registerClassLoader(cl: ClassLoader) = this.classLoaders += cl
+
+  def loadClass(name: String) = {
+    var cls: Class[_] = null
+    val itr = classLoaders.reverse.iterator
+    while (cls == null && itr.hasNext) {
+      try {
+        cls = Class.forName(name.trim, true, itr.next)
+      } catch {
+        case e: ClassNotFoundException => {
+          LOGGER.debug("Class %s not found in classLoader".format(name))
+        }
+      }
+    }
+    if (cls == null)
+      throw new ClassNotFoundException("class " + name + " not found")
+    cls
+  }
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.12/pom.xml
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.12/pom.xml b/swagger-core-1.3.12/pom.xml
index a78333d..c4b4cab 100644
--- a/swagger-core-1.3.12/pom.xml
+++ b/swagger-core-1.3.12/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>bundles-pom</artifactId>
-        <version>11</version>
+        <version>12</version>
         <relativePath>../bundles-pom/pom.xml</relativePath>
     </parent>
 
@@ -80,6 +80,27 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>scala-test-compile</id>
+                            <phase>process-test-resources</phase>
+                            <goals>
+                                <goal>testCompile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <executions>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.12/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.12/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
b/swagger-core-1.3.12/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
new file mode 100644
index 0000000..0924949
--- /dev/null
+++ b/swagger-core-1.3.12/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
@@ -0,0 +1,33 @@
+package com.wordnik.swagger.core
+
+import collection.mutable.ListBuffer
+import org.slf4j.{ LoggerFactory, Logger }
+
+object SwaggerContext {
+  private val LOGGER = LoggerFactory.getLogger("com.wordnik.swagger.core.SwaggerContext")
+
+  var suffixResponseFormat = true
+
+  private val classLoaders = ListBuffer.empty[ClassLoader]
+  registerClassLoader(this.getClass.getClassLoader)
+  registerClassLoader(Thread.currentThread().getContextClassLoader())
+
+  def registerClassLoader(cl: ClassLoader) = this.classLoaders += cl
+
+  def loadClass(name: String) = {
+    var cls: Class[_] = null
+    val itr = classLoaders.reverse.iterator
+    while (cls == null && itr.hasNext) {
+      try {
+        cls = Class.forName(name.trim, true, itr.next)
+      } catch {
+        case e: ClassNotFoundException => {
+          LOGGER.debug("Class %s not found in classLoader".format(name))
+        }
+      }
+    }
+    if (cls == null)
+      throw new ClassNotFoundException("class " + name + " not found")
+    cls
+  }
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.7/pom.xml
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.7/pom.xml b/swagger-core-1.3.7/pom.xml
index 5fa4bf7..664d305 100644
--- a/swagger-core-1.3.7/pom.xml
+++ b/swagger-core-1.3.7/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>bundles-pom</artifactId>
-        <version>11</version>
+        <version>12</version>
         <relativePath>../bundles-pom/pom.xml</relativePath>
     </parent>
 
@@ -80,6 +80,27 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>scala-test-compile</id>
+                            <phase>process-test-resources</phase>
+                            <goals>
+                                <goal>testCompile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <executions>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.7/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.7/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
b/swagger-core-1.3.7/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
new file mode 100644
index 0000000..0924949
--- /dev/null
+++ b/swagger-core-1.3.7/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
@@ -0,0 +1,33 @@
+package com.wordnik.swagger.core
+
+import collection.mutable.ListBuffer
+import org.slf4j.{ LoggerFactory, Logger }
+
+object SwaggerContext {
+  private val LOGGER = LoggerFactory.getLogger("com.wordnik.swagger.core.SwaggerContext")
+
+  var suffixResponseFormat = true
+
+  private val classLoaders = ListBuffer.empty[ClassLoader]
+  registerClassLoader(this.getClass.getClassLoader)
+  registerClassLoader(Thread.currentThread().getContextClassLoader())
+
+  def registerClassLoader(cl: ClassLoader) = this.classLoaders += cl
+
+  def loadClass(name: String) = {
+    var cls: Class[_] = null
+    val itr = classLoaders.reverse.iterator
+    while (cls == null && itr.hasNext) {
+      try {
+        cls = Class.forName(name.trim, true, itr.next)
+      } catch {
+        case e: ClassNotFoundException => {
+          LOGGER.debug("Class %s not found in classLoader".format(name))
+        }
+      }
+    }
+    if (cls == null)
+      throw new ClassNotFoundException("class " + name + " not found")
+    cls
+  }
+}

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.8/pom.xml
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.8/pom.xml b/swagger-core-1.3.8/pom.xml
index 022a32e..9e1245b 100644
--- a/swagger-core-1.3.8/pom.xml
+++ b/swagger-core-1.3.8/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>bundles-pom</artifactId>
-        <version>11</version>
+        <version>12</version>
         <relativePath>../bundles-pom/pom.xml</relativePath>
     </parent>
 
@@ -80,6 +80,27 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>scala-test-compile</id>
+                            <phase>process-test-resources</phase>
+                            <goals>
+                                <goal>testCompile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <executions>

http://git-wip-us.apache.org/repos/asf/servicemix-bundles/blob/046ed2ba/swagger-core-1.3.8/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
----------------------------------------------------------------------
diff --git a/swagger-core-1.3.8/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
b/swagger-core-1.3.8/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
new file mode 100644
index 0000000..0924949
--- /dev/null
+++ b/swagger-core-1.3.8/src/main/scala/com/wordnik/swagger/core/SwaggerContext.scala
@@ -0,0 +1,33 @@
+package com.wordnik.swagger.core
+
+import collection.mutable.ListBuffer
+import org.slf4j.{ LoggerFactory, Logger }
+
+object SwaggerContext {
+  private val LOGGER = LoggerFactory.getLogger("com.wordnik.swagger.core.SwaggerContext")
+
+  var suffixResponseFormat = true
+
+  private val classLoaders = ListBuffer.empty[ClassLoader]
+  registerClassLoader(this.getClass.getClassLoader)
+  registerClassLoader(Thread.currentThread().getContextClassLoader())
+
+  def registerClassLoader(cl: ClassLoader) = this.classLoaders += cl
+
+  def loadClass(name: String) = {
+    var cls: Class[_] = null
+    val itr = classLoaders.reverse.iterator
+    while (cls == null && itr.hasNext) {
+      try {
+        cls = Class.forName(name.trim, true, itr.next)
+      } catch {
+        case e: ClassNotFoundException => {
+          LOGGER.debug("Class %s not found in classLoader".format(name))
+        }
+      }
+    }
+    if (cls == null)
+      throw new ClassNotFoundException("class " + name + " not found")
+    cls
+  }
+}


Mime
View raw message