저는 Ant를 처음 사용하고 프로젝트를 컴파일하는 데 문제가 있습니다. 내 프로젝트에 여러 개의 .properties
파일이 있습니다. src/
. 내 build.xml
(아래 게시 됨)을 통해 .WAR
으로 프로젝트를 컴파일 중입니다. 배포 할 때 몇 가지 FileNotFound
예외가 표시되고 .WAR
파일의 압축을 푼 후에도 *.properties
파일이 최종 배포본에 존재하지 않는 것으로 나타났습니다. 내가 도대체 뭘 잘못하고있는 겁니까? 미리 감사드립니다. war
작업을 호출 할 때개미가 * .properties 파일을 컴파일하지 않습니다.
의 build.xml은
<?xml version="1.0" ?>
<project name="APP" default="war">
<path id="compile.classpath">
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="build/classes" />
<mkdir dir="dist" />
</target>
<target name="compile" depends="init">
<javac destdir="build/classes" includeantruntime="false" debug="true" srcdir="src">
<classpath refid="compile.classpath" />
</javac>
</target>
<target name="war" depends="compile">
<war destfile="dist/APP.war" webxml="WebContent/WEB-INF/web.xml" duplicate="preserve">
<fileset dir="WebContent" />
<lib dir="WebContent/WEB-INF/lib" />
<classes dir="build/classes" />
</war>
</target>
정적 파일을 추가'classes' 요소를 추가, 같은'<클래스 DIR = "SRC는"= "* 속성을."포함 />' – srkavin
@srkavin : 감사합니다! 이것은 정확하게 맞습니다. –