Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A GitBucket plugin that provides Maven repository hosting on GitBucket

NotificationsYou must be signed in to change notification settings

takezoe/gitbucket-maven-repository-plugin

Repository files navigation

A GitBucket plugin that provides Maven repository hosting on GitBucket.

Features

In default, following Maven repositories become available by installing this plugin to GitBucket.

  • http(s)://GITBUCKET_HOST/maven/releases
  • http(s)://GITBUCKET_HOST/maven/snapshots

You can deploy artifacts to these repositories via WebDAV with your GitBucket account.

Also you can deploy via SSH (SCP) with public key authentication using keys registered in GitBucket. In this case, use following configurations to connect via SSH:

  • Host: Hostname of GitBucket
  • Port: SSH port configured in GitBucket system settings
  • Path:/maven/releases or/maven/snapshots

It's possible to add more repositories and configure them at the administration console:

Maven repository settings

You can specify whether artifacts are overwritable for each repository. In addition, it's possible to make repository private. Private repositories require basic authentication by GitBucket account to access.

Compatibility

Plugin versionGitBucket version
1.8.x4.37.1 -
1.7.x4.36.x -
1.6.x4.35.x -
1.5.x4.32.x -
1.4.x4.30.x -
1.3.x -4.23.x -
1.1.x - 1.2.x4.21.x -
1.0.x4.19.x -

Installation

Download jar file fromthe release page and put intoGITBUCKET_HOME/plugins.

Build

Runsbt assembly and copy generated/target/scala-2.13/gitbucket-maven-repository-plugin-x.x.x.jar to~/.gitbucket/plugins/ (If the directory does not exist, create it by hand before copying the jar), or just runsbt install.

Configuration

sbt

Resolvers:

resolvers++=Seq("GitBucket Snapshots Repository" at"http://localhost:8080/maven/snapshots","GitBucket Releases Repository"  at"http://localhost:8080/maven/releases")// If repository is private, you have to add authentication informationcredentials+=Credentials("GitBucket Maven Repository","localhost","username","password")

Publish via WebDAV:

publishTo:= {valbase="http://localhost:8080/maven/"if (version.value.endsWith("SNAPSHOT"))Some("snapshots" at base+"snapshots")elseSome("releases"  at base+"releases")}credentials+=Credentials("GitBucket Maven Repository","localhost","username","password")

Publish via SSH:

publishTo:= {valrepoInfo=if (version.value.endsWith("SNAPSHOT")) ("snapshots"->"/maven/snapshots")else                                    ("releases"->"/maven/releases")Some(Resolver.ssh(repoInfo._1,"localhost",29418, repoInfo._2)     as(System.getProperty("user.name"), (Path.userHome/".ssh"/"id_rsa").asFile))}

Maven

Add distribution settings to yourpom.xml:

<project>  ...  <distributionManagement>    <repository>      <id>gitbucket-maven-repository-releases</id>      <url>http://localhost:8080/maven/releases</url>    </repository>    <snapshotRepository>      <id>gitbucket-maven-repository-snapshots</id>      <url>http://localhost:8080/maven/snapshots</url>    </snapshotRepository>  </distributionManagement>  ...</project>

Also you need to add authentication settings in~/.m2/settings.xml (replace username and password with your GitBucket account's one):

<settings>  ...  <servers>    <server>      <id>gitbucket-maven-repository-releases</id>      <username>root</username>      <password>root</password>    </server>    <server>      <id>gitbucket-maven-repository-snapshots</id>      <username>root</username>      <password>root</password>    </server>  </servers>   ...</settings>

Gradle

To publish your artifacts to a Maven repo hosted bythis GitBucket plug-in, only the urlsin youruploadArchives.repositories section of yourbuild.gradle need to be changed (using your installation's URLs):

// ...def mvnUser= hasProperty("mvnUser")? mvnUser:"no_user"def mvnPassword= hasProperty("mvnPassword")? mvnPassword:"no_pwd"// ...uploadArchives {    repositories {        mavenDeployer {            repository(url:"http://localhost:8080/maven/releases") {                authentication(userName: mvnUser,password: mvnPassword)            }            snapshotRepository(url:"http://localhost:8080/maven/snapshots") {                authentication(userName: mvnUser,password: mvnPassword)            }    } }}// ...

wheremvnUser andmvnPassword are set in your~/.gradle/gradle.properties

About

A GitBucket plugin that provides Maven repository hosting on GitBucket

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp