在 Eclipse 中,当我在构建脚本下运行以能够从 .jrxml获取 .jasper 文件时,我收到以下错误:
build.xml:16: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
构建.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="jasperreports" default="compile" basedir=".">
<path id="classpath">
<pathelement location="."/>
<fileset dir="lib" erroronmissingdir="false">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="compile">
<taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask">
<classpath refid="classpath"/>
</taskdef>
<jrc
destdir="reports"
tempdir="reports"
keepjava="false">
<src>
<fileset dir="reports">
<include name="**/*.jrxml"/>
</fileset>
</src>
<classpath refid="classpath"/>
</jrc>
</target>
</project>