Sbt-github-packages: GitHub νŒ¨ν‚€μ§€λŠ” 아직 sbtλ₯Ό μ§€μ›ν•˜μ§€ μ•ŠλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2019λ…„ 08μ›” 01일  Β·  23μ½”λ©˜νŠΈ  Β·  좜처: djspiewak/sbt-github-packages

Sbt의 κ²Œμ‹œ λͺ¨λΈμ€ μ™„μ „νžˆ λͺ…ν™•ν•˜μ§€ μ•Šμ€ 이유둜 GitHub νŒ¨ν‚€μ§€μ—μ„œ μž‘λ™ν•˜μ§€ μ•ŠλŠ” κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€. 이 νŠΈμœ— 은 이것이 μ•Œλ €μ§„ λ¬Έμ œμ΄κ±°λ‚˜ μ΅œμ†Œν•œ μ™„μ „νžˆ μ˜ˆμƒμΉ˜ λͺ»ν•œ 것은 μ•„λ‹˜μ„ μ•”μ‹œν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. GitHubκ°€ sbt에 λŒ€ν•œ 지원을 μΆ”κ°€ν•˜κ±°λ‚˜ μ΅œμ†Œν•œ 쀑단을 μ€‘λ‹¨ν•˜λ©΄ 이 문제λ₯Ό μ’…λ£Œν•˜κ³  μž‘λ™ 쀑인 ν”ŒλŸ¬κ·ΈμΈμ˜ μ μ ˆν•œ 릴리슀λ₯Ό μˆ˜ν–‰ν•  κ²ƒμž…λ‹ˆλ‹€.

기둝을 μœ„ν•΄ 였λ₯˜λŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

[info] [info] Set current project to sbt-github-packages-tests-publish (in build file:/private/var/folders/vm/h_lhw5wn573cw70qd6l0ljt80000gn/T/sbt_78381fbc/publish/)
[info] [info] Packaging /private/var/folders/vm/h_lhw5wn573cw70qd6l0ljt80000gn/T/sbt_78381fbc/publish/target/scala-2.12/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT-sources.jar ...
[info] [info] Updating ...
[info] [info] Done packaging.
[info] [info] Wrote /private/var/folders/vm/h_lhw5wn573cw70qd6l0ljt80000gn/T/sbt_78381fbc/publish/target/scala-2.12/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT.pom
[info] [info] Done updating.
[info] [info] Packaging /private/var/folders/vm/h_lhw5wn573cw70qd6l0ljt80000gn/T/sbt_78381fbc/publish/target/scala-2.12/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT-javadoc.jar ...
[info] [info] Done packaging.
[info] [info] Packaging /private/var/folders/vm/h_lhw5wn573cw70qd6l0ljt80000gn/T/sbt_78381fbc/publish/target/scala-2.12/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT.jar ...
[info] [info] Done packaging.
[info] [info]   published sbt-github-packages-tests-publish_2.12 to https://maven.pkg.github.com/djspiewak/sbt-github-packages/com/codecommit/sbt-github-packages-tests-publish_2.12/0.1-SNAPSHOT/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT.pom
[info] [error] java.io.IOException: Access to URL https://maven.pkg.github.com/djspiewak/sbt-github-packages/com/codecommit/sbt-github-packages-tests-publish_2.12/0.1-SNAPSHOT/sbt-github-packages-tests-publish_2.12-0.1-SNAPSHOT.jar was refused by the server: Forbidden
[info] [error]  at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:79)
[info] [error]  at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191)
[info] [error]  at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[info] [error]  at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[info] [error]  at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[info] [error]  at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:366)
[info] [error]  at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[info] [error]  at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:118)
[info] [error]  at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:105)
[info] [error]  at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:165)
[info] [error]  at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:497)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:496)
[info] [error]  at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:788)
[info] [error]  at scala.collection.Iterator.foreach(Iterator.scala:937)
[info] [error]  at scala.collection.Iterator.foreach$(Iterator.scala:937)
[info] [error]  at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
[info] [error]  at scala.collection.IterableLike.foreach(IterableLike.scala:70)
[info] [error]  at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
[info] [error]  at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[info] [error]  at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:787)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:496)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144)
[info] [error]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134)
[info] [error]  at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[info] [error]  at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[info] [error]  at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[info] [error]  at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[info] [error]  at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[info] [error]  at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[info] [error]  at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[info] [error]  at xsbt.boot.Using$.withResource(Using.scala:10)
[info] [error]  at xsbt.boot.Using$.apply(Using.scala:9)
[info] [error]  at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[info] [error]  at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[info] [error]  at xsbt.boot.Locks$.apply0(Locks.scala:31)
[info] [error]  at xsbt.boot.Locks$.apply(Locks.scala:28)
[info] [error]  at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[info] [error]  at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[info] [error]  at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[info] [error]  at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[info] [error]  at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134)
[info] [error]  at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2416)
[info] [error]  at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2416)
[info] [error]  at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[info] [error]  at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[info] [error]  at sbt.std.Transform$$anon$4.work(System.scala:67)
[info] [error]  at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[info] [error]  at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[info] [error]  at sbt.Execute.work(Execute.scala:278)
[info] [error]  at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[info] [error]  at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[info] [error]  at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[info] [error]  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info] [error]  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[info] [error]  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[info] [error]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[info] [error]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[info] [error]  at java.lang.Thread.run(Thread.java:748)

