Newbee
Newbee

Reputation: 817

mvn clean install throwing build failure error

I am new to maven. I recently cloned a repository from GIT and saved it in a location on my machine. I have git bash, i am cd'ing to the location where i saved my code and trying to execute the mvn clean install command. but i am seeing the below error. It is unable to locate POM files. How can I solve this problem?. I have tried deleting the code and cloning again but that has not helped.

enter image description here

Below is the POM file:

<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.XXXX</groupId>
    <artifactId>XXX-XXX</artifactId>
    <version>sprint1506-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>XXX-XXX</name>
    <url>http://maven.apache.org</url>
    <description>
        This is the Mega pom to combine XXX, XXX
        and XXX projects in a single reactor.
        </description>
    <modules>
        <module>wesp</module>
        <module>transite</module>
                <module>sassy</module>
    </modules>
</project>

Upvotes: 1

Views: 33289

Answers (2)

Newbee
Newbee

Reputation: 817

The problem was fixed when i updated the settings.xml file in apache-maven-3.3.3\conf folder. I had to configure my login credentials in the settings.xml file for the build to complete. I also had to point my .m2/repository directory to the <localRepository> tag inside the settings.xml file for the build to commence. Thanks everyone for the inputs.

Below are the fields which I changed inside the settings.xml file ( highlighted in bold):

  ****<localRepository>C:\Users\XXX\.m2\repository</localRepository>****



  <proxies>
              <proxy>
                     <id>XXXX</id>
                     <active>true</active>
                     <protocol>http</protocol>
                     <host>proxy.kdc.XXXXX.com</host>
                     <port>8099</port>
                     **<username>XXX</username>**
                     **<password>XXXX</password>**
                     <nonProxyHosts>*.XXXXX.com</nonProxyHosts>
              </proxy>
       </proxies>

Upvotes: 2

Jean-R&#233;my Revy
Jean-R&#233;my Revy

Reputation: 5677

Solution 1 : Build it by your own

As OhadR said, your local repository does not contain the jasmine-maven-plugin, so :

  1. Clone the jasmine-maven-plugin repo (git clone [email protected]:searls/jasmine-maven-plugin.git)
  2. Build this plugin with mvn installcommand
  3. Build the project you cloned with mvn install command

Solution 2

If you don't want to rely on your own build, try to add the Sonatype repository to your pom, as an external source. Looking at the plugin jasmine-maven-plugin's pom, it appears that they deploy it on OSS repo.

<project ...>
  <repositories>
    <repository>
      <id>OSS</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
  </repositories>
</project>

Upvotes: 2

Related Questions