Ant工具build本地的一个struts2工程报错,找不到ActionSupport类,求大神帮忙!!
本地搭建的struts2工程,在eclipse里边tomcat编译运行都没问题,系统可以正常使用,现在想用Ant工具编译一下生成个war包然后部署到远程服务器上,但是bu...
本地搭建的struts2工程,在eclipse里边tomcat编译运行都没问题,系统可以正常使用,现在想用Ant工具编译一下生成个war包然后部署到远程服务器上,但是build的时候竟然报错说找不到struts2的核心类ActionSupport,难道我build的时候需要指定lib库地址?下面是报错信息:
然后下边是build.xml的配置文件,大神看下我是否需要更改一下这个配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="WebStarterApp"> <property environment="env"/> <property name="srcDir" value="."/> <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.5"/> <property name="source" value="1.5"/> <condition property="ARCHIVE_DIR" value="${env.ARCHIVE_DIR}" else="."> <isset property="env.ARCHIVE_DIR" /> </condition> <property name="warname" value= "webStarterApp.war"/> <path id="classpathDir"> <pathelement location="bin"/> <pathelement location="dep-jar/com.ibm.ws.javaee.jaxrs.1.1_1.0.1.jar"/> </path> <target name="init"> <mkdir dir="bin"/> </target> <target name="clean"> <delete dir="bin"/> <delete file="${ARCHIVE_DIR}/${warname}" /> </target> <target name="build" depends="build-project,build-war"/> <target name="cleanall" depends="clean"/> <target name="build-project" depends="clean,init"> <copy todir="${ARCHIVE_DIR}"> <fileset file="manifest.yml" /> </copy> <echo message="${ant.project.name}: ${ant.file}"/> <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false"> <src path="src"/> <classpath refid="classpathDir"/> </javac> </target> <target name="build-war" depends="build-project"> <war destfile="${ARCHIVE_DIR}/${warname}" webxml="WebContent/WEB-INF/web.xml"> <webinf dir="WebContent/WEB-INF"> <include name="resources"/> </webinf> <fileset dir="WebContent"> <include name="**/*"/> </fileset> <classes dir="bin"/> </war> </target>
</project> 展开
然后下边是build.xml的配置文件,大神看下我是否需要更改一下这个配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="WebStarterApp"> <property environment="env"/> <property name="srcDir" value="."/> <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.5"/> <property name="source" value="1.5"/> <condition property="ARCHIVE_DIR" value="${env.ARCHIVE_DIR}" else="."> <isset property="env.ARCHIVE_DIR" /> </condition> <property name="warname" value= "webStarterApp.war"/> <path id="classpathDir"> <pathelement location="bin"/> <pathelement location="dep-jar/com.ibm.ws.javaee.jaxrs.1.1_1.0.1.jar"/> </path> <target name="init"> <mkdir dir="bin"/> </target> <target name="clean"> <delete dir="bin"/> <delete file="${ARCHIVE_DIR}/${warname}" /> </target> <target name="build" depends="build-project,build-war"/> <target name="cleanall" depends="clean"/> <target name="build-project" depends="clean,init"> <copy todir="${ARCHIVE_DIR}"> <fileset file="manifest.yml" /> </copy> <echo message="${ant.project.name}: ${ant.file}"/> <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false"> <src path="src"/> <classpath refid="classpathDir"/> </javac> </target> <target name="build-war" depends="build-project"> <war destfile="${ARCHIVE_DIR}/${warname}" webxml="WebContent/WEB-INF/web.xml"> <webinf dir="WebContent/WEB-INF"> <include name="resources"/> </webinf> <fileset dir="WebContent"> <include name="**/*"/> </fileset> <classes dir="bin"/> </war> </target>
</project> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询