스냅샷은 자바 프로젝트의 출시 전 버전입니다. 스냅샷의 버전 번호에는 프로젝트 객체 모델(POM)에 서픽스 -SNAPSHOT이 포함됩니다. 예를 들어 pom.xml 파일의 이 설정은 개발 중인 프로젝트의 1.0 버전에 대한 것입니다.
<version>1.0-SNAPSHOT</version>
이 프로젝트에서 패키지를 게시하면 Maven 3은 각 스냅샷 버전이 고유하도록 스냅샷 버전 번호에 타임스탬프를 자동으로 추가합니다. Maven 2는 저장소의 기존 스냅샷을 덮어쓰는 수단으로 고유하지 않은 스냅샷 버전을 지원합니다. 이 방법은 빌드의 재현성에 문제가 되므로 Maven 3은 더 이상 고유하지 않은 스냅샷을 지원하지 않습니다.
스냅샷을 사용하면 저장소에 게시할 때마다 Maven 프로젝트에서 버전 번호를 증가시키지 않고 출시 전 패키지의 업데이트된 버전을 반복적으로 게시할 수 있습니다. 개발 중에 패키지에 대한 종속 항목이 있는 다른 프로젝트는 저장소에서 1.0 버전의 최신 스냅샷을 가져올 수 있습니다.
Maven 버전 번호 구문과 정렬 순서에 대한 자세한 내용은 버전 순서 사양을 참조하세요.
출시
패키지를 출시할 준비가 되면 POM 파일의 버전 번호에서 -SNAPSHOT 서픽스를 삭제하고 패키지를 사용하는 프로젝트가 스냅샷 버전 대신 출시 버전을 사용하도록 업데이트합니다.
모든 스냅샷 종속 항목을 나열하려면 다음 명령어를 사용하여 종속 항목 트리를 필터링하면 됩니다.
mvndependency:tree-Dincludes=:::*-SNAPSHOT
Artifact Registry 버전 정책
Artifact Registry에서 Maven 저장소를 만들 때 Maven 버전 정책을 지정할 수 있습니다.
없음 - 스냅샷과 출시 패키지를 모두 저장합니다. 기본 설정입니다.
스냅샷 - 스냅샷 패키지만 저장합니다.
출시 - 출시 패키지만 저장합니다.
스냅샷 버전 정책을 선택하는 경우 저장소에서 일치하는 버전을 덮어쓰는 고유하지 않은 스냅샷 버전을 허용할지 여부도 지정할 수 있습니다. Maven 3은 고유하지 않은 버전 모델을 지원하지 않으므로 고유 버전을 사용하는 것이 좋습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[[["\u003cp\u003eArtifact Registry supports Java packages built with Maven and Gradle, offering resources like a quickstart guide for those new to the platform.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create various repository types, including remote and virtual, and control access via specific permissions for accounts connecting to the repository.\u003c/p\u003e\n"],["\u003cp\u003eConfiguration for common tools like Maven, Gradle, and Cloud Build are supported, along with a community-created sbt plugin, and instructions to deploy to Google Cloud runtime environments.\u003c/p\u003e\n"],["\u003cp\u003eMaven differentiates between snapshot versions, which are pre-release and marked with \u003ccode\u003e-SNAPSHOT\u003c/code\u003e, and release versions, where the suffix is removed when the package is finalized.\u003c/p\u003e\n"],["\u003cp\u003eArtifact Registry offers different Maven version policies, such as storing both snapshot and release packages, or snapshot only or release only, with the option for unique or non-unique versions for snapshot packages.\u003c/p\u003e\n"]]],[],null,[]]