title: Maven pom.xml Problems (Project Build Error "version" is missing)
body: <p>So the top part of my <code>pom.xml</code> looks like this:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;             
  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 
  http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com&lt;/groupId&gt;
  &lt;artifactId&gt;test&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.2-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;GWT Maven Archetype&lt;/name&gt;
  </code></pre>
  <p>However, at the first line I get the errors:</p>
  <blockquote>
  <p>Project Build Error: version is missing</p>
  </blockquote>
  <p>followed by the same phrase with <code>artifactid</code>, <code>groupid</code> and <code>model version</code>. I have no idea how to solve the problem, a friend of mine suggested setting the <code>JAVA_HOME</code> system variable which I did and set it to my JDK Path. Nothing changed though. Anything else I could try to solve this problem? I've also heard something considering the system variables and java.home but I did not really understand the difference and how to solve my problem with it.</p>
  <hr />
  <p>Edit: Here is the complete pom:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 
      http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com&lt;/groupId&gt;
  &lt;artifactId&gt;test&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.2-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;GWT Maven Archetype&lt;/name&gt;
  
  &lt;properties&gt;
      &lt;!-- Convenience property to set the GWT version --&gt;
      &lt;gwtVersion&gt;2.7.0&lt;/gwtVersion&gt;
  
      &lt;!-- GWT needs at least java 1.6 --&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
  
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
              &lt;artifactId&gt;gwt&lt;/artifactId&gt;
              &lt;version&gt;${gwtVersion}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-user&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-dev&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.11&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.gwtupload&lt;/groupId&gt;
          &lt;artifactId&gt;gwtupload&lt;/artifactId&gt;
          &lt;version&gt;1.0.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;org.quartz-scheduler&lt;/groupId&gt;
      &lt;artifactId&gt;quartz&lt;/artifactId&gt;
      &lt;version&gt;2.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;de.novanic.gwteventservice&lt;/groupId&gt;
          &lt;artifactId&gt;gwteventservice&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.easymock&lt;/groupId&gt;
          &lt;artifactId&gt;easymock&lt;/artifactId&gt;
          &lt;version&gt;3.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;version&gt;2.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      
      
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;!-- Output classes directly into the webapp, so that IDEs and &quot;mvn process-classes&quot; 
          update them in DevMode --&gt;
      &lt;outputDirectory&gt;${project.build.directory}/${project.build.finalName}/WEB-INF/classes&lt;/outputDirectory&gt;
  
      &lt;plugins&gt;
  
          &lt;!-- GWT Maven Plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.7.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;goal&gt;test&lt;/goal&gt;
                          &lt;goal&gt;generateAsync&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
                  documentation at codehaus.org --&gt;
              &lt;configuration&gt;
                  &lt;runTarget&gt;test.html&lt;/runTarget&gt;
                  &lt;modules&gt;
                      &lt;module&gt;com.test.test&lt;/module&gt;
                  &lt;/modules&gt;
                  &lt;copyWebapp&gt;true&lt;/copyWebapp&gt;
                  &lt;sourceLevel&gt;1.7&lt;/sourceLevel&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>This is the output of <code>mvn package -X</code>:</p>
  <pre><code>C:\Users\user\git\git&gt;mvn package -X
  Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:3
  7+02:00)
  Maven home: C:\Users\user\Downloads\apache-maven-3.3.3-bin (1)\apache-maven-3.
  3.3\bin\..
  Java version: 1.8.0_51, vendor: Oracle Corporation
  Java home: C:\Program Files\Java\jdk1.8.0_51\jre
  Default locale: de_DE, platform encoding: Cp1252
  OS name: &quot;windows 7&quot;, version: &quot;6.1&quot;, arch: &quot;amd64&quot;, family: &quot;dos&quot;
  [DEBUG] Created new class realm maven.api
  [DEBUG] Importing foreign packages into class realm maven.api
  [DEBUG]   Imported: javax.enterprise.inject.* &lt; plexus.core
  [DEBUG]   Imported: javax.enterprise.util.* &lt; plexus.core
  [DEBUG]   Imported: javax.inject.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.artifact &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.classrealm &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.cli &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.configuration &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.exception &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.execution &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.execution.scope &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.model &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.monitor &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.plugin &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.profiles &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.project &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.reporting &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.rtinfo &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.settings &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.toolchain &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.usability &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authentication &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authorization &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.events &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.observers &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.proxy &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.resource &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.* &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.component &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.configuration &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.container &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.context &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.logging &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.personality &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser &lt; plexus.cor
  e
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException &lt; p
  lexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer &lt; plexus.cor
  e
  [DEBUG]   Imported: org.eclipse.aether.* &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.artifact &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.collection &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.deployment &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.graph &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.impl &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.installation &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.internal.impl &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.metadata &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.repository &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.resolution &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.spi &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.transfer &lt; plexus.core
  [DEBUG]   Imported: org.eclipse.aether.version &lt; plexus.core
  [DEBUG]   Imported: org.slf4j.* &lt; plexus.core
  [DEBUG]   Imported: org.slf4j.spi.* &lt; plexus.core
  [DEBUG] Populating class realm maven.api
  [INFO] Error stacktraces are turned on.
  [DEBUG] Reading global settings from C:\Users\user\Downloads\apache-maven-3.3.
  3-bin (1)\apache-maven-3.3.3\bin\..\conf\settings.xml
  [DEBUG] Reading user settings from C:\Users\user\.m2\settings.xml
  [DEBUG] Reading global toolchains from C:\Users\user\Downloads\apache-maven-3.
  3.3-bin (1)\apache-maven-3.3.3\bin\..\conf\toolchains.xml
  [DEBUG] Reading user toolchains from C:\Users\user\.m2\toolchains.xml
  [DEBUG] Using local repository at C:\Users\user\.m2\repository
  [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\U
  sers\user\.m2\repository
  [INFO] Scanning for projects...
  [DEBUG] Extension realms for project com:test:war:0.0.2-SNAPSHOT: (none)
  [DEBUG] Looking up lifecyle mappings for packaging war from ClassRealm[plexus.co
  re, parent: null]
  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
  [ERROR] 'modelVersion' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[u
  nknown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7
  .0.pom, line 2, column 27
  [ERROR] 'groupId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknow
  n-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0.po
  m, line 2, column 27
  [ERROR] 'artifactId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unk
  nown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0
  .pom, line 2, column 27
  [ERROR] 'version' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknow
  n-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0.po
  m, line 2, column 27
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-servlet:jar is
  missing. @ line 37, column 15
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-user:jar is mis
  sing. @ line 42, column 15
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-dev:jar is miss
  ing. @ line 47, column 15
   @
  [ERROR] The build could not read 1 project -&gt; [Help 1]
  org.apache.maven.project.ProjectBuildingException: Some problems were encountere
  d while processing the POMs:
  [ERROR] 'modelVersion' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[u
  nknown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7
  .0.pom, line 2, column 27
  [ERROR] 'groupId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknow
  n-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0.po
  m, line 2, column 27
  [ERROR] 'artifactId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unk
  nown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0
  .pom, line 2, column 27
  [ERROR] 'version' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknow
  n-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.0.po
  m, line 2, column 27
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-servlet:jar is
  missing. @ line 37, column 15
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-user:jar is mis
  sing. @ line 42, column 15
  [ERROR] 'dependencies.dependency.version' for com.google.gwt:gwt-dev:jar is miss
  ing. @ line 47, column 15
  
          at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBu
  ilder.java:422)
          at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGra
  phBuilder.java:419)
          at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor
  (DefaultGraphBuilder.java:410)
          at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.
  java:83)
          at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
  cher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
  a:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
  uncher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
  356)
  [ERROR]
  [ERROR]   The project com:test:0.0.2-SNAPSHOT (C:\Users\user\git\git\pom.xm
  l) has 7 errors
  [ERROR]     'modelVersion' is missing. @ [unknown-group-id]:[unknown-artifact-id
  ]:[unknown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt
  -2.7.0.pom, line 2, column 27
  [ERROR]     'groupId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[un
  known-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.
  0.pom, line 2, column 27
  [ERROR]     'artifactId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:
  [unknown-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2
  .7.0.pom, line 2, column 27
  [ERROR]     'version' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[un
  known-version], C:\Users\user\.m2\repository\com\google\gwt\gwt\2.7.0\gwt-2.7.
  0.pom, line 2, column 27
  [ERROR]     'dependencies.dependency.version' for com.google.gwt:gwt-servlet:jar
   is missing. @ line 37, column 15
  [ERROR]     'dependencies.dependency.version' for com.google.gwt:gwt-user:jar is
   missing. @ line 42, column 15
  [ERROR]     'dependencies.dependency.version' for com.google.gwt:gwt-dev:jar is
  missing. @ line 47, column 15
  [ERROR]
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
  gException
  </code></pre>
  <p>(<a href="http://pastebin.com/vJPPdqDQ" rel="nofollow noreferrer">http://pastebin.com/vJPPdqDQ</a>)</p>
  <p>(Stackoverflow seems to only format it for a few lines and I always have to add four spaces again, I'm using the feature wrong I guess)</p>