상단을 보면 pom이 μ„±κ³΅μ μœΌλ‘œ κ²Œμ‹œλ˜μ—ˆμ§€λ§Œ 첫 번째 jar 파일이 Forbidden 와 ν•¨κ»˜ κ±°λΆ€λ˜μ—ˆμŒμ„ μ•Œ 수 μžˆμŠ΅λ‹ˆλ‹€. @alexarchambalt λŠ” κ²Œμ‹œ μˆœμ„œκ°€ 관련이 μ—†μœΌλ©° ν•­μ•„λ¦¬λŠ” 관계없이 κ±°λΆ€λœλ‹€κ³  보고 ν•©λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

Github이 λͺ‡ 가지λ₯Ό λ³€κ²½ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€. 였늘 전체 μ—…λ‘œλ“œλ₯Ό ν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€. (바닐라 sbt 1.3.3)

[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9.pom
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9.jar
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9-sources.jar
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9-javadoc.jar

μ›Ή UIλŠ” μ—¬μ „νžˆ sbt 접미사에 λŒ€ν•΄ ν˜Όλž€μŠ€λŸ¬μ›Œν•©λ‹ˆλ‹€.

<dependency>
  <groupId>com.example.test_2</groupId>
  <artifactId>13</artifactId>
  <version>0.0.9</version>
</dependency> 

λͺ¨λ“  23 λŒ“κΈ€

λ‚΄κ°€ 말할 μˆ˜μžˆλŠ” ν•œ -sources, -javadoc, -testsλŠ” μ§€μ›λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

sbt-aether-deployλ₯Ό μ‚¬μš©ν•˜μ—¬ sbtμ—μ„œ github νŒ¨ν‚€μ§€μ— μ„±κ³΅μ μœΌλ‘œ κ²Œμ‹œν–ˆμŠ΅λ‹ˆλ‹€.

ν”„λ‘œμ νŠΈ/plugins.sbt

addSbtPlugin("no.arktekk.sbt" % "aether-deploy" % "0.23.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")

λΉŒλ“œ.sbt

externalResolvers += "GitHub lokkju Apache Maven Packages" at "https://maven.pkg.github.com/lokkju/github-action-sbt"
publishTo := Some("GitHub lokkju Apache Maven Packages" at "https://maven.pkg.github.com/lokkju/github-action-sbt")
credentials += Credentials("GitHub Package Registry", "maven.pkg.github.com", "lokkju", "<GITHUB_TOKEN>")

// GitHub package repo isn't supporting javadoc and sources
publishArtifact in (Compile, packageDoc) := false
publishArtifact in (Compile, packageSrc) := false

sbt aetherDeploy

μΆ”κ°€ μΈ‘λ©΄; Charles Web Debugging Proxyλ₯Ό μ‚¬μš©ν•˜λ©΄ λͺ¨λ“  것이 잘 μž‘λ™ν•©λ‹ˆλ‹€. 그것 μ—†μ΄λŠ” λ•Œλ•Œλ‘œ μ„œλ²„κ°€ μ‘λ‹΅ν•˜μ§€ μ•ŠλŠ”λ‹€λŠ” 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

@lokkju 흠, 닀쀑 λͺ¨λ“ˆ λΉŒλ“œλŠ” μ–΄λ–»μŠ΅λ‹ˆκΉŒ?

λ‚˜λŠ” 그듀을 μ‹œλ„ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. key here은 ether-deployλ₯Ό μ‚¬μš©ν•˜λŠ” 것 κ°™μ§€λ§Œ μ™„μ „νžˆ μˆ˜μ •λ˜μ§€λŠ” μ•ŠμŠ΅λ‹ˆλ‹€. 각 λ„κ΅¬μ—μ„œ μ‚¬μš©ν•˜λŠ” ν΄λΌμ΄μ–ΈνŠΈ λ²„μ „μ˜ SSL 지원 문제인 것 κ°™μŠ΅λ‹ˆλ‹€.

λͺ‡ 가지 λ‹€λ₯Έ Java http 라이브러리λ₯Ό μ‹œλ„ν•˜κ³  κ°„λ‹¨ν•œ μž‘λ™ ꡬ성과 μž‘λ™ν•˜μ§€ μ•ŠλŠ” ꡬ성을 λŒ€μ²΄ν•  수 μžˆλŠ”μ§€ ν™•μΈν•˜κ² μŠ΅λ‹ˆλ‹€. μ΅œμ‹  정보λ₯Ό μ•Œλ € λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.

κ·Έλž˜μ„œ μ’€ 더 νƒμƒ‰ν•œ 끝에 λͺ‡ 가지 ν₯미둜운 증상을 λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€.

curl을 μ‚¬μš©ν•˜μ—¬ νŒ¨ν‚€μ§€λ₯Ό μ—…λ‘œλ“œν•˜λ €κ³  ν–ˆμŠ΅λ‹ˆλ‹€.

  • PUTν•œ 첫 번째 νŒŒμΌμ€ 파일 μ΄λ¦„μ΄λ‚˜ ν™•μž₯μžμ— 관계없이 μ£Όμš” μ•„ν‹°νŒ©νŠΈλ‘œ μ²˜λ¦¬λ©λ‹ˆλ‹€.
  • 그런 λ‹€μŒ κ³ μœ ν•œ 이름이 μžˆλŠ” ν•œ μ›ν•˜λŠ” 만큼 (μœ νš¨ν•œ) POM νŒŒμΌμ„ μ—…λ‘œλ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€.
  • λ‹€λ₯Έ λΉ„ POM νŒŒμΌμ€ μ—…λ‘œλ“œν•  수 μ—†μŠ΅λ‹ˆλ‹€.
  • JAR 및 POM 파일 ν™•μž₯자λ₯Ό 가진 νŒŒμΌμ€ githubμ—μ„œ ꡬ문 λΆ„μ„λ˜λ©° 잘λͺ»λœ ν˜•μ‹μ€ λ°˜ν™˜λ˜λŠ” HTTP 4xx 였λ₯˜ λ©”μ‹œμ§€λ‘œ 였λ₯˜λ₯Ό λ³΄κ³ ν•©λ‹ˆλ‹€.

ν˜„μž¬ μ€‘μš”ν•œ 점은 JAR μ•„ν‹°νŒ©νŠΈλ₯Ό λ¨Όμ € μ—…λ‘œλ“œν•œ λ‹€μŒ POM을 κ²Œμ‹œν•΄μ•Ό ν•œλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€.

지원 이메일이 μžˆμŠ΅λ‹ˆλ‹€. μΆ”κ°€ 정보λ₯Ό μ œκ³΅ν•˜λŠ”μ§€ ν™•μΈν•˜κ² μŠ΅λ‹ˆλ‹€.

흠 그럼 μ•„ν‹°νŒ©νŠΈ μ„œλͺ…도 μ—†λŠ” κ±΄κ°€μš”?

μ—…λ‘œλ“œλœ λͺ¨λ“  νŒŒμΌμ— λŒ€ν•΄ *.md5 및 *.sha1을 μžλ™μœΌλ‘œ μƒμ„±ν•©λ‹ˆλ‹€.

λ˜ν•œ λ‹€μŒμ„ μ°Ύμ•˜μŠ΅λ‹ˆλ‹€. https://github.com/sbt/librarymanagement/blob/d09f9f81b664baaac15054730fbcb51e1b240de2/ivy/src/main/scala/sbt/internal/librarymanagement/IvyActions.scala#L123

Artifactory deals with the publishing (and republishing) of SNAPSHOTs using a strict rule on the order of publishing. The ;build.timestamp=... suffix is the alternative.

The strict rule is:

publish the main artefact (which has no classifier)
publish the POM/ivy.xml file
publish additional artefacts which have a classifier

μ§€κΈˆκΉŒμ§€ λΆ„λ₯˜κΈ°λ₯Ό 배포할 수 μ—†λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. μ΄λŠ” μ„±κ°€μ‹  일이며 github에 λŒ€ν•œ 질문의 μΌλΆ€μž…λ‹ˆλ‹€.

λ‚˜λŠ” μ•„λ§ˆλ„ μˆœμˆ˜ν•œ maven/java ν”„λ‘œμ νŠΈλ₯Ό λ§Œλ“€κ³  그것이 μž‘λ™ν•˜λŠ”μ§€ 확인할 κ²ƒμž…λ‹ˆλ‹€.

κΈ°λ³Έ κ²Œμ‹œλ₯Ό μ‚¬μš©ν•˜μ—¬ μŠ€λƒ…μƒ· 배포λ₯Ό μ‹œλ„ν•˜κ³  λ‹€μŒμ„ μ–»μ—ˆμŠ΅λ‹ˆλ‹€.

[error] stack trace is suppressed; run last publish for the full output
[error] (publish) java.io.IOException: PUT operation to URL https://maven.pkg.github.com/company/foo/bar/utils/3.24.0-SNAPSHOT/utils-3.24.0-SNAPSHOT.pom failed with status code 400: Bad Request

λ¬Έμ„œμ— μŠ€λƒ…μƒ·μ— λŒ€ν•œ μ–ΈκΈ‰ μ—†μŒ

사싀 λ‚˜λŠ” 일반 νŒ¨ν‚€μ§€μ™€ λ™μΌν•©λ‹ˆλ‹€.

java.io.IOException: PUT operation to URL https://maven.pkg.github.com/company/foo/bar/utils/utils/0.0.1/utils-0.0.1.pom failed with status code 400: Bad Request
[error] java.io.IOException: PUT operation to URL https://maven.pkg.github.com/company/foo/bar/utils/utils/0.0.1/utils-0.0.1.pom failed with status code 400: Bad Request
[error]     at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
[error]     at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:264)
[error]     at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error]     at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)

