[BAEL-4406] Move maven code to testing-libraries-2

This commit is contained in:
uzma khan 2021-06-03 10:11:38 +01:00
parent 2326e02ed2
commit 6ab67e6968
15 changed files with 31 additions and 86 deletions

View File

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-jacoco</artifactId>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-verifier-plugin</artifactId>
<version>${maven.verifier.version}</version>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>com/baeldung/**/ExcludedPOJO.class</exclude>
<exclude>com/baeldung/**/*DTO.*</exclude>
<exclude>**/config/*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<jacoco.version>0.8.6</jacoco.version>
<!-- <maven.compiler.source>11</maven.compiler.source>-->
<!-- <maven.compiler.target>11</maven.compiler.target>-->
</properties>
</project>

View File

@ -1,4 +0,0 @@
package com.baeldung.dto;
public class ExcludedPOJO {
}

View File

@ -1,4 +0,0 @@
package com.baeldung.dto;
public class ProductDTO {
}

View File

@ -13,6 +13,12 @@
</parent>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
@ -85,6 +91,13 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<configuration>
<excludes>
<exclude>com/baeldung/**/ExcludedPOJO.class</exclude>
<exclude>com/baeldung/**/*DTO.*</exclude>
<exclude>**/config/*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>

View File

@ -1,6 +1,6 @@
package com.baeldung.config;
package com.baeldung.jacocoexclusions.config;
import com.baeldung.service.ProductService;
import com.baeldung.jacocoexclusions.service.ProductService;
public class AppConfig {

View File

@ -1,4 +1,4 @@
package com.baeldung.domain;
package com.baeldung.jacocoexclusions.domain;
import lombok.Builder;
import lombok.Data;

View File

@ -0,0 +1,4 @@
package com.baeldung.jacocoexclusions.dto;
public class ExcludedPOJO {
}

View File

@ -0,0 +1,4 @@
package com.baeldung.jacocoexclusions.dto;
public class ProductDTO {
}

View File

@ -1,4 +1,4 @@
package com.baeldung.generated;
package com.baeldung.jacocoexclusions.generated;
@Generated
public class Customer {

View File

@ -1,4 +1,4 @@
package com.baeldung.generated;
package com.baeldung.jacocoexclusions.generated;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;

View File

@ -1,6 +1,6 @@
package com.baeldung.service;
package com.baeldung.jacocoexclusions.service;
import com.baeldung.generated.Generated;
import com.baeldung.jacocoexclusions.generated.Generated;
public class CustomerService {

View File

@ -1,4 +1,4 @@
package com.baeldung.service;
package com.baeldung.jacocoexclusions.service;
public class ProductService {
private static final double DISCOUNT = 0.25;