title: Maven - for artifact the version cannot be empty
body: <p><strong>Problem:</strong> I am using maven and suddenly got some errors: </p>
  
  <pre><code>For artifact {org.springframework.boot:spring-boot-starter-data-jpa:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources)
  
  org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.springframework.boot:spring-boot-starter-data-jpa:null:jar}: The version cannot be empty.
      at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148)
      at org.apache.maven.artifact.DefaultArtifact.&lt;init&gt;(DefaultArtifact.java:123)
      at org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157)
      at org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57)
      at org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328)
      at org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503)
      at org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:119)
      at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
      at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
      at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
      at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
      at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
      at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  </code></pre>
  
  <p>So I have added the artifact version <code>&lt;version&gt;1.3.5.RELEASE&lt;/version&gt;</code> to spring-boot-starter-data-jpa. Unfortunately I still get the same issue. I have even cleanded the cache of maven. 
  <code>maven -&gt; update</code> project did not help
  and <code>project -&gt; clean</code> did neither help </p>
  
  <p><strong>Question:</strong> What else could I have done wrong?</p>
  
  <p>pom.xml</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;SpringDataDemo&lt;/groupId&gt;
      &lt;artifactId&gt;SpringDataDemo&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.5.1&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;plugin&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.6&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;org.jboss.repository.releases&lt;/id&gt;
              &lt;name&gt;JBoss Maven Release Repository&lt;/name&gt;
              &lt;url&gt;https://repository.jboss.org/nexus/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
              &lt;version&gt;1.3.5.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;1.4.192&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Eclipse marks weird lines red if it really is an issue of version numbers: </p>
  
  <p><a href="https://i.stack.imgur.com/khMVS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/khMVS.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/hfFkI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hfFkI.png" alt="enter image description here"></a></p>