0
내가 성공적으로 REPO 관리자에 스크립트를 추가하는 스크립트를 작성하는 간단한을 사용하고
: https://github.com/sonatype/nexus-book-examples/blob/nexus-3.x/scripting/simple-shell-example/create.shAPI의
이
{
"name": "apachesnapshots",
"type": "groovy",
"content": "repository.createMavenProxy('apachesnapshots-io',
'http://repository.apache.org/snapshots/', 'default' ,org.sonatype.nexus.repository.proxy.ContentMaxAge.-1)"
}
같은 JSON 파일을 통과
릴리스 저장소의 경우 최대 구성 요소 보존 기간은 -1이어야합니다. 나는 기본적으로 1440을 얻고있다. 나는 repository.createMavenProxy()에서 전달해야하는 매개 변수가 ContentMaxAge 여야한다는 것을 알아 냈습니다. 그러나 특정 위치에 추가해야하는지와 그 값을 -1로 설정하는 방법을 알 수는 없습니다.