Skip to content
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

Merged
merged 2 commits into from Jun 14, 2018
Merged

UP-5015 - Customize upload artifact url #1175

merged 2 commits into from Jun 14, 2018

Conversation

jgribonvald
Copy link
Contributor

Checklist
Description of change

Provide the ability to externalize url setting for local deployement by overriding the default OSS sonatype url.

@jgribonvald
Copy link
Contributor Author

jgribonvald commented Apr 27, 2018

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)
Copy link
Member

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

Copy link
Contributor Author

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 !

Copy link
Member

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

Copy link
Contributor Author

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 !

@ChristianMurphy ChristianMurphy added this to the 5.1.0 milestone Apr 27, 2018
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)
}

Copy link
Contributor Author

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 !

@jgribonvald
Copy link
Contributor Author

So now I need that reviewers watch on this commit ;)

Thx !

@ChristianMurphy ChristianMurphy modified the milestones: 5.1.0, 5.1.1 May 5, 2018
@jgribonvald jgribonvald changed the title Customize upload artifact url UP-5015 - Customize upload artifact url May 15, 2018
@ChristianMurphy ChristianMurphy modified the milestones: 5.1.1, 5.1.2 May 18, 2018
@jgribonvald
Copy link
Contributor Author

jgribonvald commented May 29, 2018

If this PR is a problem don't hesitate to report me it.
Else any review ?

@ChristianMurphy ChristianMurphy modified the milestones: 5.1.2, 5.2.0 Jun 14, 2018
@ChristianMurphy ChristianMurphy merged commit 3247a48 into uPortal-Project:master Jun 14, 2018
@ChristianMurphy
Copy link
Member

Thanks @jgribonvald! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants