title: MojoExecutionException while doing a build - Maven
body: <p>Below is the goals that i have included while building maven project in my pom.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt; 
  
  &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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mynewproject.portlet&lt;/groupId&gt;
      &lt;artifactId&gt;abc-myfacts-portlet&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;name&gt;ABC MY FACTS Portlet&lt;/name&gt;
      &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.liferay.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;liferay-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${liferay.maven.plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;build-css&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;autoDeployDir&gt;${liferay.auto.deploy.dir}&lt;/autoDeployDir&gt;
                      &lt;appServerDeployDir&gt;${liferay.app.server.deploy.dir}&lt;/appServerDeployDir&gt;
                      &lt;appServerLibGlobalDir&gt;${liferay.app.server.lib.global.dir}&lt;/appServerLibGlobalDir&gt;
                      &lt;appServerPortalDir&gt;${liferay.app.server.portal.dir}&lt;/appServerPortalDir&gt;
                      &lt;liferayVersion&gt;${liferay.version}&lt;/liferayVersion&gt;
                      &lt;pluginType&gt;portlet&lt;/pluginType&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
  
  
  
          &lt;/plugins&gt;
  
      &lt;/build&gt;
      &lt;dependencies&gt;
              &lt;!-- Liferay dependency --&gt;    
              &lt;dependency&gt;
                   &lt;groupId&gt;commons-lang&lt;/groupId&gt;
                   &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
                  &lt;version&gt;2.6&lt;/version&gt;                  
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;commons-collections&lt;/groupId&gt;
      &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
      &lt;version&gt;3.2.1&lt;/version&gt;
      &lt;optional&gt;true&lt;/optional&gt;
  &lt;/dependency&gt;
  
   &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
              &lt;version&gt;1.6.5&lt;/version&gt;
          &lt;/dependency&gt;
           &lt;!--  &lt;dependency&gt; 
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-instrument&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt; --&gt;
  
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.liferay.portal&lt;/groupId&gt;
              &lt;artifactId&gt;portal-service&lt;/artifactId&gt;
              &lt;version&gt;${liferay.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.liferay.portal&lt;/groupId&gt;
              &lt;artifactId&gt;util-bridges&lt;/artifactId&gt;
              &lt;version&gt;${liferay.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.liferay.portal&lt;/groupId&gt;
              &lt;artifactId&gt;util-taglib&lt;/artifactId&gt;
              &lt;version&gt;${liferay.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.liferay.portal&lt;/groupId&gt;
              &lt;artifactId&gt;util-java&lt;/artifactId&gt;
              &lt;version&gt;${liferay.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
              &lt;!-- Portlet/JSR dependency --&gt;      
          &lt;dependency&gt;
              &lt;groupId&gt;javax.portlet&lt;/groupId&gt;
              &lt;artifactId&gt;portlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
              &lt;!-- Servlet/JSP dependency --&gt;      
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;          
          &lt;/dependency&gt; 
  
          &lt;!-- Spring dependency --&gt;       
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc-portlet&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;    
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;       
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt; 
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-agent&lt;/artifactId&gt;
      &lt;version&gt;2.5.6&lt;/version&gt;
  &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
              &lt;version&gt;1.6.12&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;cglib&lt;/groupId&gt;
              &lt;artifactId&gt;cglib-nodep&lt;/artifactId&gt;
              &lt;version&gt;2.2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
              &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Log4j configuration --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;1.4.2&lt;/version&gt;
          &lt;/dependency&gt; 
  
          &lt;!-- Unit testing --&gt;       
          &lt;dependency&gt;  
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;  
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;  
              &lt;version&gt;1.9.5&lt;/version&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;/dependency&gt;   
  
           &lt;!-- Data Service dependency --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mynewproject.components&lt;/groupId&gt;
              &lt;artifactId&gt;abc-mynewproject-service&lt;/artifactId&gt;
              &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.mynewproject.components&lt;/groupId&gt;
              &lt;artifactId&gt;emailcomponent&lt;/artifactId&gt;
              &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  
  
  &lt;profiles&gt;
  &lt;profile&gt;
      &lt;id&gt;Liferay-v6.2-EE-(Tomcat-7)&lt;/id&gt;
      &lt;properties&gt;
          &lt;liferay.version&gt;6.2.2&lt;/liferay.version&gt;
          &lt;liferay.maven.plugin.version&gt;7.0.0-m2&lt;/liferay.maven.plugin.version&gt;
          &lt;liferay.auto.deploy.dir&gt;..\Liferay Portal\liferay-portal-6.2.10.1-ee-ga1\deploy&lt;/liferay.auto.deploy.dir&gt;
          &lt;liferay.app.server.deploy.dir&gt;..\Liferay Portal\liferay-portal-6.2.10.1-ee-ga1\tomcat-7.0.42\webapps&lt;/liferay.app.server.deploy.dir&gt;
          &lt;liferay.app.server.lib.global.dir&gt;..\Liferay Portal\liferay-portal-6.2.10.1-ee-ga1\tomcat-7.0.42\lib\ext&lt;/liferay.app.server.lib.global.dir&gt;
          &lt;liferay.app.server.portal.dir&gt;..\Liferay Portal\liferay-portal-6.2.10.1-ee-ga1\tomcat-7.0.42\webapps\ROOT&lt;/liferay.app.server.portal.dir&gt;
      &lt;/properties&gt;
      &lt;/profile&gt;
  
  &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>But while i perform a build i get the below error:</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal
    com.liferay.maven.plugins:liferay-maven-plugin:6.2.1:build-css
    (default) on project myNewProject: null: MojoExecutionException:
    NullPointerException -> [Help 1]</p>
    
    <p>org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
    execute goal
    com.liferay.maven.plugins:liferay-maven-plugin:6.2.1:build-css
    (default) on project myNewProject: null
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <p>What is it causing a null pointer exception while i am performing the build?</p>