Documentation for publish-apk and publish-listing?

58 views
Skip to first unread message

Andreas Schildbach

unread,
Feb 7, 2015, 5:20:08 AM2/7/15
to maven-androi...@googlegroups.com
Hi there,

I'd like to look into more automated play store publishing. Is there any
documentation on the android:publish-apk and android:publish-listing
goals? The web site documentation lists two required parameters:

p12File: What's that? I only got an APK.
publisherEmail: Why do I need to supply my email address for APK
publishing? It's already configured in the Play Store interface.

How do I authenticate? I'd expect something like an oauth token, but I
can't find any related doc.

Cheers,

Andreas

Benoit Billington

unread,
Feb 7, 2015, 12:03:56 PM2/7/15
to maven-androi...@googlegroups.com

You need a p12 key and a specific email account created by Google via the dev dashboard thus this is the auth.
Normally there are links in the doc or you need to check the google publisher website as amp uses it internally.

--
You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andreas Schildbach

unread,
Feb 7, 2015, 12:52:12 PM2/7/15
to maven-androi...@googlegroups.com
I just noticed there is documentation here:

http://simpligility.github.io/android-maven-plugin/playstore-publisher.html

Didn't see that before.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-developers+unsub...@googlegroups.com.

Benoit Billington

unread,
Feb 7, 2015, 12:53:55 PM2/7/15
to maven-androi...@googlegroups.com

I hope this is good enough. If you think you can improve the doc please make a pull request.

To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com.

Andreas Schildbach

unread,
Feb 7, 2015, 1:24:12 PM2/7/15
to maven-androi...@googlegroups.com
I've got several issues. I'm running the following command line:

mvn android:publish-apk -Ppublisher -DapkFile=<path-to-my-apk>

Problem 1: If I don't run this from my project directory, I get this error message:
[ERROR] No plugin found for prefix 'android' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/aschildbach/.m2/repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]

I plan to upload from a different computer, so my project directory will not be available. I'd need to fake one if it's required -- not nice.


Problem 2: If I run this from my project directory, I get this error:
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.1.1:publish-apk (default-cli) on project oeffi: The parameters 'p12File', 'publisherEmail' for goal com.simpligility.maven.plugins:android-maven-plugin:4.1.1:publish-apk are missing or invalid -> [Help 1]

However, both parameters are configured as per the documentation in ~/.m2/settings.xml:

               <profile>
                        <id>publisher</id>
                        <activation>
                                <activeByDefault>false</activeByDefault>
                        </activation>
                        <properties>
                                <android.publisher.email>x...@developer.gserviceaccount.com</android.publisher>
                                <android.publisher.p12>~/dev/Google Play Android Developer-xxx.p12</android.publisher.p12>
                        </properties>
                </profile>

What am I missing?

William Ferguson

unread,
Feb 9, 2015, 5:53:41 PM2/9/15
to maven-androi...@googlegroups.com
If you are planning on executing this command from outside the project, then you need to specify the fully qualified name of the plugin. ie 
mvn com.simpligility.maven.plugins:android-maven-plugin:4.1.1:publish-apk

This is not plugin specific. This is core Maven.
By executing outside the project your are discarding all the project info that is required to provide the common short cuts to execution.

William

Andreas Schildbach

unread,
Feb 10, 2015, 4:03:50 PM2/10/15
to maven-androi...@googlegroups.com
Thanks! This fixes problem 1. However, now I'm running into problem 2 (see my previous mail).

Benoit Billington

unread,
Feb 10, 2015, 4:24:45 PM2/10/15
to maven-androi...@googlegroups.com
Thx William for the problem 1.

I was very busy so I couldn't reply earlier but here's the answer:
The doc needs to be updated it's "android.publisher.google.email" & "android.publisher.google.p12" (You can find that answer in the source code)

Can you provide a pull request to update the doc?



Benoit Billington

Andreas Schildbach

unread,
Feb 11, 2015, 4:52:25 AM2/11/15
to maven-androi...@googlegroups.com
Thanks, I created a PR.

Now I'm running into a next problem:

[INFO] --- android-maven-plugin:4.1.1:publish-apk (default-cli) @ standalone-pom ---
[INFO] /home/aschildbach/dev/android-sdk/build-tools/21.1.1/aapt [dump, xmltree, /home/aschildbach/dev/${project.basedir}/target/standalone-pom-1-aligned.apk, AndroidManifest.xml]
[INFO] W/asset   (25302): Asset path /home/aschildbach/dev/${project.basedir}/target/standalone-pom-1-aligned.apk is neither a directory nor file (type=1).
[INFO] ERROR: dump failed because assets could not be loaded
[ERROR] W/asset   (25302): Asset path /home/aschildbach/dev/${project.basedir}/target/standalone-pom-1-aligned.apk is neither a directory nor file (type=1).ERROR: dump failed because assets could not be loaded
[...]
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.1.1:publish-apk (default-cli) on project standalone-pom: Error while trying to figure out package name from inside apk file /home/aschildbach/dev/${project.basedir}/target/standalone-pom-1-aligned.apk -> [Help 1]

I'm not sure where it got that APK name from. I provided the -DapkFile= parameter and of course it points to somewhere different.

Also I wonder if there is some way to specify the package name used directly. I did not find a parameter in the doc of the publish-apk goal.



Benoit Billington

To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-developers+unsub...@googlegroups.com.

Benoit Billington

unread,
Feb 11, 2015, 3:48:29 PM2/11/15
to maven-androi...@googlegroups.com
I don't see any -DapkFile parameters in the doc


See "If you want to use the publisher outside of a project, you will need to supply the other required values:"



Benoit Billington

To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com.

Andreas Schildbach

unread,
Feb 12, 2015, 5:37:53 AM2/12/15
to maven-androi...@googlegroups.com


On Wednesday, February 11, 2015 at 9:48:29 PM UTC+1, Shu wrote:
I don't see any -DapkFile parameters in the doc

See "If you want to use the publisher outside of a project, you will need to supply the other required values:"

Thanks, -Dandroid.publisher.apkpath= works better.

 

Benoit Billington

unread,
Feb 12, 2015, 5:53:18 AM2/12/15
to maven-androi...@googlegroups.com

Yes ok and it says
User Property:android.publisher.apkpath

--

dsv...@bigvikinggames.com

unread,
Jun 2, 2016, 11:50:57 AM6/2/16
to Maven Android Developers
Hey guys anyone used this system to upload obb file with the apk?
is it possible?

Manfred Moser

unread,
Jun 2, 2016, 11:55:00 AM6/2/16
to maven-androi...@googlegroups.com
Here are the docs.

http://simpligility.github.io/android-maven-plugin/playstore-publisher.html

manfred

dsv...@bigvikinggames.com wrote on 02.06.2016 06:28:

> Hey guys anyone used this system to upload obb file with the apk?
> is it possible?
>
> --
> You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to maven-android-deve...@googlegroups.com <mailto:maven-android-deve...@googlegroups.com> .
> For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout> .
Reply all
Reply to author
Forward
0 new messages