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

Java class path missing file separator? #89

Open ghost opened 8 years ago

ghost commented 8 years ago

I am not 100% sure about this since I am quite confused about the whol GAE and Compute Engine stuff but this is how I defined the <custom_entrypoint>:

<custom_entrypoint>java
    -Dgcloud.java.application=${project.build.directory}/${project.build.finalName}
    -Djetty.home=${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime
    -Djetty.base=${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/jetty-base-sdk
    -Dcom.google.apphosting.vmruntime.VmRuntimeFileLogHandler.pattern=/tmp/log.%g
    -jar
    ${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime/start.jar
    -module=http
    jetty.port={port}
</custom_entrypoint>

and this is why I see in the log

[INFO] com.google.apphosting.utils.config.AppEngineConfigException: Could not locate E:\java\mz\mz-server\mz-web-server\target\mz-web-server-0.1-SNAPSHOT\javamzmz-servermz-web-servertarget\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

if I run

mvn gcloud:run

I am not sure if this problem comes from the gcloud-maven-plugin but it seems something gives

javamzmz-servermz-web-servertarget

which should actually be

java\mz\mz-server\mz-web-server\target
ludoch commented 8 years ago

Not sure what to say, but this is working for me, on Windows 10:

See the gcloud.gcloud_directory instead of what you declare:

 <plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>gcloud-maven-plugin</artifactId>
    <version>2.0.9.111.v20160527</version>
    <configuration>

        <custom_entrypoint>java

-Dgcloud.java.application=${project.build.directory}/${project.build.finalName}

-Djetty.home=${gcloud.gcloud_directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime

-Djetty.base=${gcloud.gcloud_directory}/platform/google_appengine/google/appengine/tools/java/lib/jetty-base-sdk

-Dcom.google.apphosting.vmruntime.VmRuntimeFileLogHandler.pattern=/tmp/log.%g -jar ${gcloud.gcloud_directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime/start.jar -module=http jetty.port={port}

On Mon, May 30, 2016 at 10:09 AM, Stefan Falk notifications@github.com wrote:

I am not 100% sure about this since I am quite confused about the whol GAE and Compute Engine stuff but this is how I defined the :

java -Dgcloud.java.application=${project.build.directory}/${project.build.finalName} -Djetty.home=${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime -Djetty.base=${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/jetty-base-sdk -Dcom.google.apphosting.vmruntime.VmRuntimeFileLogHandler.pattern=/tmp/log.%g -jar ${gcloud.directory}/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime/start.jar -module=http jetty.port={port}

and this is why I see in the log

[INFO] com.google.apphosting.utils.config.AppEngineConfigException: Could not locate E:\java\mz\mz-server\mz-web-server\target\mz-web-server-0.1-SNAPSHOT\javamzmz-servermz-web-servertarget\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

if I run

mvn gcloud:run

I am not sure if this problem comes from the gcloud-maven-plugin but it seems something gives

javamzmz-servermz-web-servertarget

which should actually be

java/mz/mz-server/mz-web-server/target

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/89, or mute the thread https://github.com/notifications/unsubscribe/AAE4zXg9TIDyIdH1nL4NR8YwhBl04YfLks5qGxnQgaJpZM4Ip8BM .

ghost commented 8 years ago

I don't know what to say. I think I am using the latest version (got to check that at home but I think it's the one you're referring). All I see is the debug output up there and

mz-web-server-0.1-SNAPSHOT\javamzmz-servermz-web-servertarget\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

is definitely wrong and should be

mz-web-server-0.1-SNAPSHOT\java\mz\mz-server\mz-web-server\target\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

What I am not so sure about is whose fault this is and what I could do against it. Could this be an error that has something to do with gcloud-maven-plugin or am I doing something wrong here? All I do is call mvn gcloud:run.

Edit: I am using version 2.0.9.111.v20160525 which is listed on https://github.com/GoogleCloudPlatform/gcloud-maven-plugin at this time.

ludoch commented 8 years ago

Do you mind sharing (privately is needed) the pom.xml? Maybe there are some extra processing involved changing some properties?

On Tue, May 31, 2016 at 4:02 AM, Stefan Falk notifications@github.com wrote:

I don't know what to say. I think I am using the latest version (got to check that at home but I think it's the one you're referring). All I see is the debug output up there and

mz-web-server-0.1-SNAPSHOT\javamzmz-servermz-web-servertarget\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

is definitely wrong and should be

mz-web-server-0.1-SNAPSHOT\java\mz\mz-server\mz-web-server\target\mz-web-server-0.1-SNAPSHOT\WEB-INF\appengine-web.xml

What I am not so sure about is whose fault this is and what I could do against it. Could this be an error that has something to do with gcloud-maven-plugin or am I doing something wrong here? All I do is call mvn gcloud:run.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/89#issuecomment-222657233, or mute the thread https://github.com/notifications/unsubscribe/AAE4zSjjkV-z8qUXQTiZIzqRQpFckS3sks5qHBVggaJpZM4Ip8BM .

ghost commented 8 years ago

@ludoch In the meantime I changed the way I am deploying my application to the google cloud actually - not just because of this error but actually because I did it kind of wrong.

I don't know why I got this issue up there and maybe it was my fault but I think you can close this issue. It must have been something on my side I guess.