title: maven compilation error : The filename, directory name, or volume label syntax is incorrect
body: <p>Am compiling my <code>pom.xml</code> file and am getting the below compilation error </p>
  
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.5.1:copy-dependencies (copy-dependencies) on project ElasticSearchUtility: Error copying artifact from C:\Users\10641516\.m2\repository\org\apache\lucene\lucene-sandbox\7.1.0\lucene-sandbox-7.1.0.jar to D:\Karthikeyan\ElasticSearch\ElasticSearch_Tesing\target\dependency-
      [ERROR] jars\lucene-sandbox-7.1.0.jar: The filename, directory name, or volume label syntax is incorrect
  </code></pre>
  
  <p>But the required .jar file is available in the specified path.</p>
  
  <p>I have created two java file my maven project one is POJO class and another one is java main class file. I want to make my project as an executable jar file which i want to run externally using <code>java -jar</code> command.</p>
  
  <p>Please find my pom.xml file</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;ElasticSearchUtility&lt;/groupId&gt;
  &lt;artifactId&gt;ElasticSearchUtility&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.elasticsearch&lt;/groupId&gt;
          &lt;artifactId&gt;elasticsearch&lt;/artifactId&gt;
          &lt;version&gt;6.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.elasticsearch.client&lt;/groupId&gt;
          &lt;artifactId&gt;elasticsearch-rest-high-level-client&lt;/artifactId&gt;
          &lt;version&gt;6.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.elasticsearch.client&lt;/groupId&gt;
          &lt;artifactId&gt;rest&lt;/artifactId&gt;
          &lt;version&gt;5.1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;downloadJavadocs&gt;false&lt;/downloadJavadocs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;!-- Set a compiler level --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;!-- Make this jar executable --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;**/log4j.properties&lt;/exclude&gt;
                      &lt;/excludes&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;mainClass&gt;ProjectJar.project.App&lt;/mainClass&gt;
                              &lt;classpathPrefix&gt;dependency-jars/&lt;/classpathPrefix&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- Copy project dependency --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-dependencies&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;!-- exclude junit, we need runtime dependency only --&gt;
                              &lt;includeScope&gt;runtime&lt;/includeScope&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/dependency-
                                  jars/&lt;/outputDirectory&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;/projects&gt;
  </code></pre>