2016-04-11 22 views
4

Geçerli bir yaşam döngüsü aşaması veya hedefi belirtmeniz gerekir. Pomorumda aşağıdaki hatayı almalısınız. Bilinmeyen yaşam döngüsü aşaması "oluştur". Geçerli bir yaşam döngüsü aşaması veya formatta bir hedef belirtmeniz gerekir. Sağlanan URL'ye gittim, ancak yine de hatayı alıyorum. MVN sürüm 3.2.1, Java sürümü: 1.7.0_51 herhangi bir yardımBilinmeyen kullanım ömrü fazı "derleme".

mutluluk duyacağız

POM benziyor:

<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/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>com.organization.dramer</groupId> 
<artifactId>sTest</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<name>sTest</name> 
<description>test automation framework created using Java, testNG, 
selenium</description> 


    <properties> 
    <suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile> 
    <skipTests>false</skipTests> 
    </properties> 

    <dependencies> 
    <dependency> 
     <groupId>org.apache.maven.plugin-tools</groupId> 
     <artifactId>maven-plugin-annotations</artifactId> 
     <version>3.2</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
    <groupId>org.testng</groupId> 
    <artifactId>testng</artifactId> 
    <version>6.8</version> 
    <scope>test</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-firefox-driver</artifactId> 
     <version>2.53.0</version> 
    </dependency> 

    <dependency> 
    <groupId>org.seleniumhq.selenium</groupId> 
    <artifactId>selenium-chrome-driver</artifactId> 
    <version>2.44.0</version> 
    </dependency> 

    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>htmlunit-driver</artifactId> 
     <version>2.20</version> 
    </dependency> 

    <dependency> 
     <groupId>net.sourceforge.jexcelapi</groupId> 
     <artifactId>jxl</artifactId> 
     <version>2.6.12</version> 
    </dependency> 

     </dependencies> 

    <build> 

    <plugins> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>2.3.2</version> 
     <configuration> 
      <source>1.6</source> 
      <target>1.6</target> 
     </configuration> 
    </plugin> 

    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-surefire-plugin</artifactId> 
     <version>2.6</version> 
     <configuration> 
      <suiteXmlFiles> 
       <suiteXmlFile>${suiteXmlFile)</suiteXmlFile> 
      </suiteXmlFiles>  
      <testFailureIgnore>true</testFailureIgnore> 
     </configuration> 
    </plugin> 
    </plugins> 




    </build> 




</project> 
+0

Hangi komutu kullanıyorsunuz? Pom.xml'iniz neye benziyor? –

+0

mvn clean, sonra mvn build –

+2

'build' maven için standart bir faz değildir. “Mvn compile” (proje oluşturuyor/derliyor) veya “mvn test” (tüm birim testlerini derler ve çalıştırır) kullanmak mı istiyorsunuz? –

cevap

4

Maven'in, build hedef (Maven lingo faz) yok ne Muhtemelen, elde etmek istediğinize bağlı olarak compile, test veya install.

Maven yaşam döngüsünün nasıl çalıştığı ve her adımın ne yaptığı hakkında daha fazla bilgi edinmek için lütfen Introduction to the Build Lifecycle'u okuyun.

+0

tüm yardımlarınız için teşekkür ederim ..... Giriş yoluyla gideyim. –