Monday 11 August 2014

POM xml for Maven Project

 POM xml for Maven Project

<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.spa.sfautomation</groupId>
  <artifactId>sfautomation</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>
   <build>
        <!-- Source directory configuration -->
        <sourceDirectory>src</sourceDirectory>
        <plugins>
            <!-- Following plugin excutes the testng tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <!-- Suite testng xml file to consider for test execution -->
                    <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <!-- Setting properties for test execution -->
                    <properties>
                    Setting ReportNG listeners
                        <property>
                            <name>listener</name>
                            <value>org.uncommons.reportng.HTMLReporter</value>
                        </property>
                    </properties>
                </configuration>
            </plugin>
            <!-- Compiler plugin configures the java version to be used for compiling the code -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
        <!-- TestNG-xslt related configuration. -->
          <plugin>
            <groupId>org.reportyng</groupId>
            <artifactId>reporty-ng</artifactId>
            <version>1.2</version>
            <configuration>
              <!-- Output directory for the testng xslt report -->
              <!--<outputDir>${project.basedir}/target/site</outputDir> -->
              <sortTestCaseLinks>true</sortTestCaseLinks>
              <testDetailsFilter>FAIL,SKIP,PASS,CONF</testDetailsFilter>
              <showRuntimeTotals>true</showRuntimeTotals>
            </configuration>
          </plugin>
        </plugins>
    </reporting>
    <dependencies>
        <!-- Dependency libraries to include for comiplation -->
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.uncommons</groupId>
            <artifactId>reportng</artifactId>
            <version>1.1.4</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.8</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.40.0</version>
        </dependency>
    </dependencies>
    <pluginRepositories>
    <pluginRepository>
      <id>reporty-ng</id>
      <url>https://github.com/cosminaru/reporty-ng/raw/master/dist/maven</url>
    </pluginRepository>
  </pluginRepositories>
    <name>SigmaFlow</name>
    <organization>
        <name>Sigmaflow, LLC</name>
        <url>www.sigmaflow.com</url>
    </organization>
</project>
Powered By- selenium blogs Hitesh Singh 

No comments:

Post a Comment