Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Deploy maven artifact (jar-files) to the official repo
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Johannes Lichtenberger  
View profile  
 More options Sep 21 2012, 12:33 pm
From: Johannes Lichtenberger <lichtenberger.johan...@gmail.com>
Date: Fri, 21 Sep 2012 18:33:04 +0200
Local: Fri, Sep 21 2012 12:33 pm
Subject: Deploy maven artifact (jar-files) to the official repo

Hello,

is it possible to deploy the Java jar-files (sources and "normal") to the
official maven-repo after a successful build, meaning no test failures...?
That would be great :-)

kind regards,
Johannes


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options Sep 21 2012, 12:41 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Fri, 21 Sep 2012 20:41:00 +0400
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

2012/9/21 Johannes Lichtenberger <lichtenberger.johan...@gmail.com>

> is it possible to deploy the Java jar-files (sources and "normal") to the
> official maven-repo after a successful build, meaning no test failures...?
> That would be great :-)

No. There may be a way to accomplish that with secure env variables fairly
soon but nothing to date.
--
MK

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maik Riechert  
View profile  
 More options Oct 28 2012, 1:49 pm
From: Maik Riechert <maik.riech...@arcor.de>
Date: Sun, 28 Oct 2012 10:49:37 -0700 (PDT)
Local: Sun, Oct 28 2012 1:49 pm
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

Michael Klishin wrote:

> No. There may be a way to accomplish that with secure env variables fairly
> soon but nothing to date.

I thought about that, too. Maybe not pushing release versions to Central
(in my case through Sonatype OSSRH), but SNAPSHOT versions on every commit.
Of course, you could also push release versions when creating a git tag.

So, what we need to do is first adding a <server> entry to
~/.m2/settings.xml which has your username and password of the repository.
Then the ssh-agent must be running and our private gpg key loaded (by
optionally providing a password) for signing the jars. And then, for
snapshots you would run "mvn clean deploy" and for releases it would be
"mvn release:clean", "mvn release:prepare", "mvn release:perform" followed
by some goals of the nexus maven plugin for closing and promoting.

I think it could be done although it requires some initial work. The tricky
part would be to store all private data in secure env variables, let a
shell script read and write them to files and then run the maven goals.
That would be really cool.

Cheers
Maik


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rintcius Blok  
View profile  
 More options Nov 11 2012, 8:44 am
From: Rintcius Blok <rintc...@gmail.com>
Date: Sun, 11 Nov 2012 05:44:08 -0800 (PST)
Local: Sun, Nov 11 2012 8:44 am
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

This would be really great to have!
Just an idea...
To implement it, it may be easier to start just with username/password
first (to be added to the m2 settings.xml), which would allow deploying
snapshots already.
In this way GPG infrastructure is not needed yet...

Rintcius


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maik Riechert  
View profile  
 More options Nov 12 2012, 12:45 pm
From: Maik Riechert <neothemach...@googlemail.com>
Date: Mon, 12 Nov 2012 18:44:59 +0100
Local: Mon, Nov 12 2012 12:44 pm
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

Rintcius Blok wrote:
> To implement it, it may be easier to start just with username/password
> first (to be added to the m2 settings.xml), which would allow
> deploying snapshots already.

Right, I created the first step of the puzzle:
https://gist.github.com/4060735

This appends the server entry to the settings.xml where username and
password are read from the environment varsSONATYPE_USERNAME
andSONATYPE_PASSWORD.

I downloaded the JVM base box and tried to test it locally but I had
some problems accessing the env vars (that I set manually) when sudoing.
I need to run the script as sudo because the settings.xml is owned by
root with group root and has permissions rw-r--r--. I don't know if this
issue will appear in actual builds. Any advice?

Cheers
Maik


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options Nov 12 2012, 1:10 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Mon, 12 Nov 2012 22:10:03 +0400
Local: Mon, Nov 12 2012 1:10 pm
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

2012/11/12 Maik Riechert <neothemach...@googlemail.com>

> I downloaded the JVM base box and tried to test it locally but I had some
> problems accessing the env vars (that I set manually) when sudoing. I need
> to run the script as sudo because the settings.xml is owned by root with
> group root and has permissions rw-r--r--.

We can change that.

> I don't know if this issue will appear in actual builds. Any advice?

sudo resets env variables to a few whitelisted ones. We won't add these
variables to the white list but changing permissions to 664 and
owner to "travis" is a good idea.

--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maik Riechert  
View profile  
 More options Nov 12 2012, 3:02 pm
From: Maik Riechert <neothemach...@googlemail.com>
Date: Mon, 12 Nov 2012 21:02:10 +0100
Local: Mon, Nov 12 2012 3:02 pm
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo
Michael Klishin:
> sudo resets env variables to a few whitelisted ones. We won't add
> these variables to the white list but changing permissions to 664 and
> owner to "travis" is a good idea.

Great! I added the second part:
https://gist.github.com/4060735#file_.travis.yml

I think with that it should already work. Please leave a note once the
permission change is rolled out.

Cheers
Maik


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rintcius Blok  
View profile  
 More options Nov 17 2012, 11:17 am
From: Rintcius Blok <rintc...@gmail.com>
Date: Sat, 17 Nov 2012 08:17:24 -0800 (PST)
Local: Sat, Nov 17 2012 11:17 am
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

Great to see it you have something already!

Question about the encrypted password that is stored in travis.yml: is that
going to be safe to store there?
(I mean travis needs to be able to decrypt the password and use it, but
everyone else must NOT be able to do that.
Since travis is opensource I don't see how that can be achieved easily)
In my mind, I thought the password would be stored somewhere private (like
via the GUI).

I am very new to travis though, so it's very well possible that I am
missing something. Can someone explain how it will work?

Regards, Rintcius


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Björn Teichmann  
View profile  
 More options Dec 14 2012, 4:47 pm
From: Björn Teichmann <derfl...@googlemail.com>
Date: Fri, 14 Dec 2012 13:47:36 -0800 (PST)
Local: Fri, Dec 14 2012 4:47 pm
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

Any News on the permission change? I actually ran into the same problem
that the settings.xml is not writable by the python script provided by Maik
(great work btw, thx!).

Would be cool to finally automate the process pushing our builds to our
nexus repo.

Am Montag, 12. November 2012 19:10:45 UTC+1 schrieb Michael Klishin:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Björn Teichmann  
View profile  
 More options Dec 15 2012, 8:31 am
From: Björn Teichmann <derfl...@googlemail.com>
Date: Sat, 15 Dec 2012 05:31:47 -0800 (PST)
Local: Sat, Dec 15 2012 8:31 am
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

I've just found another way without changing the main settings.xml :-)

You just write it to a new file an provide the path to the mvn deploy
command.

> f = open(homedir + '/.m2/mySettings.xml', 'w')

- mvn clean deploy --settings ~/.m2/mySettings.xml

That's it, works like a charm! Thanks a lot guys!

Am Freitag, 14. Dezember 2012 22:47:36 UTC+1 schrieb Björn Teichmann:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maik Riechert  
View profile  
 More options Dec 15 2012, 11:06 am
From: Maik Riechert <neothemach...@googlemail.com>
Date: Sat, 15 Dec 2012 17:06:27 +0100
Local: Sat, Dec 15 2012 11:06 am
Subject: Re: [travis-ci] Deploy maven artifact (jar-files) to the official repo

That's great Björn! Works perfectly!! I like team work :)

Am 15.12.2012 14:31, schrieb Björn Teichmann:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »