0
votes

Being new to maven ,i m uanble to add below plugin dependency in pom.xml,can someone please help me

  • Need to add this

    org.apache.maven.plugins maven-compiler-plugin 2.3.2. 1.7 1.7 org.apache.maven.plugins maven-surefire-plugin 2.12 true testng.xml
  • Exiting Pom.xml

    4.0.0 www.asr.com asr 0.0.1-SNAPSHOT

     <dependencies>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
             <artifactId>selenium-java</artifactId>
             <version>3.141.59</version>
         </dependency>
    
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
             <version>7.3.0</version>
             <scope>compile</scope>
         </dependency>
     </dependencies>
    
1
what is the error you get? - JArgente
i dont know how to add below <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2.</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> <inherited>true</inherited> <configuration> <suiteXmlFiles> <suiteXmlFile>testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </plugins> under existing pom.xml - Tini k
Welcome to SO! How shall we magically understand what you mean by org.apache.maven.plugins maven-compiler-plugin 2.3.2. 1.7 1.7 org.apache.maven.plugins maven-surefire-plugin 2.12 true testng.xml? - ominug

1 Answers

0
votes

You have to add your plugins inside tag.

For example:

  <build>
    <plugins>    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>${asm.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>${asm.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <useFile>false</useFile>
          <excludes>
            <exclude>**/integration/**</exclude>
          </excludes>
          <includes>
            <include>**/*Test.java</include>
            <include>**/*Spec.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>