사용자 도구

사이트 도구


gradle:maven

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
마지막 판 양쪽 다음 판
gradle:maven [2013/12/10 21:07]
kwon37xi 새로 만듦
gradle:maven [2018/04/11 10:53]
kwon37xi
줄 1: 줄 1:
 ====== Gradle Maven Deployment ====== ====== Gradle Maven Deployment ======
-[[http://www.gradle.org/docs/current/userguide/artifact_management.html|Chapter 51. Publishing artifacts]]+  * [[http://www.gradle.org/docs/current/userguide/artifact_management.html|Chapter 51. Publishing artifacts]]
   * [[http://www.gradle.org/docs/current/userguide/maven_plugin.html|Chapter 52. The Maven Plugin]]   * [[http://www.gradle.org/docs/current/userguide/maven_plugin.html|Chapter 52. The Maven Plugin]]
 +  * [[https://github.com/bmuschko/gradle-nexus-plugin|bmuschko/gradle-nexus-plugin]]
 +  * [[https://github.com/researchgate/gradle-release|Gradle Release]]
 +  * [[https://vtorosyan.github.io/gradle-s3-private-repo/|Hosting a private repo on S3 (Gradle tricks)]] : Gradle 2.4 부터 s3 지원
  
 +===== 기본 설정 =====
 <code gradle> <code gradle>
 apply plugin: 'maven' apply plugin: 'maven'
줄 16: 줄 20:
         mavenDeployer {         mavenDeployer {
             repository(url: 'http://your.maven.repository.com/nexus/content/repositories/releases/') {             repository(url: 'http://your.maven.repository.com/nexus/content/repositories/releases/') {
 +                authentication(userName: '계정명', password: '비밀번호')
 +            }
 +            snapshotRepository(url: 'http://your.maven.repository.com/nexus/content/repositories/snapshot/') {
                 authentication(userName: '계정명', password: '비밀번호')                 authentication(userName: '계정명', password: '비밀번호')
             }             }
줄 22: 줄 29:
 } }
  
 +// 소스와 JavaDoc 배포를 위한 작업
 task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {
     classifier = 'sources'     classifier = 'sources'
줄 27: 줄 35:
 } }
  
-task javadocJar(type: Jar, dependesOn: javadoc) {+task javadocJar(type: Jar, dependsOn: javadoc) {
     classifier = 'javadoc'     classifier = 'javadoc'
     from javadoc.destinationDir     from javadoc.destinationDir
줄 37: 줄 45:
 } }
 </code> </code>
 +
 +  * 버전명에 ''-SNAPSHOT''이 붙어있으면 snapshotRepository로 들어간다.
 +  * artifactID는 프로젝트 이름으로 설정된다.
 +===== 배포 =====
 +<code sh>
 +# 로컬 저장소(~/.m2/repository)로 설치
 +gradle install
 +
 +# 원격 저장소에 업로드
 +gradle uploadArchives
 +</code>
 +
 +
gradle/maven.txt · 마지막으로 수정됨: 2018/05/31 13:53 저자 kwon37xi