κ·Έ 400의 λͺΈμ΄ μ–΄λ–»κ²Œ μƒκ²ΌλŠ”μ§€ κΆκΈˆν•˜λ‹€

이에 λŒ€ν•œ μ—…λ°μ΄νŠΈκ°€ μžˆμŠ΅λ‹ˆκΉŒ?

아직 μ—…λ°μ΄νŠΈκ°€ μ—†μŠ΅λ‹ˆλ‹€! @lokkju 의 μ‹€ν—˜μ΄ κ°€μž₯ 졜근의 것 κ°™μ•„μš”. μ’€ 더 가지고 놀고 μ‹Άμ§€λ§Œ μ†”μ§νžˆ GitHub νŒ¨ν‚€μ§€λŠ” μ—¬μ „νžˆ ν‘œμ€€ Maven 배포 κ°€λŠ₯ 파일(μ„œλͺ…, λ¬Έμ„œ, λΆ„λ₯˜μž λ“±)의 μΌλΆ€μ΄μž μ†Œν¬μΈ ν˜ΈμŠ€νŒ… νŒŒμΌμ„ μ§€μ›ν•˜μ§€ μ•ŠλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€. μ΄λŸ¬ν•œ 결함을 μˆ˜μ •ν•  λ•ŒκΉŒμ§€ μ•„ν‹°νŒ©νŠΈ 호슀트둜 μ‹€μš©μ μΈ μž‘μ—…μ„ μˆ˜ν–‰ν•˜κΈ°κ°€ μ–΄λ ΅μŠ΅λ‹ˆλ‹€.

