# Ignition 8 mvn install command

**URL:** <https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443>\
**Category:** Module Development\
**Tags:** ignition80\
**Created:** [October 6, 2020, 9:00pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443 "2020-10-06T21:00:52Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 6, 2020, 9:00pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/1 "2020-10-06T21:00:52Z")

</div>

I’m developing a module for Ignition 8 and using a docker container as my Ignition 8 server. The error message I’m getting is:  
`Could not post the module to the Gateway.: Could not post module to gateway. Error writing to server -> [Help 1]`

I have included the module upload argument into the gateway config:  
`-Dia.developer.moduleupload=true`

I can also see the servlet is active from my web browser at:  
[http://localhost:8088/system/DeveloperModuleLoadingServlet](http://localhost:8088/system/DeveloperModuleLoadingServlet)

I’m using v1.1.0 for the ignition-maven-plugin. Anything else I’m missing or need to check?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 6, 2020, 9:08pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/2 "2020-10-06T21:08:20Z")

</div>

if you re-run maven with the `-e` switch what does the full stack trace say?

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 6, 2020, 11:06pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/3 "2020-10-06T23:06:31Z")

</div>

```auto
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not post the module to the Gateway.
    at com.inductiveautomation.ignitionsdk.PostModuleMojo.execute (PostModuleMojo.java:73)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not post module to gateway.
    at com.inductiveautomation.ignitionsdk.PostModuleMojo.postModuleToGateway (PostModuleMojo.java:114)
    at com.inductiveautomation.ignitionsdk.PostModuleMojo.execute (PostModuleMojo.java:71)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.IOException: Error writing to server
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:719)
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:731)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1616)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1523)
    at com.inductiveautomation.ignitionsdk.PostModuleMojo.postModuleToGateway (PostModuleMojo.java:105)
    at com.inductiveautomation.ignitionsdk.PostModuleMojo.execute (PostModuleMojo.java:71)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 6, 2020, 11:24pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/4 "2020-10-06T23:24:40Z")

</div>

Hmm. Don’t know, looks like some kind of network problem:

```auto
Caused by: java.io.IOException: Error writing to server
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:719)
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:731)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1616)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1523)

```

Obvious guess would be something to do with it running in a docker container but I don’t know where to start looking. Firewall or AV maybe? Not sure why your browser resolves it without issue, though.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 6, 2020, 11:28pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/5 "2020-10-06T23:28:21Z")

</div>

I just added the debug logger on your plugin there and I think this is failing on line 105 of your PostModuleMojo class when we’re trying to read back whatever the gateway reply is… I was able to see the “Successfully wrote to gateway” message.

> <https://github.com/inductiveautomation/ignition-maven-plugin/blob/master/src/main/java/com/inductiveautomation/ignitionsdk/PostModuleMojo.java>

```
        BufferedReader br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
        String line = null;

        while ((line = br.readLine()) != null) {
            getLog().debug(line);
        }
```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 6, 2020, 11:33pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/6 "2020-10-06T23:33:29Z")

</div>

Maybe you can capture the traffic from the plugin vs the browser in Wireshark and we’ll see a difference.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 6, 2020, 11:40pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/7 "2020-10-06T23:40:42Z")

</div>

Yup good idea - here’s a link to my wireshark capture:

> **[MavenPlugin.pcapng](https://www.dropbox.com/s/ailw0zbw1leas67/MavenPlugin.pcapng?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 6, 2020, 11:42pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/8 "2020-10-06T23:42:15Z")

</div>

I don’t think the HttpURLConnection used by the plugin is configured to follow redirects.

Feel free to make that change and submit a PR. You can `mvn install` the modified plugin and use it locally until we release it.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 6, 2020, 11:51pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/9 "2020-10-06T23:51:10Z")

</div>

Right will do thank you Kevin 👍

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 7, 2020, 12:34am UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/10 "2020-10-07T00:34:04Z")

</div>

I think the URL in the plugin could be updated as well: it’s now [http://localhost:8088/system/DeveloperModuleLoadingServlet](http://localhost:8088/system/DeveloperModuleLoadingServlet) and not [http://localhost:8088/main/system/DeveloperModuleLoadingServlet](http://localhost:8088/main/system/DeveloperModuleLoadingServlet), which is where the redirect is coming from.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [March 16, 2021, 7:47pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/11 "2021-03-16T19:47:42Z")

</div>

Did this ever get merged into the plugin? Having the exact same issue with a gateway running in a local docker container on port 80, have tried

```auto
<gatewayAddress>http://localhost:80</gatewayAddress>

```

and

```auto
<gatewayAddress>http://localhost</gatewayAddress>

```

to no avail

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 16, 2021, 7:48pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/12 "2021-03-16T19:48:59Z")

</div>

No it’s sitting in a PR if you want to build yourself a copy: [https://github.com/inductiveautomation/ignition-maven-plugin/pull/4](https://github.com/inductiveautomation/ignition-maven-plugin/pull/4)

He kept adding commits and then I forgot all about it.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [March 16, 2021, 9:43pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/13 "2021-03-16T21:43:14Z")

</div>

Yeah sorry I’m all done playing if you’d like to merge it. I was playing with adding another maven goal to sign the module but I decided that was too much crap in one pull request (and it was a dumb idea anyway).

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [May 25, 2021, 10:48pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/14 "2021-05-25T22:48:31Z")

</div>

@Kevin.Herron is there anyway we can publish this to your maven repository?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 26, 2021, 1:45pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/15 "2021-05-26T13:45:00Z")

</div>

I’ll try to do a release of the plugin today.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 26, 2021, 3:08pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/16 "2021-05-26T15:08:28Z")

</div>

Okay, version 1.2.0 of the plugin is now published to Maven Central. Should be available soon if not already.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [May 26, 2021, 7:39pm UTC](https://forum.inductiveautomation.com/t/ignition-8-mvn-install-command/39443/17 "2021-05-26T19:39:55Z")

</div>

Thanks Kevin!
