diff --git a/piflow-bundle/pom.xml b/piflow-bundle/pom.xml
index dabffed..c6ac358 100644
--- a/piflow-bundle/pom.xml
+++ b/piflow-bundle/pom.xml
@@ -81,6 +81,11 @@
piflow-core
0.9
+
+ piflow
+ piflow-configure
+ 0.9
+
org.clapper
diff --git a/piflow-configure/pom.xml b/piflow-configure/pom.xml
new file mode 100644
index 0000000..2c910c7
--- /dev/null
+++ b/piflow-configure/pom.xml
@@ -0,0 +1,70 @@
+
+
+
+ piflow-project
+ piflow
+ 0.9
+
+ 4.0.0
+
+ piflow-configure
+
+
+
+ piflow
+ piflow-core
+ 0.9
+
+
+
+ org.clapper
+ classutil_2.11
+ 1.3.0
+
+
+
+ org.reflections
+ reflections
+ 0.9.9
+
+
+
+ com.chuusai
+ shapeless_2.11
+ 2.3.1
+
+
+
+ com.sksamuel.scrimage
+ scrimage-core_2.11
+ 2.1.7
+
+
+
+ com.sksamuel.scrimage
+ scrimage-io-extra_2.11
+ 2.1.7
+
+
+
+ com.sksamuel.scrimage
+ scrimage-filters_2.11
+ 2.1.7
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.25
+
+
+
+ net.liftweb
+ lift-json_2.11
+ 2.6.1
+
+
+
+
\ No newline at end of file
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableIncrementalStop.scala b/piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableIncrementalStop.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableIncrementalStop.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableIncrementalStop.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableStop.scala b/piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableStop.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableStop.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableStop.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableStreamingStop.scala b/piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableStreamingStop.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/ConfigurableStreamingStop.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/ConfigurableStreamingStop.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/Port.scala b/piflow-configure/src/main/scala/cn/piflow/conf/Port.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/Port.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/Port.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/StopGroup.scala b/piflow-configure/src/main/scala/cn/piflow/conf/StopGroup.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/StopGroup.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/StopGroup.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/ConditionBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/ConditionBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/ConditionBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/ConditionBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/FlowBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/FlowBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/FlowBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/FlowBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/GroupBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/GroupBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/GroupBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/GroupBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/GroupEntryBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/GroupEntryBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/GroupEntryBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/GroupEntryBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/PathBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/PathBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/PathBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/PathBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/PropertyDescriptor.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/PropertyDescriptor.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/PropertyDescriptor.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/PropertyDescriptor.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/bean/StopBean.scala b/piflow-configure/src/main/scala/cn/piflow/conf/bean/StopBean.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/bean/StopBean.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/bean/StopBean.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/util/ClassUtil.scala b/piflow-configure/src/main/scala/cn/piflow/conf/util/ClassUtil.scala
similarity index 85%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/util/ClassUtil.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/util/ClassUtil.scala
index ef41c7a..27db652 100644
--- a/piflow-bundle/src/main/scala/cn/piflow/conf/util/ClassUtil.scala
+++ b/piflow-configure/src/main/scala/cn/piflow/conf/util/ClassUtil.scala
@@ -1,6 +1,7 @@
package cn.piflow.conf.util
import java.io.File
+import java.net.URLClassLoader
import cn.piflow.conf.ConfigurableStop
import cn.piflow.conf.bean.PropertyDescriptor
@@ -9,12 +10,15 @@ import org.clapper.classutil.ClassFinder
import org.reflections.Reflections
import net.liftweb.json.JsonDSL._
import sun.misc.BASE64Encoder
+
import util.control.Breaks._
object ClassUtil {
- val configurableStopClass:String = "cn.piflow.conf.ConfigurableStop"
+ val configurableStopClass:String = "ConfigurableStop"
+ val configurableStreamingStop:String = "ConfigurableStreamingStop"
+ val configurableIncrementalStop:String = "ConfigurableIncrementalStop"
//val classpath:String = "/opt/project/piflow/classpath"
/*def findAllConfigurableStopByClassFinder() : List[String] = {
@@ -46,6 +50,7 @@ object ClassUtil {
val reflections = new Reflections("")
val allClasses = reflections.getSubTypesOf(classOf[ConfigurableStop])
val it = allClasses.iterator();
+ var count = 0
while(it.hasNext) {
breakable{
@@ -69,8 +74,9 @@ object ClassUtil {
}
- private def findAllConfigurableStopInClasspath() : List[ConfigurableStop] = {
+ def findAllConfigurableStopInClasspath() : List[ConfigurableStop] = {
+ //val classLoader = ClassUtil.getClass.getClassLoader
val classpath = System.getProperty("user.dir")+ "/classpath/"
var stopList:List[ConfigurableStop] = List()
@@ -84,10 +90,16 @@ object ClassUtil {
while(it.hasNext) {
val externalClass = it.next()
- if(externalClass.superClassName.equals(configurableStopClass)){
- val stopIntance = Class.forName(externalClass.name).newInstance()
- stopList = stopIntance.asInstanceOf[ConfigurableStop] +: stopList
+ if(externalClass.superClassName.equals(configurableStopClass) &&
+ !externalClass.name.equals(configurableStreamingStop) &&
+ !externalClass.name.equals(configurableIncrementalStop)){
+
+ val classpath = System.getProperty("user.dir")+ "/classpath/NSFC.jar"
+ var classLoader = new URLClassLoader(Array(new File(classpath).toURI.toURL),this.getClass.getClassLoader )
+ val stopInstance = classLoader.loadClass(externalClass.name).newInstance()
+ //val stopInstance = Class.forName(externalClass.name).newInstance()
+ stopList = stopInstance.asInstanceOf[ConfigurableStop] +: stopList
}
}
}
@@ -221,6 +233,12 @@ object ClassUtil {
}
+ /*def getExterClassInJar() : List[ConfigurableStop] = {
+ val classpath = System.getProperty("user.dir")+ "/classpath/NSFC.jar"
+ var classLoader = new URLClassLoader(Array(new File(classpath).toURI.toURL),this.getClass.getClassLoader )
+
+ }*/
+
def main(args: Array[String]): Unit = {
//val stop = findConfigurableStop("cn.piflow.bundle.Class1")
//val allConfigurableStopList = findAllConfigurableStop()
@@ -232,8 +250,9 @@ object ClassUtil {
val str = propertyJsonList.mkString(start, ",", end)
println(str)*/
- val stop = findAllConfigurableStop()
- stop.foreach(s => println(s.getClass.getName))
+ //val stop = findAllConfigurableStop()
+ //stop.foreach(s => println(s.getClass.getName))
+ val stopListInClassPath = findAllConfigurableStopInClasspath()
val temp = 1
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/util/FileUtil.scala b/piflow-configure/src/main/scala/cn/piflow/conf/util/FileUtil.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/util/FileUtil.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/util/FileUtil.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/util/ImageUtil.scala b/piflow-configure/src/main/scala/cn/piflow/conf/util/ImageUtil.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/util/ImageUtil.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/util/ImageUtil.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/util/MapUtil.scala b/piflow-configure/src/main/scala/cn/piflow/conf/util/MapUtil.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/util/MapUtil.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/util/MapUtil.scala
diff --git a/piflow-bundle/src/main/scala/cn/piflow/conf/util/OptionUtil.scala b/piflow-configure/src/main/scala/cn/piflow/conf/util/OptionUtil.scala
similarity index 100%
rename from piflow-bundle/src/main/scala/cn/piflow/conf/util/OptionUtil.scala
rename to piflow-configure/src/main/scala/cn/piflow/conf/util/OptionUtil.scala
diff --git a/piflow-server/pom.xml b/piflow-server/pom.xml
index ea7971c..cf4073b 100644
--- a/piflow-server/pom.xml
+++ b/piflow-server/pom.xml
@@ -25,6 +25,12 @@
0.9
+
+ piflow
+ piflow-configure
+ 0.9
+
+
piflow
piflow-bundle
diff --git a/pom.xml b/pom.xml
index ffd5572..b2323fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -198,5 +198,6 @@
piflow-bundle
piflow-server
+ piflow-configure
\ No newline at end of file