์ด ๊ธฐ์ฌ์์๋ Gradle ๋น๋๋ฅผ ์ฌ์ฉํ์ฌ Github Actions๋ฅผ ํตํด Sonatype Maven Central Repository์ Java ์ํฐํฉํธ๋ฅผ ์ฒ์๋ถํฐ ๊ฒ์ํ๋ ํ๋ก์ธ์ค๋ฅผ ์์ธํ ์ดํด๋ณด๊ณ ์ ํฉ๋๋ค.
ํ ๊ณณ์ ์ผ๋ฐ์ ์ธ ํํ ๋ฆฌ์ผ์ด ์๊ธฐ ๋๋ฌธ์ ์ด ๊ธ์ ์ฐ๊ธฐ๋ก ํ์ต๋๋ค. ๋ชจ๋ ์ ๋ณด๋ ์์ ํ ์ ์ ํ์ง ์์ ๋ค์ํ ์ถ์ฒ์์ ํ๋์ฉ ์์งํด์ผํ์ต๋๋ค. ๋๊ฐ ์ ๊ฒฝ ์ฐ๋์, ๊ณ ์์ด ๋ฐ์์ ํ์ํฉ๋๋ค.
Sonatype์์ ์ ์ฅ์ ์์ฑ
์ฒซ ๋ฒ์งธ ๋จ๊ณ๋ Sonatype Maven Central์ ์ ์ฅ์๋ฅผ ์์ฑํ๋ ๊ฒ์
๋๋ค. ์ด๊ฒ์ ์ํด ์ฐ๋ฆฌ๋ ๊ฐ๋ค
ํ์ธ ํ ์ผ์ ์๊ฐ์ด ์ง๋๋ฉด GroupId๊ฐ ์์ฑ๋๊ณ ๋ค์ ๋จ๊ณ์ธ Gradle ๊ตฌ์ฑ์ผ๋ก ๋์ด๊ฐ ์ ์์ต๋๋ค.
Gradle ๊ตฌ์ฑ
์์ฑ ๋น์์๋ ์ํฐํฉํธ๋ฅผ ๊ฒ์ํ๋ ๋ฐ ๋์์ด ๋ ์ ์๋ Gradle ํ๋ฌ๊ทธ์ธ์ ์ฐพ์ง ๋ชปํ์ต๋๋ค.
๊ฐ์ฅ ๋จผ์ ํ์ ํด์ผ ํ ๊ฒ์ ํผ๋ธ๋ฆฌ์ฑ์ ์ํ Sonatype์ ์๊ตฌ ์ฌํญ์ ๋๋ค. ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ์์ค ์ฝ๋ ๋ฐ JavaDoc์ ๊ฐ์ฉ์ฑ, ์ฆ. ์ฐธ์ํด์ผํฉ๋๋ค
-sources.jar
ะธ-javadoc.jar
ํ์ผ. ๋ฌธ์์ ๋ช ์๋์ด ์๋ฏ์ด ์์ค์ฝ๋๋ ๋ฌธ์๋ฅผ ์ ๊ณตํ ์ ์๋ ๊ฒฝ์ฐ ๋๋ฏธ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.-sources.jar
๋๋-javadoc.jar
๋ด๋ถ์ ๊ฐ๋จํ README๊ฐ ํฌํจ๋์ด ์์ด ํ ์คํธ๋ฅผ ํต๊ณผํ ์ ์์ต๋๋ค. - ๋ชจ๋ ํ์ผ์ ๋ค์์ผ๋ก ์๋ช
ํด์ผ ํฉ๋๋ค.
GPG/PGP
๊ณผ.asc
์๋ช ์ด ํฌํจ๋ ํ์ผ์ ๊ฐ ํ์ผ์ ํฌํจ๋์ด์ผ ํฉ๋๋ค. - ๊ฐ์ฉ์ฑ
pom
ํ์ผ - ์ฌ๋ฐ๋ฅธ ๊ฐ
groupId
,artifactId
ะธversion
. ๋ฒ์ ์ ์์์ ๋ฌธ์์ด์ผ ์ ์์ผ๋ฉฐ ๋ค์์ผ๋ก ๋๋ ์ ์์ต๋๋ค.-SNAPSHOT
- ์ฐธ์ ํ์
name
,description
ะธurl
- ๋ผ์ด์ผ์ค, ๊ฐ๋ฐ์ ๋ฐ ๋ฒ์ ์ ์ด ์์คํ ์ ๋ํ ์ ๋ณด์ ์กด์ฌ
๊ฒ์ํ ๋ ๋ฐ๋ผ์ผ ํ๋ ๊ธฐ๋ณธ ๊ท์น์
๋๋ค. ์ ์ฒด ์ ๋ณด ์ ๊ณต
์ฐ๋ฆฌ๋ ์ด๋ฌํ ์๊ตฌ ์ฌํญ์ build.gradle
ํ์ผ. ๋จผ์ ๊ฐ๋ฐ์, ๋ผ์ด์ ์ค, ๋ฒ์ ์ ์ด ์์คํ
์ ๋ํ ๋ชจ๋ ํ์ํ ์ ๋ณด๋ฅผ ์ถ๊ฐํ๊ณ ํ๋ก์ ํธ์ URL, ์ด๋ฆ ๋ฐ ์ค๋ช
๋ ์ค์ ํฉ๋๋ค. ์ด๋ฅผ ์ํ ๊ฐ๋จํ ๋ฐฉ๋ฒ์ ์์ฑํด ๋ณด๊ฒ ์ต๋๋ค.
def customizePom(pom) {
pom.withXml {
def root = asNode()
root.dependencies.removeAll { dep ->
dep.scope == "test"
}
root.children().last() + {
resolveStrategy = DELEGATE_FIRST
description 'Some description of artifact'
name 'Artifct name'
url 'https://github.com/login/projectname'
organization {
name 'com.github.login'
url 'https://github.com/login'
}
issueManagement {
system 'GitHub'
url 'https://github.com/login/projectname/issues'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
url 'https://github.com/login/projectname'
connection 'scm:https://github.com/login/projectname.git'
developerConnection 'scm:git://github.com/login/projectname.git'
}
developers {
developer {
id 'dev'
name 'DevName'
email '[email protected]'
}
}
}
}
}
๋ค์์ผ๋ก ์ด์
๋ธ๋ฆฌ๊ฐ ์์ฑ๋๋ ๋์ -sources.jar
ะธ-javadoc.jar
ํ์ผ. ์ด ์น์
์ ๊ฒฝ์ฐ java
๋ค์์ ์ถ๊ฐํด์ผ ํฉ๋๋ค.
java {
withJavadocJar()
withSourcesJar()
}
GPG/PGP ์๋ช
์ ์ค์ ํ๋ ๋ง์ง๋ง ์๊ตฌ ์ฌํญ์ผ๋ก ์ด๋ํ๊ฒ ์ต๋๋ค. ์ด๋ ๊ฒ ํ๋ ค๋ฉด ํ๋ฌ๊ทธ์ธ์ ์ฐ๊ฒฐํฉ๋๋ค. signing
:
plugins {
id 'signing'
}
์น์ ์ ์ถ๊ฐํฉ๋๋ค.
signing {
sign publishing.publications
}
๋ง์ง๋ง์ผ๋ก ์น์
์ ์ถ๊ฐํ๊ฒ ์ต๋๋ค. publishing
:
publishing {
publications {
mavenJava(MavenPublication) {
customizePom(pom)
groupId group
artifactId archivesBaseName
version version
from components.java
}
}
repositories {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
์ฌ๊ธฐ์ sonatype์ฌ์ฉ์ ์ด๋ฆ ะธ sonatype์ํธ ์ ๋ฑ๋กํ๋ ๋์ ์์ฑ๋ ๋ก๊ทธ์ธ ๋ฐ ์ํธ๋ฅผ ํฌํจํ๋ ๋ณ์
๊ทธ๋ฆฌํ์ฌ ๊ฒฐ์น์ build.gradle
๋ค์๊ณผ ๊ฐ์ด ํ์๋ฉ๋๋ค.
์ ์ฒด build.gradle ์ฝ๋
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
group 'io.github.githublogin'
archivesBaseName = 'projectname'
version = System.getenv('RELEASE_VERSION') ?: "0.0.1"
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
}
test {
useJUnitPlatform()
}
jar {
from sourceSets.main.output
from sourceSets.main.allJava
}
signing {
sign publishing.publications
}
publishing {
publications {
mavenJava(MavenPublication) {
customizePom(pom)
groupId group
artifactId archivesBaseName
version version
from components.java
}
}
repositories {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
def customizePom(pom) {
pom.withXml {
def root = asNode()
root.dependencies.removeAll { dep ->
dep.scope == "test"
}
root.children().last() + {
resolveStrategy = DELEGATE_FIRST
description 'Some description of artifact'
name 'Artifct name'
url 'https://github.com/login/projectname'
organization {
name 'com.github.login'
url 'https://github.com/githublogin'
}
issueManagement {
system 'GitHub'
url 'https://github.com/githublogin/projectname/issues'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
url 'https://github.com/githublogin/projectname'
connection 'scm:https://github.com/githublogin/projectname.git'
developerConnection 'scm:git://github.com/githublogin/projectname.git'
}
developers {
developer {
id 'dev'
name 'DevName'
email '[email protected]'
}
}
}
}
}
ํ๊ฒฝ ๋ณ์์์ ๋ฒ์ ์ ์ป๋๋ค๋ ์ ์ ์ ์ํ๊ณ ์ถ์ต๋๋ค. System.getenv('RELEASE_VERSION')
. ์ด์
๋ธ๋ฆฌ ์ค์ ๋
ธ์ถํ๊ณ ํ๊ทธ ์ด๋ฆ์์ ๊ฐ์ ธ์ต๋๋ค.
PGP ํค ์์ฑ
Sonatype์ ์๊ตฌ ์ฌํญ ์ค ํ๋๋ ๋ชจ๋ ํ์ผ์ด GPG/PGP ํค๋ก ์๋ช
๋์ด์ผ ํ๋ค๋ ๊ฒ์
๋๋ค. ์ด๊ฒ์ ์ํด ์ฐ๋ฆฌ๋ ๊ฐ๋ค
- ํค ์์ ์์ฑํฉ๋๋ค.
gpg --gen-key
, ์ฌ์ฉ์ ์ด๋ฆ, ์ด๋ฉ์ผ์ ์ ๋ ฅํ๊ณ ๋น๋ฐ๋ฒํธ๋ ์ค์ ํ์ญ์์ค. - ์์ ๋ด๊ธฐ
id
๋ค์ ๋ช ๋ น์ด ํฌํจ๋ ํค:gpg --list-secret-keys --keyid-format short
. ID๋ ์ฌ๋์ ๋ค์ ์ง์ ๋ฉ๋๋ค(์: rsa2048/9B695056). - ์๋ฒ์ ๊ณต๊ฐ ํค ๊ฒ์
https://keys.openpgp.org ๋ช ๋ น์ผ๋ก:gpg --keyserver [https://keys.openpgp.org](https://keys.openpgp.org/) --send-keys 9B695056
- ๋น๋ฐ ํค๋ฅผ ์์์ ์์น๋ก ๋ด๋ณด๋
๋๋ค. ์์ผ๋ก ํ์ํ ๊ฒ์
๋๋ค.
gpg --export-secret-key 9B695056 > D:\gpg\9B695056.gpg
Github ์์ ์ค์
๋ง์ง๋ง ๋จ๊ณ๋ก ์ด๋ํ์ฌ Github Actions๋ฅผ ์ฌ์ฉํ์ฌ ๋น๋ ๋ฐ ์๋ ๊ฒ์๋ฅผ ์ค์ ํฉ๋๋ค.
Github Actions๋ ์ ์ฒด CI/CD ์ฃผ๊ธฐ๋ฅผ ๊ตฌํํ์ฌ ์ํฌํ๋ก๋ฅผ ์๋ํํ ์ ์๋ ๊ธฐ๋ฅ์
๋๋ค. ๋น๋, ํ
์คํธ ๋ฐ ๋ฐฐํฌ๋ ์ฝ๋ ํธ์, ๋ฆด๋ฆฌ์ค ์์ฑ ๋๋ ๋ฌธ์ ์ ๊ฐ์ ๋ค์ํ ์ด๋ฒคํธ์ ์ํด ํธ๋ฆฌ๊ฑฐ๋ ์ ์์ต๋๋ค. ์ด ๊ธฐ๋ฅ์ ๊ณต์ฉ ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ํด ์์ ๋ฌด๋ฃ์
๋๋ค.
์ด ์น์ ์์๋ ๋น๋ ๋ฐ ํธ์ ์ฝ๋๋ฅผ ์ค์ ํ๊ณ ์ถ์ ์ Sonatype ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ฐฐํฌํ๋ ๋ฐฉ๋ฒ๊ณผ ๋น๋ฐ์ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค.
์ฐ๋ฆฌ๋ ๋น๋ฐ์ ์ค์
์๋ ์กฐ๋ฆฝ ๋ฐ ๋ฐฐํฌ๋ฅผ ์ํด์๋ ํค ID, ํค ์์ฑ ์ ์ ๋ ฅํ ๋น๋ฐ๋ฒํธ, PGP ํค ์์ฒด, Sonatype ๋ก๊ทธ์ธ/๋น๋ฐ๋ฒํธ์ ๊ฐ์ ์ฌ๋ฌ ๋น๋ฐ ๊ฐ์ด ํ์ํฉ๋๋ค. ๋ฆฌํฌ์งํ ๋ฆฌ ์ค์ ์ ํน์ ์น์ ์์ ์ค์ ํ ์ ์์ต๋๋ค.
๋ค์ ๋ณ์๋ฅผ ์ค์ ํฉ๋๋ค.
- SONATYPE_USERNAME / SONATYPE_PASSWORD - Sonatype์ ๋ฑ๋กํ ๋ ์ ๋ ฅํ ๋ก๊ทธ์ธ/๋น๋ฐ๋ฒํธ
- SIGNING_KEYID/SIGNING_PASSWORD โ ์์ฑ ์ค์ ์ค์ ๋ PGP ํค ID ๋ฐ ์ํธ์ ๋๋ค.
GPG_KEY_CONTENTS ๋ณ์์ ๋ํด ๋ ์์ธํ ์ค๋ช
ํ๊ณ ์ถ์ต๋๋ค. ์ฌ์ค ์ถํ์ ์ํด์๋ ๊ฐ์ธ PGP ํค๊ฐ ํ์ํฉ๋๋ค. ๋น๋ฐ๊ธ์ ์ฌ๋ฆฌ๊ธฐ ์ํด,
- gpg๋ก ํค๋ฅผ ์ํธํํด ๋ด
์๋ค.
gpg --symmetric --cipher-algo AES256 9B695056.gpg
๋น๋ฐ๋ฒํธ๋ฅผ ์ ๋ ฅํ์ฌ. SECRET_PASSPHRASE ๋ณ์์ ๋ฐฐ์นํด์ผ ํฉ๋๋ค. - ๋ฐ์ ์ํธํ ํค๋ฅผ base64๋ฅผ ์ฌ์ฉํ์ฌ ํ
์คํธ ํ์์ผ๋ก ๋ณํํด ๋ณด๊ฒ ์ต๋๋ค.
base64 9B695056.gpg.gpg > 9B695056.txt
. ์ฝํ ์ธ ๋ GPG_KEY_CONTENTS ๋ณ์์ ๋ฐฐ์น๋ฉ๋๋ค.
์ฝ๋ ํธ์ ๋ฐ PR ์์ฑ ์ ๋น๋ ์ค์
๋จผ์ ํ๋ก์ ํธ์ ๋ฃจํธ์ ํด๋๋ฅผ ๋ง๋ค์ด์ผ ํฉ๋๋ค. .github/workflows
.
์๋ฅผ ๋ค์ด ํ์ผ์ ํ์ํ์ญ์์ค. gradle-ci-build.yml
๋ค์ ๋ด์ฉ์ผ๋ก:
name: build
on:
push:
branches:
- master
- dev
- testing
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build with Gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: current
arguments: build -PsonatypeUsername=${{secrets.SONATYPE_USERNAME}} -PsonatypePassword=${{secrets.SONATYPE_PASSWORD}}
์ด ์ํฌํ๋ก๋ ๋ธ๋์น๋ก ํธ์ํ ๋ ์คํ๋ฉ๋๋ค. master
, dev
ะธ testing
, ํ ์์ฒญ์ ์์ฑํ ๋๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค.
์์
์น์
์ ์ง์ ๋ ์ด๋ฒคํธ์์ ์คํํ ๋จ๊ณ๋ฅผ ์ง์ ํฉ๋๋ค. ์ด ๊ฒฝ์ฐ ์ต์ ๋ฒ์ ์ ubuntu์์ ๋น๋ํ๊ณ Java 8์ ์ฌ์ฉํ๋ฉฐ Gradle์ฉ ํ๋ฌ๊ทธ์ธ๋ ์ฌ์ฉํฉ๋๋ค. eskatos/gradle-command-action@v1
์ต์ ๋ฒ์ ์ ๋น๋๋ฅผ ์ฌ์ฉํ์ฌ ๋ค์์ ์ง์ ๋ ๋ช
๋ น์ ์คํํฉ๋๋ค. arguments
. ๋ณ์ secrets.SONATYPE_USERNAME
ะธ secrets.SONATYPE_PASSWORD
์ด๊ฒ์ด ์ฐ๋ฆฌ๊ฐ ์ด์ ์ ๋ฌผ์๋ ๋น๋ฐ์
๋๋ค.
๋น๋ ๊ฒฐ๊ณผ๋ ์์ ํญ์ ๋ฐ์๋ฉ๋๋ค.
์ ๋ฆด๋ฆฌ์ค๊ฐ ๋ฆด๋ฆฌ์ค๋๋ฉด ์๋ ๋ฐฐํฌ
์๋ ๋ฐฐํฌ๋ฅผ ์ํ ๋ณ๋์ ์ํฌํ๋ก ํ์ผ์ ๋ง๋ค์ด ๋ณด๊ฒ ์ต๋๋ค. gradle-ci-publish.yml
:
name: publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Prepare to publish
run: |
echo '${{secrets.GPG_KEY_CONTENTS}}' | base64 -d > publish_key.gpg
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.SECRET_PASSPHRASE}}"
--output secret.gpg publish_key.gpg
echo "::set-env name=RELEASE_VERSION::${GITHUB_REF:11}"
- name: Publish with Gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: current
arguments: test publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=${{secrets.SIGNING_KEYID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -PsonatypeUsername=${{secrets.SONATYPE_USERNAME}} -PsonatypePassword=${{secrets.SONATYPE_PASSWORD}}
ํ์ผ์ ํธ๋ฆฌ๊ฑฐ๋๋ ์ด๋ฒคํธ๋ฅผ ์ ์ธํ๊ณ ๋ ์ด์ ํ์ผ๊ณผ ๊ฑฐ์ ๋์ผํฉ๋๋ค. ์ด ๊ฒฝ์ฐ ์ด๋ฆ์ด v๋ก ์์ํ๋ ํ๊ทธ๋ฅผ ์์ฑํ๋ ์ด๋ฒคํธ์ ๋๋ค.
๋ฐฐํฌํ๊ธฐ ์ ์ ์ํธ์์ PGP ํค๋ฅผ ์ถ์ถํ์ฌ ํ๋ก์ ํธ์ ๋ฃจํธ์ ๋ฐฐ์นํ๊ณ ์ํธ๋ฅผ ํด๋
ํด์ผ ํฉ๋๋ค. ๋ค์์ผ๋ก ํน์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ค์ ํด์ผ ํฉ๋๋ค. RELEASE_VERSION
์ฐ๋ฆฌ๊ฐ ์ฐธ์กฐํ๋ gradle.build
ํ์ผ. ์ด ๋ชจ๋ ๊ฒ์ ์น์
์์ ์ํ๋ฉ๋๋ค. Prepare to publish
. GPG_KEY_CONTENTS ๋ณ์์์ ํค๋ฅผ ๊ฐ์ ธ์ gpg ํ์ผ๋ก ๋ณํํ ๋ค์ ํ์ผ์ ๋ฃ์ด ํด๋
ํฉ๋๋ค. secret.gpg
.
๋ค์์ผ๋ก ํน์ ๋ณ์๋ก ์ ํํฉ๋๋ค. GITHUB_REF
, ์ฌ๊ธฐ์์ ํ๊ทธ๋ฅผ ๋ง๋ค ๋ ์ค์ ํ ๋ฒ์ ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค. ์ด ๋ณ์๋ ์ด ๊ฒฝ์ฐ์ ๊ด๋ จ์ด ์์ต๋๋ค. refs/tags/v0.0.2
ํน์ ๋ฒ์ ์ ์ป๊ธฐ ์ํด ์ฒ์ 11์๋ฅผ ์๋ผ๋
๋๋ค. ๋ค์์ผ๋ก ๊ฒ์๋ฅผ ์ํด ํ์ค Gradle ๋ช
๋ น์ ์ฌ์ฉํฉ๋๋ค. test publish
Sonatype ์ ์ฅ์์์ ๋ฐฐํฌ ๊ฒฐ๊ณผ ํ์ธ
๋ฆด๋ฆฌ์ค๊ฐ ์์ฑ๋๋ฉด ์ด์ ์น์ ์์ ์ค๋ช ํ ์ํฌํ๋ก๊ฐ ์์๋์ด์ผ ํฉ๋๋ค. ์ด๋ ๊ฒ ํ๋ ค๋ฉด ๋ฆด๋ฆฌ์ค๋ฅผ ๋ง๋ญ๋๋ค.
ํ๊ทธ ์ด๋ฆ์ v๋ก ์์ํด์ผ ํฉ๋๋ค. ๋ฆด๋ฆฌ์ค ๊ฒ์๋ฅผ ํด๋ฆญํ ํ ์ํฌํ๋ก๊ฐ ์ฑ๊ณต์ ์ผ๋ก ์๋ฃ๋๋ฉด ๋ค์์ผ๋ก ์ด๋ํ ์ ์์ต๋๋ค.
์ํฐํฉํธ๊ฐ Staging ์ ์ฅ์์ ๋ํ๋ฌ์ต๋๋ค. ์ด๋ฆผ ์ํ๋ก ์ฆ์ ๋ํ๋๋ฉฐ ํด๋น ๋ฒํผ์ ๋๋ฌ ์๋์ผ๋ก ๋ซํ ์ํ๋ก ์ ํํด์ผ ํฉ๋๋ค. ๋ชจ๋ ์๊ตฌ ์ฌํญ์ด ์ถฉ์กฑ๋์๋์ง ํ์ธํ ํ ์ํฐํฉํธ๋ ๋ซ๊ธฐ ์ํ๊ฐ ๋๋ฉฐ ๋ ์ด์ ์์ ํ ์ ์์ต๋๋ค. ์ด ํ์์์๋ MavenCentral์์ ๋๋ฉ๋๋ค. ๋ชจ๋ ๊ฒ์ด ์๋๋ฉด ๋ฒํผ์ ๋๋ฅผ ์ ์์ต๋๋ค ํด์ , ์ํฐํฉํธ๋ Sonatype ์ ์ฅ์์ ์ ์ฅ๋ฉ๋๋ค.
์ํฐํฉํธ๊ฐ MavenCentral์ ๋ค์ด๊ฐ๋ ค๋ฉด ๋งจ ์ฒ์์ ์์ฑํ ์์ ์์ ์ํฐํฉํธ๋ฅผ ์์ฒญํด์ผ ํฉ๋๋ค. ์ด ์์ ์ ํ ๋ฒ๋ง ์ํํ๋ฉด ๋๋ฏ๋ก ์ฒ์์ผ๋ก ๊ฒ์ํฉ๋๋ค. ์ดํ์๋ ์ด๊ฒ์ด ํ์ํ์ง ์์ผ๋ฉฐ ๋ชจ๋ ๊ฒ์ด ์๋์ผ๋ก ๋๊ธฐํ๋ฉ๋๋ค. ๊ทธ๋ค์ ์ ๋ฅผ ์ํด ๋๊ธฐํ๋ฅผ ๋น ๋ฅด๊ฒ ์ค์ ํ์ง๋ง MavenCentral์์ ์ํฐํฉํธ๋ฅผ ์ฌ์ฉํ ์ ์๊ฒ ๋๊ธฐ๊น์ง ์ฝ 5์ผ์ด ๊ฑธ๋ ธ์ต๋๋ค.
๊ทธ๊ฒ ๋ค์ผ, ์ฐ๋ฆฌ๋ MavenCentral์ ์ํฐํฉํธ๋ฅผ ๊ฒ์ํ์ต๋๋ค.
์ ์ฉํ ๋งํฌ
- ๋น์ทํ
๊ธฐ์ฌ , maven์ ํตํด์๋ง ๊ฒ์ - ์ค๋น
์ ์ฅ์ ์๋ํ์ ๋ฝ์ค ์์ ์ ์์ฑํ Sonatype์ ๋ชจ๋ ๊ฒ์ด ์ค์ ๋ ์ ์ฅ์
์ถ์ฒ : habr.com