https://github.com/apache/dubbo/blob/532ce72f8377abf8ff659430b86e0919c9aff562/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java#L240-L248 

What ever user use `instance` service discovery or `interface` service discovery, we also publish service name mapping info. 
But service name mapping need metadata report dependency, so if some one just use `interface` service discovery, the user still need need metadata report dependency.

Here we add a judgement, check current service config use `instance` service discovery or not, to judge publish service name mapping or not.

Invoker<?> invoker = PROXY_FACTORY.getInvoker(ref, (Class) interfaceClass, url);
                    DelegateProviderMetaDataInvoker wrapperInvoker = new DelegateProviderMetaDataInvoker(invoker, this);
                    Exporter<?> exporter = PROTOCOL.export(wrapperInvoker);
                    exporters.add(exporter);
                }
                MetadataUtils.publishServiceDefinition(url);
            }
        }
        this.urls.add(url);
    }
    @SuppressWarnings({"unchecked", "rawtypes"})
    /**
     * always export injvm
     */
    private void exportLocal(URL url) {
        URL local = URLBuilder.from(url)
                .setProtocol(LOCAL_PROTOCOL)
                .setHost(LOCALHOST_VALUE)
                .setPort(0)
                .build();
        Exporter<?> exporter = PROTOCOL.export(
                PROXY_FACTORY.getInvoker(ref, (Class) interfaceClass, local));
        exporters.add(exporter);
        logger.info("Export dubbo service " + interfaceClass.getName() + " to local registry url : " + local);
    }
    /**
     * Determine if it is injvm
     *
     * @return
     */