Advertisement
codetalkinhawkin

pom.xml

Jun 29th, 2022
844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.40 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5.     <modelVersion>4.0.0</modelVersion>
  6.  
  7.     <groupId>com.com.mangroo</groupId>
  8.     <artifactId>temperature-service</artifactId>
  9.     <version>1.3-SNAPSHOT</version>
  10.     <packaging>jar</packaging>
  11.  
  12.     <properties>
  13.         <cucumber-version>7.2.3</cucumber-version>
  14.         <java.version>17</java.version>
  15.         <unit-tests.skip>false</unit-tests.skip>
  16.         <integration-tests.skip>false</integration-tests.skip>
  17.     </properties>
  18.  
  19.     <parent>
  20.         <groupId>org.springframework.boot</groupId>
  21.         <artifactId>spring-boot-starter-parent</artifactId>
  22.         <version>2.6.4</version>
  23.     </parent>
  24.  
  25.     <profiles>
  26.         <!-- The Configuration of the unit profile. This is the default profile -->
  27.         <profile>
  28.             <id>unit-test</id>
  29.             <activation>
  30.                 <activeByDefault>true</activeByDefault>
  31.             </activation>
  32.             <properties>
  33.                 <build.profile.id>unit-test</build.profile.id>
  34.                 <skip.integration.tests>true</skip.integration.tests>
  35.                 <skip.unit.tests>false</skip.unit.tests>
  36.                 <skip.startlocaldynamo>true</skip.startlocaldynamo>
  37.             </properties>
  38.         </profile>
  39.         <!-- The Configuration of the integration-test profile -->
  40.         <profile>
  41.             <id>integration-test</id>
  42.             <properties>
  43.                 <build.profile.id>integration-test</build.profile.id>
  44.                 <skip.integration.tests>false</skip.integration.tests>
  45.                 <skip.unit.tests>true</skip.unit.tests>
  46.                 <skip.startlocaldynamo>false</skip.startlocaldynamo>
  47.             </properties>
  48.         </profile>
  49.     </profiles>
  50.  
  51.     <dependencies>
  52.         <dependency>
  53.             <groupId>org.springframework.boot</groupId>
  54.             <artifactId>spring-boot-starter-web</artifactId>
  55.         </dependency>
  56.         <dependency>
  57.             <groupId>org.springframework.boot</groupId>
  58.             <artifactId>spring-boot-starter-test</artifactId>
  59.             <scope>test</scope>
  60.         </dependency>
  61.         <dependency>
  62.             <groupId>org.springframework.boot</groupId>
  63.             <artifactId>spring-boot-starter-actuator</artifactId>
  64.         </dependency>
  65.         <dependency>
  66.             <groupId>org.projectlombok</groupId>
  67.             <artifactId>lombok</artifactId>
  68.         </dependency>
  69.         <dependency>
  70.             <groupId>com.github.derjust</groupId>
  71.             <artifactId>spring-data-dynamodb</artifactId>
  72.             <version>5.1.0</version>
  73.         </dependency>
  74.         <!-- Cucumber-->
  75.         <dependency>
  76.             <groupId>io.cucumber</groupId>
  77.             <artifactId>cucumber-java</artifactId>
  78.             <version>${cucumber-version}</version>
  79.             <scope>test</scope>
  80.         </dependency>
  81.         <dependency>
  82.             <groupId>io.cucumber</groupId>
  83.             <artifactId>cucumber-junit</artifactId>
  84.             <version>${cucumber-version}</version>
  85.             <scope>test</scope>
  86.         </dependency>
  87.         <dependency>
  88.             <groupId>io.cucumber</groupId>
  89.             <artifactId>cucumber-spring</artifactId>
  90.             <version>${cucumber-version}</version>
  91.             <scope>test</scope>
  92.         </dependency>
  93.         <dependency>
  94.             <groupId>org.springframework.boot</groupId>
  95.             <artifactId>spring-boot-configuration-processor</artifactId>
  96.             <optional>true</optional>
  97.         </dependency>
  98.         <dependency>
  99.             <groupId>org.junit.vintage</groupId>
  100.             <artifactId>junit-vintage-engine</artifactId>
  101.             <version>5.8.2</version>
  102.             <scope>test</scope>
  103.         </dependency>
  104.     </dependencies>
  105.  
  106.     <build>
  107.         <plugins>
  108.             <plugin>
  109.                 <groupId>org.springframework.boot</groupId>
  110.                 <artifactId>spring-boot-maven-plugin</artifactId>
  111.             </plugin>
  112.  
  113.             <!-- Run *Test.java tests as unit tests during test phase  -->
  114.             <plugin>
  115.                 <artifactId>maven-surefire-plugin</artifactId>
  116.                 <version>2.22.2</version>
  117.                 <configuration>
  118.                     <skipTests>${skip.unit.tests}</skipTests>
  119.                 </configuration>
  120.             </plugin>
  121.  
  122.             <!-- Run *IT.java tests as integration tests during verify phase -->
  123.             <plugin>
  124.                 <groupId>org.apache.maven.plugins</groupId>
  125.                 <artifactId>maven-failsafe-plugin</artifactId>
  126.                 <version>2.22.2</version>
  127.                 <configuration>
  128.                     <skipTests>${skip.integration.tests}</skipTests>
  129.                 </configuration>
  130.                 <executions>
  131.                     <execution>
  132.                         <goals>
  133.                             <goal>integration-test</goal>
  134.                             <goal>verify</goal>
  135.                         </goals>
  136.                     </execution>
  137.                 </executions>
  138.             </plugin>
  139.             <plugin>
  140.                 <groupId>io.fabric8</groupId>
  141.                 <artifactId>docker-maven-plugin</artifactId>
  142.                 <version>0.39.0</version>
  143.                 <extensions>true</extensions>
  144.                 <configuration>
  145.                     <images>
  146.                         <image>
  147.                             <alias>dynamodb</alias>
  148.                             <name>amazon/dynamodb-local</name>
  149.                             <run>
  150.                                 <wait>
  151.                                     <time>10000</time>
  152.                                 </wait>
  153.                                 <env>
  154.  
  155.                                 </env>
  156.                                 <ports>
  157.                                     <port>8000:8000</port>
  158.                                 </ports>
  159.                                 <volumes>
  160.                                     <bind>
  161.  
  162.                                     </bind>
  163.                                 </volumes>
  164.                             </run>
  165.                         </image>
  166.                     </images>
  167.                     <skip>${skip.startlocaldynamo}</skip>
  168.                 </configuration>
  169.                 <executions>
  170.                     <execution>
  171.                         <id>docker:start</id>
  172.                         <phase>pre-integration-test</phase>
  173.                         <goals>
  174.                             <goal>start</goal>
  175.                         </goals>
  176.                     </execution>
  177.                     <execution>
  178.                         <id>docker:stop</id>
  179.                         <phase>post-integration-test</phase>
  180.                         <goals>
  181.                             <goal>stop</goal>
  182.                         </goals>
  183.                     </execution>
  184.                 </executions>
  185.             </plugin>
  186.  
  187.             <plugin>
  188.                 <groupId>net.masterthought</groupId>
  189.                 <artifactId>maven-cucumber-reporting</artifactId>
  190.                 <version>3.15.0</version>
  191.                 <executions>
  192.                     <execution>
  193.                         <id>execution</id>
  194.                         <phase>post-integration-test</phase>
  195.                         <goals>
  196.                             <goal>generate</goal>
  197.                         </goals>
  198.                         <configuration>
  199.                             <projectName>automation-demo</projectName>
  200.                             <outputDirectory>${project.build.directory}/cucumber-reports</outputDirectory>
  201.                             <jsonFiles>
  202.                                 <param>${project.build.directory}/cucumber-report.json</param>
  203.                             </jsonFiles>
  204. <!--                            <cucumberOutput>${project.build.directory}/temperatureReading.json</cucumberOutput>-->
  205.                             <!--<skippedFails>true</skippedFails>-->
  206.                             <!--<enableFlashCharts>false</enableFlashCharts>-->
  207.                             <!--<buildNumber>${build_number}</buildNumber>-->
  208.                         </configuration>
  209.                     </execution>
  210.                 </executions>
  211.             </plugin>
  212.         </plugins>
  213.     </build>
  214.  
  215.  
  216. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement