From 3afc488495f7bb6ae1f1838cc92fe2ccf890a4ab Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Fri, 3 Jul 2020 12:29:00 +0700 Subject: [PATCH] Add guide and how to publish the package --- README.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/README.md b/README.md index e69de29..a22a83a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,94 @@ +### Sample Guide Maven Publish to CUBETIQ OSS Repository +###### For Java and Kotlin module for general Web Tech Stack + +#### OSS Repository: [https://oss-internal.cubetiqs.com](https://oss-internal.cubetiqs.com) + +#### Create gradle.properties in root project +```env +nexusUrl=https://oss-internal.cubetiqs.com +nexusUsername=yourUsername +nexusPassword=yourPassword +``` + +#### Config build.grdle in your project +```groovy +plugins { + id 'java' + id 'maven' + ... +} + +repositories { + // For public version + maven { + url "${nexusUrl}/repository/maven-public/" + } + // For snapshot version + maven { + url "${nexusUrl}/repository/maven-snapshots/" + } + // For release version + maven { + url "${nexusUrl}/repository/maven-releases/" + } + ... +} + +uploadArchives { + repositories { + mavenDeployer { + repository(url: "${nexusUrl}/repository/maven-releases/") { + authentication(userName: nexusUsername, password: nexusPassword) + } + snapshotRepository(url: "${nexusUrl}/repository/maven-snapshots") { + authentication(userName: nexusUsername, password: nexusPassword) + } + } + } +} + +... +``` +#### Noted for Library Publish within GROUP ID +- For Snapshot version must be: +```groovy +group 'com.cubetiqs.libra' +version '1.0-SNAPSHOT' +``` +- For Release version must be: +```groovy +group 'com.cubetiqs.libra' +version '1.0-RELEASE' +``` +- For General/Normal version must be: +```groovy +group 'com.cubetiqs.libra' +version '1.0' +``` + +#### Noted for Module/Core Publish within GROUP ID +- For Snapshot version must be: +```groovy +group 'com.cubetiqs' +version '1.0-SNAPSHOT' +``` +- For Release version must be: +```groovy +group 'com.cubetiqs' +version '1.0-RELEASE' +``` +- For General/Normal version must be: +```groovy +group 'com.cubetiqs' +version '1.0' +``` + + +#### Contributors +- Sambo Chea + +#### License +```text +Name: CUBETIQ Solution +Status: Commercial/OSS +``` \ No newline at end of file