New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UP-5015 - Customize upload artifact url #1175
UP-5015 - Customize upload artifact url #1175
Conversation
It permit to set an url to a local nexus repository, and so to deploy localy artifacts and test them with uportal-start. One question is there a way to avoid to set ossrhPassword, ossrhUsername and so no ossrhUrl to a local file instead into the gradle.properties ? |
build.gradle
Outdated
@@ -165,7 +166,7 @@ subprojects { | |||
mavenDeployer { | |||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | |||
|
|||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | |||
repository(url: publishingRepositoryUrl) { | |||
authentication(userName: publishingUsername, password: publishingPassword) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question is there a way to avoid to set ossrhPassword, ossrhUsername
To make publishingUsername
and publishingPassword
optional.
Try something like
if (publishingUsername != '' && publishingPassword != '') {
authentication(userName: publishingUsername, password: publishingPassword)
}
and so no ossrhUrl to a local file instead into the gradle.properties ?
http://mrhaki.blogspot.com/2010/09/gradle-goodness-different-ways-to-set.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry Christian I don't want it optional, I just want to override these values (setted in the ext part) by my custom properties found into a local file, a file that won't be gradle.properties and that won't be versionned !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://mrhaki.blogspot.com/2010/09/gradle-goodness-different-ways-to-set.html
Environment variables or setting the value in ~/.gradle/gradle.properties
are two options that work well by default with gradle.
If you are looking for per-environment configuration we could consider enabling a plugin like:
https://github.com/stevesaliman/gradle-properties-plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment variables or setting the value in ~/.gradle/gradle.properties are two options that work well by default with gradle.
Oh yes sorry I didn't tried this one !
After there an other need you didn't defined the snapshot repository, this could help !
see example at the end of the doc http://central.sonatype.org/pages/gradle.html
if you want i can provide the link but i won't be able to test it !
Give the ability to externalize url setting for local deployement by overriding the default OSS sonatype url.
build.gradle
Outdated
snapshotRepository(url: publishingRepositoryUrlSnapshot) { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the purpose for the SNAPSHOT part, that could help to test uportal-start with new features from uPortal source !
So now I need that reviewers watch on this commit ;) Thx ! |
If this PR is a problem don't hesitate to report me it. |
Thanks @jgribonvald! 🙇 |
Checklist
Description of change
Provide the ability to externalize url setting for local deployement by overriding the default OSS sonatype url.