I am very much new to maven. I downloaded the maven 2.0.11 version and installed it on my 32bit redhat linux along with JDK 1.4
After installation I have configured the proxy settings. When I try to run command mvn install
downlaod of some repository(org) is successful but then it fails with build error as below :
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 second
What does this error mean ? and what configuration I am missing ?
How can I downlaod the complete repository ?
Thanks,
This error usually means there is no pom.xml
in the current directory where
you're trying to build.
The ant build.xml
has references to a few pom files:
<xmlproperty file="${IMPERIUS_SVN_MODULES}/pom.xml"/>
<property name="POM_XML_FILE" value="${basedir}/pom.xml"/>
<property name="POM_XML_URL" value="${IMPERIUS_SVN_TRUNK_REPOSITORY}/pom.xml?view=co"/>
<get src="${POM_XML_URL}" dest="${POM_XML_FILE}"/>
Can you check that these are being pulled down when you run ant
? If not, try downloading the pom manually from here and save it in the same directory as build.xml
. Then try running ant
again.
Your Maven installation seems correct. However, to be run, the Maven command must be run in the directory where the pom.xml
file is located. It seems that you don't have any pom.xml
in the current directory.
The pom.xml
file describes your project, and it is the basis of Maven 2. Read the official documentation to get more information about this file.
Note that Maven also provides the Archetype plugin, which can be used to create a brand new project of a specific type (Java project, Web application, Hibernate, Spring, and so on). The archetype will create the default structure and some files (including the pom.xml
) for this type of project. This plugin is the only case of Maven usage without a pom.xml
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With