如何使用maven编译来自SVN的签出代码

时间:2013-06-28 12:14:12

标签: maven

我有一个pom.xml文件,它连接到SVN并检查项目目录的src文件夹中的代码。现在我必须编译检出的代码。请允许任何人帮助我吗?

下面是我的pom.xml文件

         <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.mycompany.deploy</groupId>
         <artifactId>deploy-app</artifactId>
         <packaging>war</packaging>
         <version>0.0.1-SNAPSHOT</version>
         <name>deploy-app Maven Webapp</name>
         <url>http://maven.apache.org</url>

        <scm>
  <connection>scm:svn:http://d-113017553/svn/PRONTO/trunk/dev</connection>
  <developerConnection>scm:svn:http://d-113017553/svn/PRONTO/trunk/dev</developerConnection>
  <url>http://d-113017553/svn/PRONTO/trunk/dev</url> 

  <dependencies>
  <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.1</version>
     <scope>test</scope>
     </dependency>
     </dependencies>

     <build>
<finalName>deploy-app</finalName>
<plugins>    
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.8.1</version>
        <configuration>
          <connectionType>connection</connectionType>
          <username>keerthana</username>
      <password>keerthana</password>
      <checkoutDirectory>${project.basedir}/co/src</checkoutDirectory>
      <workingDirectory>${project.basedir}/co/src</workingDirectory>
        </configuration>
        </plugin>

        <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.2.2</version>
        <configuration>
            <releaseProfiles>release</releaseProfiles>
            <goals>scm:checkout</goals>
        </configuration>
    </plugin>

     <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
    <configuration>
         <warName>deploy-app</warName>
           <outputDirectory>D:\Keerthana\jboss-as-7.1.1.Final\standalone  \deployments</outputDirectory>
    </configuration>
  </plugin>
  </plugins>   

0 个答案:

没有答案