private void initLegacyNetSpec(String net) {
        if (net != null) {
            this.mode = extractMode(net);
            if (this.mode == Mode.container) {
                this.name = net.substring(Mode.container.name().length() + 1);
            } else if (this.mode == Mode.custom) {
                this.name = net;
            } else {
                this.name = null;
            }
        } else {
            this.mode = null;
            this.name = null;
        }
    }
Legacy constructor using the &lt;net&gt; config
@param net net, encapsulating mode &amp; name.
src/main/java/io/fabric8/maven/docker/config/NetworkConfig.java