Jar 파일을 gradle plugin으로 nexus repo(vOSS 2.15.1)에 업로드할 때 발생하는 문제
이전에 빌드하여 업로드한 버전으로 또다시 업로드하면
이러한 bad request error가 발생함..
nexus repo에서 jar를 삭제하고 trash 비우기를 진행하였음에도 어딘가에 캐시 기록이나 뭐가 남는 듯 하다..
한번 빌드한 버전을 업로드하면 해당 repo에는 같은 버전을 다시 업로드 할 수 없음.
복구하려면 repo를 통째로 날리고 다시 새롭게 repo를 만드는 수 밖에...
참고 - gradle maven publish plugin
plugins {
id 'application'
id 'maven-publish' // gradle publish plugin
}
...
publishing {
publications {
maven(MavenPublication) {
artifact("bin/libs/super-app-server-${version}.jar") {
extension 'jar'
}}}
repositories {
maven {
name 'nexus'
url "$publishUrl"
allowInsecureProtocol true //allow http (not https)
credentials {
username user
password passwd
}
}
}
}
nexus3 (old)
/repository/maven-releases
nexus2 (new)
/nexus/content/repositories/releases
(publishUrl ex : http://192.168.1.150:8081/repository/maven/releases
)
gradle로 publish 할 때, project name 설정
settings.gradle - rootProject.name = 'super-app-server'