Yay! That works :)
Now, iirc, the next step is to log-in to the Sonatype (or is it Nexus?)
Maven web interface thingy where I have to press a few buttons to
graduate the release from staging.
Only problem is I can't remember the URL (again). Anyone?
On 24/10/12 22:14, CīŋŊdric Champeau wrote:
> Right. I should have checked the vert.x repo first. You have a file
> named gradle/maven.gradle which gets included. Inside, you find this:
>
> uploadArchives {
> group 'build'
> description = "Does a maven deploy of archives artifacts"
> repositories {
> mavenDeployer {
> configuration = configurations.archives
> repository(url:
> "
https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
> authentication(*userName:****sonatypeUsername**,****password:****sonatypePassword*)
> }
> snapshotRepository(url:
> "
https://oss.sonatype.org/content/repositories/snapshots/") {
> authentication(userName: sonatypeUsername, password: sonatypePassword)
> }
> if (isReleaseVersion) {
> beforeDeployment { MavenDeployment deployment ->
> signing.signPom(deployment) }
> }
> configurePom(pom)
> }
> }
> }
> So it looks for properties named "sonatypeUsername" and
> "sonatypePassword" which are defined this way:
>
> if (!hasProperty('sonatypeUsername')) {
> ext.sonatypeUsername = ''
> }
> if (!hasProperty('sonatypePassword')) {
> ext.sonatypePassword = ''
> }
> Which means to me that the only thing you need is to declare them when
> you start the build:
>
> |./gradlew -PsonatypeUsername=foo -PsonatypePassword=pass uploadArchives|
>
>
>
> Le 24/10/2012 22:56, Tim Fox a īŋŊcrit :
>> Hi Cedric,
>>
>> The Gradle build file currently says this:
>>
>> buildscript {
>> repositories {
>> mavenLocal()
>> maven { url
>> '
https://oss.sonatype.org/content/repositories/snapshots' }
>> mavenCentral()
>> }
>> }
>>
>> I don't see how this maps to your example. Where would I add the
>> username and password?
>>
>> Also... previously I had this working before and it would
>> automatically pick up some config file from somewhere (iirc in a
>> directory in my home?).
>>
>> On 24/10/12 21:36, CīŋŊdric Champeau wrote:
>>> You need to specify credentials in the uploadArchive configuration.
>>> Something like this would read them from system properties for
>>> example :
>>>
>>> uploadArchives {
>>> repositories {
>>> mavenDeployer {
>>> def credentials = [
>>> userName:
>>> System.getProperty('deploy.username'),
>>> password: System.getProperty('deploy.password')
>>> ]
>>> repository(id:'
codehaus.org',url:
>>> uri('dav:
https://dav.codehaus.org/repository/groovy'),
>>> authentication: credentials)
>>> snapshotRepository(id:'
codehaus.org',url:
>>> uri('dav:
https://dav.codehaus.org/snapshots.repository/groovy'),
>>> authentication: credentials)
>>> }
>>> }
>>> }
>>>
>>> Le 24/10/2012 21:44, Tim Fox a īŋŊcrit :
> CīŋŊdric Champeau