μΆ”κ°€ 정보, 일반 sbt 1.3.2 둜 ν…ŒμŠ€νŠΈ(μΆ”κ°€ ν”ŒλŸ¬κ·ΈμΈ μ—†μŒ)

ν”„λ‘œμ νŠΈμ˜ 리포지토리에 κ²Œμ‹œν•΄μ•Ό ν•©λ‹ˆλ‹€.

publishTo := Some("GitHub Package Registry" at "https://maven.pkg.github.com/[username]/[project]")

자격 증λͺ…은 λ‹€μŒκ³Ό 같이 μ •μ˜λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€.

credentials += Credentials("GitHub Package Registry","maven.pkg.github.com","[username]","[token]")

ν† ν°μ—λŠ” read:packages , repo 및 write:packages λ²”μœ„κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

κ·ΈλŸ¬λ‚˜ 일단 κ²Œμ‹œν•˜λ©΄ μ΄λŸ¬ν•œ μ œμ•ˆλœ νŒ¨ν‚€μ§€ μ’Œν‘œ(μ—¬κΈ°μ„œ organization="io.test" 및 name="test")둜 λλ‚©λ‹ˆλ‹€.

<dependency>
  <groupId>com.github.[username]/[project]</groupId>
  <artifactId>io.test.test_2.13</artifactId>
  <version>0.1</version>
</dependency> 

μŠ€λƒ…μƒ·μ€ μ—…λ‘œλ“œν•  수 μžˆμ§€λ§Œ 두 번 μ—…λ‘œλ“œν•  수 μ—†μœΌλ―€λ‘œ νŠΉλ³„ν•œ μ²˜λ¦¬κ°€ 없을 수 μžˆμŠ΅λ‹ˆλ‹€.

Pom μ—…λ‘œλ“œλŠ” μž‘λ™ν•˜μ§€λ§Œ λ‚˜λ¨Έμ§€λŠ” μ‹€νŒ¨ν•©λ‹ˆλ‹€.

[정보] https://maven.pkg.github.com/[username]/[project]/io/test/test_2.13/0.0.3/test_2.13-0.0.3.pom 에 test_2.13 κ²Œμ‹œ
[였λ₯˜] java.io.IOException: URL https://maven.pkg.github.com/[username]/[project]/io/test/test_2.13/0.0.3/test_2.13-0.0 에 λŒ€ν•œ μ•‘μ„ΈμŠ€. 3.jar이 μ„œλ²„μ—μ„œ κ±°λΆ€λ˜μ—ˆμŠ΅λ‹ˆλ‹€. κΈˆμ§€λœ 응닡=였λ₯˜: "io.test.test_2.13" 버전 0.0.3의 "test_2.13-0.0.3.jar"이 이미 κ²Œμ‹œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

