GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

Error: Bad repository URI #69

Open cvaught opened 8 years ago

cvaught commented 8 years ago

I have a Java Managed VM that when I try to run or deploy it returns the Bad repository URI error. The git repos is correct. That being said this is a multiple module repo where the other modules are normal java app engine modules. I was finally able to get the module deployed by removing the repository setting from the app.yaml file that was created then running:

 gcloud preview app deploy path/to/app.yaml --version [version]

This is obviously not ideal.

ludoch commented 8 years ago

Can you attach the exact entire ouput of the mvn gcloud:run or mvn gcloud:deploy command? What is the version of the plugin in the pom.xml And what is the version of the Cloud SDK?

Are you using an EAR maven project?

cvaught commented 8 years ago

Yes, my project is an EAR maven project. It fails on the managed vm module when it gets to it with the same error so I have just started trying to run/deploy just the managed vm module for the time being. The project also contains a module that only includes shared code between some of the modules but isn't deployed.

See below for the entire output and version numbers.

    <appengine.version>1.9.30</appengine.version>
    <gcloud.plugin.version>2.0.9.89.v20151202</gcloud.plugin.version>

Chriss-MBP:svgtopdf chrisvaught$ mvn gcloud:run [INFO] Scanning for projects... [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building svgtopdf 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> gcloud-maven-plugin:2.0.9.89.v20151202:run (default-cli) > package @ svgtopdf >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ svgtopdf --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/chrisvaught/_repos/flatterfiles/svgtopdf/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ svgtopdf --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ svgtopdf --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/chrisvaught/_repos/flatterfiles/svgtopdf/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ svgtopdf --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ svgtopdf --- [INFO] No tests to run. [INFO] [INFO] --- maven-war-plugin:2.6:war (default-war) @ svgtopdf --- [INFO] Packaging webapp [INFO] Assembling webapp [svgtopdf] in [/Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/svgtopdf-1.0] [INFO] Processing war project [INFO] Copying webapp resources [/Users/chrisvaught/_repos/flatterfiles/svgtopdf/src/main/webapp] [INFO] Processing overlay [ id com.cmv.flatterfiles:source] [INFO] Webapp assembled in [448 msecs] [INFO] Building war: /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/svgtopdf-1.0.war [INFO] [INFO] <<< gcloud-maven-plugin:2.0.9.89.v20151202:run (default-cli) < package @ svgtopdf <<< [INFO] [INFO] --- gcloud-maven-plugin:2.0.9.89.v20151202:run (default-cli) @ svgtopdf --- [INFO] [INFO] Running gcloud app run... [INFO] Creating staging directory in: /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/appengine-staging [INFO] Running appcfg --disable_update_check -A notused -V ver3 stage /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/svgtopdf-1.0 /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/appengine-staging Reading application configuration data...

Beginning interaction for module svgtopdf... 0% Generated git repository information file. Success. Temporary staging for module svgtopdf directory left in /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/appengine-staging [INFO] Running python -S /Users/chrisvaught/google-cloud-sdk/platform/google_appengine/dev_appserver.py --skip_sdk_update_check=true -A drawingmanager /Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/svgtopdf-1.0/app.yaml --log_level=info [INFO] Traceback (most recent call last): [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in [INFO] _run_file(file, globals()) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 79, in _run_file [INFO] execfile(_PATHS.script_file(scriptname), globals) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1040, in [INFO] main() [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1033, in main [INFO] dev_server.start(options) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 758, in start [INFO] options.config_paths, options.app_id) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 831, in init [INFO] module_configuration = ModuleConfiguration(config_path, app_id) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 127, in init [INFO] self._config_path) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 424, in _parse_configuration [INFO] config, files = appinfo_includes.ParseAndReturnIncludePaths(f) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/api/appinfo_includes.py", line 82, in ParseAndReturnIncludePaths [INFO] appyaml = appinfo.LoadSingleAppInfo(appinfo_file) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/api/appinfo.py", line 2210, in LoadSingleAppInfo [INFO] listener.Parse(app_info) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/api/yaml_listener.py", line 227, in Parse [INFO] self._HandleEvents(self._GenerateEventParameters(stream, loader_class)) [INFO] File "/Users/chrisvaught/google-cloud-sdk/platform/google_appengine/google/appengine/api/yaml_listener.py", line 178, in _HandleEvents [INFO] raise yaml_errors.EventError(e, event_object) [INFO] google.appengine.api.yaml_errors.EventError: Bad repository URI: git@bitbucket.org:cvaught/flatterfiles.git [INFO] in "/Users/chrisvaught/_repos/flatterfiles/svgtopdf/target/svgtopdf-1.0/app.yaml", line 52, column 1 Exception in thread "standard-out-redirection-devappserver" [ERROR] Error: gcloud app command with exit code : 1 [ERROR] java.lang.RuntimeException: The Java Dev Server has stopped. org.apache.maven.plugin.MojoExecutionException: Error: gcloud app command exit code is: 1 at com.google.appengine.gcloudapp.AbstractGcloudMojo$1.run(AbstractGcloudMojo.java:346) at com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:380) at com.google.appengine.gcloudapp.GCloudAppRun.execute(GCloudAppRun.java:292) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.294 s [INFO] Finished at: 2015-12-09T19:59:14-06:00 [INFO] Final Memory: 17M/316M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.89.v20151202:run (default-cli) on project svgtopdf: Execution error: org.apache.maven.plugin.MojoExecutionException: Error: gcloud app command exit code is: 1 -> [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

gregw commented 8 years ago

@ludoch I think this is the same problem I was having. Even though the pom had a with a https URI to the repro, the plugin (and/or SDK) was seeing the origin repo from git directly, which was an ssh style. Once I switched to using https for the git repo, this style of error went away.

ludoch commented 8 years ago

I see!

On Thu, Dec 10, 2015 at 3:25 PM, Greg Wilkins notifications@github.com wrote:

@ludoch https://github.com/ludoch I think this is the same problem I was having. Even though the pom had a with a https URI to the repro, the plugin (and/or SDK) was seeing the origin repo from git directly, which was an ssh style. Once I switched to using https for the git repo, this style of error went away.

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/69#issuecomment-163784986 .

cvaught commented 8 years ago

Switching to https did fix this error for me as well.

keithbuel commented 8 years ago

Getting the error when running: mvn gcloud:run I got passed it by commenting out the validation because moving to https is not a good option for me:

diff platform/google_appengine/google/appengine/api/appinfo.py ~/Desktop/appinfo.py 
1611,1612c1611,1612
<     #if not re.match(SOURCE_REPO_RE_STRING, uri):
<     #  raise validation.ValidationError('Bad repository URI: %s' % uri)
---
>     if not re.match(SOURCE_REPO_RE_STRING, uri):
>       raise validation.ValidationError('Bad repository URI: %s' % uri)

using:

$ gcloud --version
Google Cloud SDK 91.0.1

app-engine-java 1.9.30
app-engine-python 1.9.30
bq 2.0.18
bq-nix 2.0.18
core 2015.12.16
core-nix 2015.11.24
gcloud 
gsutil 4.16
gsutil-nix 4.15

maven:

<version>2.0.9.90.v20151210</version>