James Funk James Funk - 3 months ago 54
Java Question

Google Appengine appengine.version

I'm following Google's guide here:

https://cloud.google.com/appengine/docs/java/gettingstarted/uploading

I've followed step by step, so it matches perfectly. I've almost finished it, I'm at step 2, which has me run the following:

mvn appengine:update


It has me authenticate, which goes fine, but then it throws this error:


400 Bad Request Error when loading application configuration:Unable to
assign value '1.9.18' to attribute 'version':Value '1.9.18' for
version does not match expression
'^(?:^(?!-)[a-z\d-]{0,62}[a-z\d]$)$'


Looking into the pom.xml file, it shows:

<appengine.version>1.9.18</appengine.version>


It's true this doesn't match that regular expression. So I tested, and changed "1.9.18" to "1-9-18", which does match it. Sadly, it then gives this error:


[ERROR] No plugin found for prefix 'appengine' in the current project and in the plugin groups [org.apache.maven.plugins, org .codehaus.mojo] available from the repositories [local (C:\Users\James.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]


Am I missing something? It seems like the regular expression or something else is out of date, and won't let me continue.

Answer

This link: Bad request when updating Appengine with mvn appengine:update pointed me in the right direction. In pom.xml, inside of <properties>, I added

<myversion>1.9.18</myversion>

and modified this one

<appengine.version>1-9-18</appengine.version>

Then lower down had the version referenced like this

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>${myversion}</version>
    ...
</plugin>

I did not need to edit appengine-web.xml