title: Maven dependency in Mule project is not included in the build
body: <p>I have installed a JAR in local maven repository (because no longer available in Mule repository) and added as dependency in POM file</p>
  
  <pre><code>    &lt;dependency&gt;
            &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
            &lt;artifactId&gt;mule-module-rest-router&lt;/artifactId&gt;
            &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I also have XML namespace and schema location defined as </p>
  
  <pre><code>&lt;mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"  xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
  ...
  xmlns:rest-router="http://www.mulesoft.org/schema/mule/rest-router"
  version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
  .....
  http://www.mulesoft.org/schema/mule/rest-router http://www.mulesoft.org/schema/mule/rest-router/current/mule-rest-router.xsd"&gt;
  </code></pre>
  
  <p>Deploying in Mule 3.6.1 using Maven project in Anypoint Studio, getting errors</p>
  
  <pre><code>org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.mulesoft.org/schema/mule/rest-router/current/mule-rest-router.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not &lt;xsd:schema&gt;.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[?:?]
        at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[?:?]
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.mule.config.spring.MuleArtifactContext.loadBeanDefinitions(MuleArtifactContext.java:106) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:86) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:105) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:135) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:90) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:52) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:84) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:217) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:76) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:187) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:62) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:57) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:155) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:256) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:275) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:100) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:152) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.6.1.jar:?]
  INFO  2016-06-08 10:37:09,903 [main] org.mule.lifecycle.AbstractLifecycleManager: Disposing RegistryBroker
  ERROR 2016-06-08 10:37:10,044 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
  org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'rest-router:router'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":legacy-abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[?:?]
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) ~[?:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[?:?]
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[?:?]
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.mule.config.spring.MuleArtifactContext.loadBeanDefinitions(MuleArtifactContext.java:106) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) ~[spring-context-3.2.10.RELEASE.jar:3.2.10.RELEASE]
        at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:86) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:105) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:135) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:90) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:52) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:84) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:217) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:76) ~[mule-core-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:187) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:62) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:57) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:155) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:256) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArchiveDeployer.java:78) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDirectoryWatcher.java:275) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:150) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:100) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:152) ~[mule-module-launcher-3.6.1.jar:3.6.1]
        at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:15) ~[tooling-support-3.6.1.jar:?]
  </code></pre>
  
  <p>Upon investigation I found that mule-module-rest-router-1.2.jar is not included in the lib directory of deploy zip created in target directory. I have spent almost full day figuring out why this particular JAR is not getting included despite given in default scope of POM.xml. Please help!</p>