I'm a newbie to both Git and Maven.

I need help in building a war file through maven buy getting the maven project in git repository.

Currently i have the maven project in the local git repository and i'm running the mvn tomcat7:deploy command on the project root directory to bulid and deploy it on the tomcat server and i succeded in that.

But i wanted to know how to get the maven project from remote git repository and update the local git repository and build the war file.

My current POM.xml is like this

> 
> 
> ```
>  <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-compiler-plugin</artifactId>
>     <version>2.4</version>
>     <configuration>
>       <source>1.6</source>
>       <target>1.6</target>
>     </configuration>
>   </plugin>
>     <plugin>
>     <groupId>org.apache.tomcat.maven</groupId>
>     <artifactId>tomcat7-maven-plugin</artifactId>
>     <version>2.0</version>
>     <configuration>
>       <url>http://localhost:8080/manager/text</url>
>       <server>TomcatServer</server>   
>       <path>/Test</path>
>     </configuration>
>   </plugin>
>   <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-war-plugin</artifactId>
>     <version>2.4</version>
>     <configuration>
>         <failOnMissingWebXml>false</failOnMissingWebXml>
>     </configuration>
>  </plugin>
>    <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>buildnumber-maven-plugin</artifactId>
>          <version>1.2</version>
>         <executions>
>          <execution>
>             <phase>validate</phase>
>             <goals>
>                 <goal>create</goal>
>             </goals>
>          </execution>
>         </executions>
>         <configuration>
>             <docheck>true</docheck>
>             <doupdate>true</doupdate>
>             <shortrevisionlength>5</shortrevisionlength>
>          </configuration>
>      </plugin>
>   <dependencies>  
>     <dependency>
>         <groupId>junit</groupId>
>         <artifactId>junit</artifactId>
>         <version>3.8.1</version>
>         <scope>test</scope>
>     </dependency>
> 
>    <dependency>
>         <groupId>org.apache.poi</groupId>
>         <artifactId>poi-ooxml</artifactId>
>         <version>3.9</version>
>     </dependency>
>    </dependencies>
>    <scm>
>         <connection>scm:git:git://ServerIP/Repository</connection>
>         <developerConnection>scm:git:git://ServerIP/Repository</developerConnection>
>         <url>scm:git:git://ServerIP/Repository</url>
>    </scm>
> 
> ```
> 
>