When using inheritance ebean needs to search for classes, sometimes such classes are located in other modules and thus can not be found within the output path of the "current" module. (dependency)
A "classpath" argument for ebeanEnhance would be great for this.
classSource="${project.build.outputDirectory}" packages="com.ops.Premium.model.po.**" transformArgs="debug=0" />
Index: ../opsxcited_3rdpary/ebean/ant/src/main/java/com/avaje/ebean/enhance/ant/AntEnhanceTask.java===================================================================--- ../opsxcited_3rdpary/ebean/ant/src/main/java/com/avaje/ebean/enhance/ant/AntEnhanceTask.java (revision 362)+++ ../opsxcited_3rdpary/ebean/ant/src/main/java/com/avaje/ebean/enhance/ant/AntEnhanceTask.java Sat Sep 19 14:23:23 CEST 2009@@ -44,6 +43,8 @@ */ public class AntEnhanceTask extends Task { + String classpath;+ String classSource; String classDestination;@@ -57,8 +58,18 @@ File f = new File(""); System.out.println("Current Directory: "+f.getAbsolutePath());- +- Transformer t = new Transformer(classSource, transformArgs);+ StringBuilder extraClassPath = new StringBuilder();+ extraClassPath.append(classSource);+ if (classpath != null)+ {+ if (!extraClassPath.toString().endsWith(";"))+ {+ extraClassPath.append(";");+ }+ extraClassPath.append(classpath);+ }+ Transformer t = new Transformer(extraClassPath.toString(), transformArgs); ClassLoader cl = AntEnhanceTask.class.getClassLoader(); OfflineFileTransform ft = new OfflineFileTransform(t, cl, classSource, classDestination);@@ -67,6 +78,20 @@ } /**+ * the classpath used to search for e.g. inerited classes+ */+ public String getClasspath() {+ return classpath;+ }++ /**+ * the classpath used to search for e.g. inerited classes+ */+ public void setClasspath(String classpath) {+ this.classpath = classpath;+ }++ /** * Set the directory holding the class files we want to transform. */ public void setClassSource(String source) {
to ebean head.
Rob, if you are fine with it, please close this issue.