Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daggerok/publish-maven-project-to-jcenter
maven project publishing locally, to github (+ github release), to jcenter bintray. (not maven central)
https://github.com/daggerok/publish-maven-project-to-jcenter
bintray bintrayupload github-release-plugin jcenter jcenter-bintray maven maven-release-plugin maven-scm-publish-plugin publishing
Last synced: about 1 month ago
JSON representation
maven project publishing locally, to github (+ github release), to jcenter bintray. (not maven central)
- Host: GitHub
- URL: https://github.com/daggerok/publish-maven-project-to-jcenter
- Owner: daggerok
- Created: 2019-09-03T20:56:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T16:36:06.000Z (almost 3 years ago)
- Last Synced: 2024-07-30T20:06:02.084Z (5 months ago)
- Topics: bintray, bintrayupload, github-release-plugin, jcenter, jcenter-bintray, maven, maven-release-plugin, maven-scm-publish-plugin, publishing
- Language: Java
- Size: 1.82 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# publish maven projects to jcenter bintray [ ![Download](https://api.bintray.com/packages/daggerok/daggerok/publish-maven-project-to-jcenter/images/download.svg) ](https://bintray.com/daggerok/daggerok/publish-maven-project-to-jcenter/_latestVersion)
this repo example has been published [here](https://bintray.com/daggerok/daggerok/publish-maven-project-to-jcenter#files/com/github/daggerok/publish/maven/project/to/jcenter)
## build
```shell script
./mvnw
```## run
```shell script
java -jar app/target/*-all.jar
```# publish project artifacts as maven repository to local filesystem
```shell script
./mvnw -P publish-locally
```## maven-release-plugin (locally)
```shell script
./mvnw release:clean release:prepare release:perform \
-Darguments="-DskipTests -Dmaven.deploy.skip=true -Pmaven-release-locally,publish-locally" \
-Pmaven-release-locally,publish-locally -s ./settings.xml \
-DgenerateBackupPoms=false \
-Dresume=false \
-DdryRun=false \
-DskipTests \
--batch-mode
#if something goes wrong:
#./mvnw release:rollback -s ./settings.xml
```## publish project artifacts as maven repository to github
```shell script
./mvnw clean
./mvnw -P publish-locally
# create manually on your github repository branch: maven
./mvnw -P publish-to-github -pl :publish-maven-project-to-jcenter -s settings.xml
```## upload github release
* prepare [settings.xml](settings.xml) file:
```shell script
cp -Rf settings.template.xml settings.xml
```
* update it accordingly: //servers/server/github
* run commands:
```shell script
./mvnw clean package
./mvnw -P upload-github-release -pl :publish-maven-project-to-jcenter -s settings.xml
```## publish project artifacts to bintray jcenter maven repository
_by using maven-release-plugin_
* update [settings.xml](./settings.xml) file accordingly //servers/server/bintray-daggerok-repo
username => bintray API key
* first time open https://bintray.com/daggerok/daggerok and create new package, ie: publish-maven-project-to-jcenter
* once repository was created, prepare / perform release using maven-release-plugin
```shell script
./mvnw release:clean release:prepare release:perform \
-DgenerateBackupPoms=false \
-Darguments="-DskipTests" \
-Pmaven-release-jcenter \
-s ./settings.xml \
-Dresume=false \
-DdryRun=false \
-DskipTests \
--batch-mode
#if something goes wrong:
#./mvnw release:rollback -s ./settings.xml
```_links_
* [fix IDEA ${maven.multiModuleProjectDirectory} problem](https://stackoverflow.com/questions/29983683/dmaven-multimoduleprojectdirectory-not-set-issue-with-maven-and-intellij)
* [maven-release-plugin](https://maven.apache.org/maven-release/maven-release-plugin/examples/update-versions.html)