ant 打包问题

masterGr 2011-06-13 09:47:50
直接myeclipse ant出现:
Buildfile: F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build.xml
clean:
[delete] Deleting directory F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build
init:
[mkdir] Created dir: F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build
compile:
[mkdir] Created dir: F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build\WEB-INF\classes
[javac] Compiling 2 source files to F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build\WEB-INF\classes

BUILD FAILED
F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build.xml:69: F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\lib_external not found.

Total time: 235 milliseconds

build.xml:
<?xml version="1.0"?>


<!-- ======================================================================
Date: January 2010

Project: Struts 2 Basic Application

Author: Bruce Phillips
====================================================================== -->



<project name="Basic_Struts2_Ant" default="archive" basedir=".">

<description>
Basic Struts 2 Java Web Application
</description>

<property file="build.properties"/>



<!-- ==================== Clean Target ==================================== -->

<!--
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
-->
<target name="clean" description="Delete old build and dist directories">
<delete dir="${dist.home}"/>
<delete dir="${build.home}"/>
</target>

<!-- ==================== Init Target ================================== -->

<!--

The "init" target is used to create the "build" destination directory,
Normally, this task is executed indirectly when needed.

-->
<target name="init" depends="clean" description="Create build directory">

<mkdir dir="${build.home}" />

</target>

<!-- ==================== Compile Target ================================== -->

<!--

The "compile" target transforms source files (from your "src" directory)
into class files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".

-->
<target name="compile" depends="init" description="Compile Java sources">


<mkdir dir="${build.home}/WEB-INF/classes" />

<javac srcdir="${source.home}"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
source="1.6" target="1.6">

<classpath>
<path>
<fileset dir="${lib.home}" />
<fileset dir="${lib.external}" />
</path>
</classpath>

</javac>

</target>

<!-- ==================== Build Target ================================== -->

<!--

The "build" target copies all non class files to build directory

-->

<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
<copy todir="${build.home}">
<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
</copy>
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${source.home}" excludes="CVS,**/*.java" />
</copy>
</target>

<!-- ==================== Archive Target ================================== -->

<!--

The "archive" target create a binary archive of all files in build.home

-->

<target name="archive" depends="build" description="Create binary archive of all files in dist.home">

<mkdir dir="${dist.home}" />

<!-- Create application WAR file -->
<jar jarfile="${dist.home}/${app.name}.war"
basedir="${build.home}" />

</target>




</project>



...全文
89 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
masterGr 2011-06-13
  • 打赏
  • 举报
回复
等 等等 等等
zhou961270 2011-06-13
  • 打赏
  • 举报
回复
F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\build.xml:69: F:\Workspaces\MyEclipse 7.0\Basic_Struts2_Ant\lib_external
你看一下xml文件的69行,找不到这个目录

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