@francisdb JAR μ—…λ‘œλ“œλŠ” SBTκ°€ νŒŒμΌμ„ μˆœμ„œλŒ€λ‘œ μ—…λ‘œλ“œν•˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— μ‹€νŒ¨ν•©λ‹ˆλ‹€. λ‚΄κ°€ κΈ°μ–΅ν•˜λŠ” 바에 λ”°λ₯΄λ©΄ κ²Œμ‹œ κΈ°λŠ₯이 seq μœ ν˜• λŒ€μ‹  지도 μœ ν˜•μ„ μ‚¬μš©ν•˜λŠ” SBT(IvyActions.scala)의 였랜 λ²„κ·Έμž…λ‹ˆλ‹€. Coursier 쒅속성 관리 μ‹œμŠ€ν…œμœΌλ‘œ μ΄λ™ν•˜λ©΄ 이 λ¬Έμ œκ°€ 자체적으둜 해결될 수 μžˆμŠ΅λ‹ˆλ‹€.

λ‚΄ μ œμ•ˆμ€ 이 ν”ŒλŸ¬κ·ΈμΈ λ‚΄μ—μ„œ μ—…λ‘œλ“œ ν”„λ‘œμ„ΈμŠ€ 자체λ₯Ό λ¬΄μ‹œν•˜κ³  pom을 λ¨Όμ € μ—…λ‘œλ“œν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. λ¬Όλ‘  이것은 μ—¬μ „νžˆ ​​지원이 ν•„μš”ν•œ λΆ„λ₯˜κΈ°μ—λŠ” 도움이 λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

sbt 1.3.2μ—μ„œμ²˜λŸΌ λ³΄μž…λ‹ˆλ‹€. CousierλŠ” μ•„ν‹°νŒ©νŠΈλ₯Ό μ—…λ‘œλ“œν•˜λŠ” 데 μ‚¬μš©λ˜μ§€ μ•Šκ³  λ‹€μš΄λ‘œλ“œμ—λ§Œ μ‚¬μš©λ©λ‹ˆλ‹€.

λ˜ν•œ 이 λ¬Έμ œμ— λŒ€ν•œ GitHub의 응닡이 μ—†μŠ΅λ‹ˆλ‹€.

흠... μ•„μ£Ό κ°„λ‹¨νžˆ λ΄€μŠ΅λ‹ˆλ‹€. sbt 1.2.8은 μ—¬μ „νžˆ ​​λͺ¨λ“  κ³³μ—μ„œ μ‚¬μš©λ©λ‹ˆλ‹€.
https://github.com/djspiewak/sbt-github-packages/blob/0839b97dea06100a202f2a105cbe83873784bf77/build.sbt#L28
https://github.com/djspiewak/sbt-github-packages/blob/0839b97dea06100a202f2a105cbe83873784bf77/src/sbt-test/sbtghpackages/publish/project/build.properties#L1
https://github.com/djspiewak/sbt-github-packages/blob/0839b97dea06100a202f2a105cbe83873784bf77/project/build.properties#L1

(μΌλΆ€λŠ” 놓쳀을 μˆ˜λ„ μžˆμ§€λ§Œ)

μ—…κ·Έλ ˆμ΄λ“œκ°€ ν•„μš”ν•œκ°€μš”?

ν’€ λ¦¬ν€˜μŠ€νŠΈ: #2

CousierλŠ” sbt 1.3.0λΆ€ν„° 기본적으둜만 μ‚¬μš©λ©λ‹ˆλ‹€.

λ‚΄ ν…ŒμŠ€νŠΈλŠ” 1.3.2

@francisdb μ•Œκ² μŠ΅λ‹ˆλ‹€.

Github이 λͺ‡ 가지λ₯Ό λ³€κ²½ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€. 였늘 전체 μ—…λ‘œλ“œλ₯Ό ν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€. (바닐라 sbt 1.3.3)

