Let’s take a look at the problem code:

[CODE]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:get (default-cli) on project standalone-pom: Couldn’t download artifact: Could not transfer artifact org.cyanogenmod:gello:apk:40 from/to central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds): peer not authenticated
[ERROR] org.cyanogenmod:gello:apk:40
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false),
[ERROR] central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds, releases=true, snapshots=true)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Export includes file: art/compiler/Android.mk — /home/alaskalinuxuser/compile/build_aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libart-compiler_intermediates/export_includes
Export includes file: art/runtime/Android.mk — /home/alaskalinuxuser/compile/build_aokp6/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libart_intermediates/export_includes
make: *** [/home/alaskalinuxuser/compile/build_aokp6/out/target/common/obj/APPS/Gello_intermediates/org.cyanogenmod.gello-40.apk] Error 1
make: *** Waiting for unfinished jobs….
[/CODE]

Here was a problem that stumped me for quite some time. Mainly because the solutions offered online were the wrong ones. Every Google search I did led me to the same two answers: install maven and update my keys for openJDK-7. The problem with those solutions is that neither one of them were the real problem. At least, not that I know of. I did find a workaround for this issue, but never actually solved it.

The problem: apparently, to save time while compiling, Gello, CM’s new browser, is downloaded via maven rather than actually built on your machine. I am sure that cuts down on the compile time by a minute or two, but probably doesn’t actually save much time. Especially on my slow internet connection.

For some reason, when contacting the maven.cyanogenmod.org repo and trying to download the prebuilt Gello, something goes wrong. The only way to see what went wrong would be to re-run maven with the -e switch to get all of the details.

The workaround:
While working on this, I decided to attack this from a different angle, I decided, rather than solving the problem, to find a workaround. How can I get Gello without using the prebuilts? Well, you can:

export WITH_GELLO_SOURCE=true

And then when you compile, make will attempt to build Gello from the source you have. Except that you probably don’t have the source in your tree, like I found out by trying this. Yes, since you are expected to download the prebuilt, you then don’t download the source. So that would work, if you go and download all of the source.

Or you can just ditch Gello by deleting the Gello folder from the vendor/aokp folder. Then you will not build Gello, or so I though. This does work, provided that your device tree does not specifically call for Gello to be made in your boardconfig file or your device.mk file. Provided those are both true, then you will not get this error.

But, what if you want Gello? Well, you can always download the prebuilt version yourself and add it to your prebuilt folder. Which is the easy way around this mess.

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *