hector.mateos
hector.mateos

Reputation: 71

change default port 8080 maven gae goal appengine:devserver

I'm having a problem, probably is quite simple but I did not find the solution yet.

I'm trying to launch my local GAE server (through Run-configurations of Eclipse) on a specific port (8888 in my case) but it starts only at default port 8080 and after trying with different options ... I'm not lucky

Any ideas?

Upvotes: 6

Views: 4212

Answers (4)

Kim T
Kim T

Reputation: 6454

If you are following the tutorial: https://cloud.google.com/appengine/docs/standard/java/quickstart

It seems that the documentation has changed: https://cloud.google.com/appengine/docs/flexible/java/maven

Use <host> instead of <address>

Here is how you bind the host address for Docker:

<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>appengine-maven-plugin</artifactId>
  <version>1.3.2</version>
  <configuration>
    <enableJarClasses>false</enableJarClasses>
    <port>8080</port>
    <host>0.0.0.0</host>
    <admin_host>0.0.0.0</admin_host>
  </configuration>
</plugin>

Upvotes: 0

Nick
Nick

Reputation: 1822

The Google Plugin for eclipse (GPE) allows you to specify the port number on the second tab ('Server') in a run configuration.

If you're not using that (which you probably should be) you can configure the port in your pom directly like this:

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>${gae.version}</version>
    <configuration>
        <port>8080</port>
        <address>0.0.0.0</address>
    </configuration>
</plugin>

Upvotes: 1

alex
alex

Reputation: 2451

Run this from the cmd line: mvn help:describe -Dcmd=appengine:devserver -Ddetail - you'll see all the available options for appengine:devserver goal.

The one that you want is:

mvn appengine:devserver -Dappengine.port=8888

Upvotes: 11

IanGSY
IanGSY

Reputation: 3714

What have you tried?

Have you tried adding the --port 8888 option to your run configuration?

Upvotes: 0

Related Questions