[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9.pom
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9.jar
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9-sources.jar
[info]  published test_2.13 to https://maven.pkg.github.com/francisdb/foo/com/example/test_2.13/0.0.9/test_2.13-0.0.9-javadoc.jar

μ›Ή UIλŠ” μ—¬μ „νžˆ sbt 접미사에 λŒ€ν•΄ ν˜Όλž€μŠ€λŸ¬μ›Œν•©λ‹ˆλ‹€.

<dependency>
  <groupId>com.example.test_2</groupId>
  <artifactId>13</artifactId>
  <version>0.0.9</version>
</dependency> 

μ‹ λ‚œλ‹€! 였늘 λͺ‡ 가지 ν…ŒμŠ€νŠΈλ₯Ό μˆ˜ν–‰ν•˜κ³  μ’…λ£Œν•  수 μžˆλŠ”μ§€ ν™•μΈν•©λ‹ˆλ‹€. 맀우 맀우 ν₯λ―Έμ§„μ§„ν•©λ‹ˆλ‹€.

@francisdb 의 μ‹€ν—˜ κ²°κ³Όλ₯Ό μ‚¬μš©ν•˜κΈ° μœ„ν•΄ ν”ŒλŸ¬κ·ΈμΈμ„ μ•½κ°„ μˆ˜μ •ν•˜λ©΄ λͺ¨λ“  것이 μž‘λ™ν•˜κ³  μžˆμŒμ„ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€! ꡐ차 λΉŒλ“œ 접미사와 κ΄€λ ¨λœ webui λ¬Έμ œλŠ” μ‹€μ œ 해상도에 영ν–₯을 λ―ΈμΉ˜μ§€ μ•Šκ³  UIμ—λ§Œ 영ν–₯을 λ―ΈμΉ˜λŠ” κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€. λ”°λΌμ„œ 이제 κ²Œμ‹œ 및 해결이 ν”ŒλŸ¬κ·ΈμΈκ³Ό ν•¨κ»˜ μž‘λ™ν•©λ‹ˆλ‹€. 아직 개인 μ €μž₯μ†Œλ‘œ ν…ŒμŠ€νŠΈν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. λ‚΄ μƒκ°μ—λŠ” 아직 μ œλŒ€λ‘œ μž‘λ™ν•˜μ§€ μ•ŠλŠ” 것 κ°™μ§€λ§Œ 0.1.0 을 κ²Œμ‹œν•˜κΈ°μ— μΆ©λΆ„ν•©λ‹ˆλ‹€.

λͺ¨λ“  λ…Έλ ₯κ³Ό μ‹€ν—˜μ— κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€! ν”ŒλŸ¬κ·ΈμΈμ€ μ—¬λŸ¬λΆ„ 덕뢄에 맀우 κ°„λ‹¨ν•©λ‹ˆλ‹€.

@francisdb

μŠ€λƒ…μƒ·μ€ μ—…λ‘œλ“œν•  수 μžˆμ§€λ§Œ 두 번 μ—…λ‘œλ“œν•  수 μ—†μœΌλ―€λ‘œ νŠΉλ³„ν•œ μ²˜λ¦¬κ°€ 없을 수 μžˆμŠ΅λ‹ˆλ‹€.

두 번 μ—…λ‘œλ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€.: GitHub UIμ—μ„œ μŠ€λƒ…μƒ·μ„ μ‚­μ œν•œ λ‹€μŒ μƒˆ μŠ€λƒ…μƒ·(λ™μΌν•œ μŠ€λƒ…μƒ· 버전을 의미)을 λ‹€μ‹œ μ—…λ‘œλ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€. 그것은 λ‚˜λ₯Ό μœ„ν•΄ μΌν–ˆμŠ΅λ‹ˆλ‹€. μ•½κ°„ λ²ˆκ±°λ‘­μ§€λ§Œ μž‘λ™ν•©λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