등의 의존성을 모두 해당 디렉터리에 수동으로 추가해야 한다. 프로젝트 자체 소스뿐만 아니라 의
존성까지 모두 소스 관리 시스템에서 관리하게 된다. 간단해서 좋지만 권장할 만한 방법은 아니다. 패
키지 관리는
6
장에서 더 자세히 설명한다.
❹
compile
타깃은 소스 코드를 컴파일하고 클래스 파일을 지정한 위치에 생성하는 역할을 한다. 이 프로
젝트는 자바
11
버전으로 컴파일하도록 설정됐다. 이 타깃은
cleanclean
타깃에 의존한다. 즉
compile
타
깃을 실행하면
clean
타깃이 먼저 실행되며 기존 클래스 파일이 최신 상태인지, 이전 빌드의 잔존 파
일인지 확인한다.
❺
test
타깃은
JUnit
앤트 태스크를 담고 있다. 프로젝트의 모든 단위 테스트를 실행하고 결과를 화면에
출력한다.
❻
package
타깃은 최종적으로 생성된
JAR
파일을 지정된 경로에 배치한다.
ant
package
명령 한 줄이면 자바 프로젝트를 컴파일하고 단위 테스트를 실행한 다음
JAR
파
일을 생성할 수 있다. 앤트는 풍부한 기능과 유연성을 자랑하며 빌드 간소화라는 목표를 달성
하기에 부족함이 없는 툴이다. 또한
XML
설정 파일을 통해 프로젝트의 빌드 라이프 사이클을
명확하고 직접적으로 문서화시킬 수 있다. 다만 앤트는 의존성 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.