faresd / appengine-maven-plugin

Automatically exported from code.google.com/p/appengine-maven-plugin
Apache License 2.0
0 stars 0 forks source link

Store email and password in ~/.m2/Settings.xml #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is it possible to store the email and password in ~/.m2/settings.xml for use 
with automated deployments?

If this or is not possible, would it be possible to add this to the wiki?

Nice job and thanks,
Brandon Donnelson

Original issue reported on code.google.com by branflak...@gmail.com on 26 Jan 2013 at 6:54

GoogleCodeExporter commented 8 years ago

Original comment by matts...@google.com on 19 Feb 2013 at 6:44

GoogleCodeExporter commented 8 years ago
There are some ways to do this, I'll see about putting some docs together.

Original comment by matts...@google.com on 19 Feb 2013 at 6:48

GoogleCodeExporter commented 8 years ago
using --oauth2 with the first appcfg update would be much better, no?

Original comment by l...@google.com on 11 Apr 2013 at 3:57

GoogleCodeExporter commented 8 years ago
The main use case for this is automated deploys from ci build slaves...
where would we pass in/store the tokens?

Original comment by alex@bedatadriven.com on 11 Apr 2013 at 5:57

GoogleCodeExporter commented 8 years ago
Hey Matt,

"There are some ways to do this"
Can you name a few ways to do this or provide some pointers? Of course I want 
to use this with our CI server. Without this feature I cannot use the plugin.

Thanks,
Ingo

Original comment by ingo.jae...@gmail.com on 17 Apr 2013 at 1:07

GoogleCodeExporter commented 8 years ago
One good way to store credentials would be to use Maven server password 
encryption:

http://maven.apache.org/guides/mini/guide-encryption.html

That said, I'm really confused about the current behavior. I turned off OAuth2 
by including

<appengine.oauth2>false</appengine.oauth2>

in my pom.xml file. However, I was completely surprised when I ran "mvn 
appengine:update" and it WORKED without prompting for any email or password! 
Where in the world is it getting credentials to update my app?

Original comment by j...@jsawyer.net on 21 Apr 2013 at 5:33

GoogleCodeExporter commented 8 years ago
OK, found it: a cookie stored in ~/.java/.userPrefs. Sorry for the digression.

Original comment by j...@jsawyer.net on 21 Apr 2013 at 6:42

GoogleCodeExporter commented 8 years ago
Hi,

I am having the same problem of not knowing how to use the plugin on my CI 
server.

I don't have access to the CI server to plant an oauth token on the users 
folder.

Matt, did you find the time yet to write those docs? ;)

Thanks

Original comment by luc.de.c...@gmail.com on 12 Jun 2013 at 12:20

GoogleCodeExporter commented 8 years ago
Maven has a <server> declaration that is perfect for this. One can define their 
credentials in settings.xml and the plugin just needs to know the id of the 
server to pull the username and password.

Original comment by brian.ch...@aawhere.com on 3 Oct 2013 at 10:19

GoogleCodeExporter commented 8 years ago
How do you specify which <server> to pick form the settings.xml?

Original comment by simon.pi...@arcbees.com on 17 Oct 2013 at 7:48

GoogleCodeExporter commented 8 years ago
In the old maven-gae-plugin, there was a server configuration parameter that 
specified this, defaulting to "appengine.google.com"

Original comment by alex@bedatadriven.com on 17 Oct 2013 at 8:10

GoogleCodeExporter commented 8 years ago
I managed to work around this issue using this config:

<plugin>
  <groupId>com.google.appengine</groupId>
  <artifactId>appengine-maven-plugin</artifactId>
  <version>1.8.6</version>
  <configuration>
    <email>your_automated_ci@email.com</email>
    <oauth2>false</oauth2>
    <noCookies>true</noCookies>
    <passin>true</passin>
  </configuration>
</plugin>

and by invoking the update goal like this:

mvn clean appengine:update <<< "yourPassW00rd"

Original comment by simon.pi...@arcbees.com on 18 Oct 2013 at 5:42

GoogleCodeExporter commented 8 years ago
The problem is that your password is in clear in the command line in your CI 
server. Not really nice in terms of security.

Original comment by julien.d...@gmail.com on 22 May 2014 at 3:57

GoogleCodeExporter commented 8 years ago
Yes I totally agree with you. Picking the credentials from the <server> in 
Maven's settings.xml would be a much cleaner solution. 

Original comment by simon.pi...@arcbees.com on 22 May 2014 at 4:03

GoogleCodeExporter commented 8 years ago
i tried to use this command: mvn clean appengine:update <<< "yourPassW00rd"... 
but how do i do it? The Travis-ci console keeps saying my email and password do 
not match.

I though it was just substituting yourPassW00rd with my google app engine 
password.

Original comment by fabioand...@gmail.com on 28 May 2014 at 11:01

GoogleCodeExporter commented 8 years ago
@simon - this does not work in Jenkins. Not the standard way at least.

We need this...

Original comment by jens.sch...@labbird.com on 8 Oct 2014 at 6:43

GoogleCodeExporter commented 8 years ago
I forked the project and merged in the settings.xml authentication from the old 
kindleit plugin.

https://github.com/rdwallis/appengine-maven-plugin

Needs some codestyle attention but otherwise works well.

No idea how to issue a PR to this project though.  Are there contribution 
guidelines anywhere?

Original comment by rdwal...@gmail.com on 22 Nov 2014 at 4:28

GoogleCodeExporter commented 8 years ago
'+'1000! You rock!

Original comment by christia...@arcbees.com on 22 Nov 2014 at 4:29