title: Trying to compile mahout but getting error - Cannot execute mojo: resources. Build is not using pom.xml
body: <p>I have completed the following steps:</p>
  
  <ol>
  <li>Installed Java 1.6</li>
  <li>I am using Ubuntu 11.10. Added the $JAVA_HOME path in /etc/bash.bachrc</li>
  <li>Installed maven. <code>mvn --version</code> is showing the installed maven correctly.</li>
  <li>Downloaded Mahout from <code>http://svn.apache.org/repos/asf/mahout/trunk</code></li>
  </ol>
  
  <p>Now, I go inside mahout/trunk and try to do <code>mvn clean install</code> or <code>mvn clean install -X -e</code>, then it gives the follwoing error - </p>
  
  <blockquote>
    <p>Cannot execute mojo: resources. It requires a project with an existing
    pom.xml, but the build is not using one.</p>
  </blockquote>
  
  <p>I just want to try the examples in the mahout/examples. How to fix this error?</p>
  
  <p><strong>There is a pom.xml in the directory.</strong></p>
  
  <p>Full terminal output is here:</p>
  
  <pre><code>+ Error stacktraces are turned on.
  Apache Maven 2.2.1 (rdebian-6)
  Java version: 1.6.0_23
  Java home: /usr/lib/jvm/java-6-openjdk/jre
  Default locale: en_IN, platform encoding: UTF-8
  OS name: "linux" version: "3.0.0-16-generic" arch: "i386" Family: "unix"
  [DEBUG] Building Maven user-level plugin registry from: '/home/kartikeya/.m2/plugin-registry.xml'
  [DEBUG] Building Maven global-level plugin registry from: '/usr/share/maven2/conf/plugin-registry.xml'
  [INFO] Scanning for projects...
  [DEBUG] Wagons could not be registered as the extension container was never created
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Default Project
  [INFO]    task-segment: [clean, install]
  [INFO] ------------------------------------------------------------------------
  [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins:pom:12 for project: null:maven-clean-plugin:maven-plugin:2.3 from the repository.
  [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent:pom:9 for project: org.apache.maven.plugins:maven-plugins:pom:12 from the repository.
  [DEBUG] Retrieving parent-POM: org.apache:apache:pom:4 for project: org.apache.maven:maven-parent:pom:9 from the repository.
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
  [INFO] ------------------------------------------------------------------------
  [DEBUG] Trace
  org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:414)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      ... 17 more
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: &lt; 1 second
  [INFO] Finished at: Wed Mar 21 11:32:36 IST 2012
  [INFO] Final Memory: 2M/55M
  [INFO] ------------------------------------------------------------------------
  </code></pre>