Вопрос

I am using Groovy's AntBuilder to build a Java project. An error is occurring where classes are missing that really look like they should be included. I want to print out every JAR/WAR that's included in the following classpath closure, but I can't figure out how to do that. Every time I've tried to display the contents of classpath, it shows up as null. Any ideas on how to do this?

For reference, here's the java build task and the classpath. This occurs within a new AntBuilder().with { } closure.

javac srcdir: sourceDir, destdir: destDir, debug: true, target: 1.6, fork: true, executable: getCompiler(), {
   classpath {
      libDirs.each { dir -> fileset dir: dir, includes: "*.jar,*.war"   }
      websphereLib.each { dir -> fileset dir: dir, includes: "*.jar*" }
      if (springLib.exists()) { fileset dir: springLib, includes: "*.jar*" }
      was_plugins_compile.each { pathelement location: was_plugins_dir + it }
      if (webinf.exists()) { fileset dir: webinf, includes: "*.jar" }         
      if (webinfclasses.exists()) { pathelement location: webinfclasses }
   }
}

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top