在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):renaudcerrato/appengine-maven-repository开源软件地址(OpenSource Url):https://github.com/renaudcerrato/appengine-maven-repository开源编程语言(OpenSource Language):Java 98.1%开源软件介绍(OpenSource Introduction):appengine-maven-repositoryPrivate Maven repositories hosted on Google App-Engine, backed by Google Cloud Storage, supporting HTTP Basic authentication and minimalistic user access control deployed in less than 5 minutes. Why ?Private Maven repositories shouldn't cost you an arm and a leg, nor requires you to become a Linux Sys-Admin to setup, and should ideally be zero maintenance and costs nothing. Thanks to Google App-Engine's free quotas, you'll benefits for free of:
Moreover, no credit card is required to benefits of the quotas above. InstallationPrerequisitesCreate a new ProjectFirst of all, you'll need to go to your Google Cloud console to create a new App Engine application: As soon as your project is created, a default Google Cloud storage bucket has been automatically created for you which provides the first 5GB of storage for free. Setup the Google Cloud SDKFollow the official documentation to install the latest Google Cloud SDK. As a shorthand, you'll find below the Ubuntu/Debian instructions: $ export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
$ echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install google-cloud-sdk Do not forget to install the $ sudo apt-get install google-cloud-sdk-app-engine-java As a last step, configure the $ gcloud init
$ gcloud auth application-default login ConfigurationClone (or download) the source code: $ git clone https://github.com/renaudcerrato/appengine-maven-repository.git Update # That file declares your users - using basic authentication.
# Minimalistic access control is provided through the following permissions: write, read, or list.
# Syntax is:
# <username>:<password>:<permission>
# (use '*' as username and password to declare anonymous users)
admin:l33t:write
john:j123:read
donald:coolpw:read
guest:guest:list
DeploymentOnce you're ready to go live, just push the application to Google App-Engine: $ cd appengine-maven-repository
$ ./gradlew appengineDeploy And voilà! Your private Maven repository is hosted and running at the following address:
UsageYou'll find some usage examples in the examples folder. There's absolutely no extra steps required to fetch and/or deploy Maven artifacts to your repository: simply use your favorite Maven tools as you're used to do. An example deploying artifacts using the maven plugin for Gradle: apply plugin: 'java'
apply plugin: 'maven'
...
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://<your-project-id>.appspot.com") {
authentication(userName: "admin", password: "s3curepa55w0rd")
}
pom.version = "1.0.0"
pom.artifactId = "test"
pom.groupId = "com.example"
}
}
} Using the above plugin, deploying artifacts to your repository is as simple as: $ ./gradlew upload In the other way, accessing password protected Maven repositories using Gradle only requires you to specify the repositories {
...
maven {
credentials {
username 'user'
password 'YouCantGuess'
}
url "https://<your-project-id>.appspot.com"
}
}
LimitationsGoogle App-Engine HTTP requests are limited to 32MB - and thus, any artifacts above that limit can't be hosted. File Management (Google Cloud File Storage)The provided examples only provide a few gradle files that upload an installed local maven artifact. Sometimes there might be need to perform more file functions not available from gradle such as deletion. The documentation includes a button that launches a browser based file browser which presents a browser interface to perform file management. License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论