Skip to content

Commit 807873a

Browse files
committed
Fix issue with deployment having jacoco lib; Minor changes
1 parent 097a34c commit 807873a

File tree

4 files changed

+78
-43
lines changed

4 files changed

+78
-43
lines changed

cdt-examples/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Chrome DevTools Java Client Examples
2+
3+
## Description
4+
5+
This directory contains example usage of Chrome DevTools java client.
6+
7+
## Usage
8+
9+
To run an example run:
10+
```
11+
mvn clean compile exec:java -Dexec.mainClass="com.github.kklisura.cdt.examples.LogRequestsExample"
12+
```
13+
14+
Replace `LogRequestsExample` with some example class name.

cdt-examples/pom.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
</properties>
2323

2424
<dependencies>
25-
<dependency>
26-
<groupId>ch.qos.logback</groupId>
27-
<artifactId>logback-classic</artifactId>
28-
<version>${logback.version}</version>
29-
</dependency>
30-
3125
<dependency>
3226
<groupId>com.github.kklisura.cdt</groupId>
3327
<artifactId>cdt-java-client</artifactId>
@@ -47,6 +41,19 @@
4741
</dependency>
4842
</dependencies>
4943

44+
<profiles>
45+
<profile>
46+
<id>logging</id>
47+
<dependencies>
48+
<dependency>
49+
<groupId>ch.qos.logback</groupId>
50+
<artifactId>logback-classic</artifactId>
51+
<version>${logback.version}</version>
52+
</dependency>
53+
</dependencies>
54+
</profile>
55+
</profiles>
56+
5057
<build>
5158
<plugins>
5259
<plugin>

cdt-java-client/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SONAR_COVERAGE_EXCLUSIONS="**/com/github/kklisura/cdt/protocol/**/*,**/com/githu
66

77
sonar-analysis:
88
# Running sonar analysis
9-
$(MVN) clean test && \
9+
$(MVN) clean test -P coverage && \
1010
$(MVN) org.jacoco:jacoco-maven-plugin:restore-instrumented-classes
1111
$(MVN) sonar:sonar -Dsonar.host.url=$(SONAR_HOST) \
1212
-Dsonar.tests="src/test" \
@@ -17,8 +17,13 @@ clean:
1717
$(MVN) clean
1818

1919
verify:
20+
# Running tests
2021
$(MVN) clean test
2122

2223
build:
2324
# Building...
2425
$(MVN) clean package
26+
27+
deploy:
28+
# Deploying
29+
GPG_TTY=$$(tty) $(MVN) clean compile deploy

cdt-java-client/pom.xml

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,51 @@
164164
</dependency>
165165
</dependencies>
166166

167+
<profiles>
168+
<profile>
169+
<id>coverage</id>
170+
<build>
171+
<plugins>
172+
<plugin>
173+
<groupId>org.apache.maven.plugins</groupId>
174+
<artifactId>maven-surefire-plugin</artifactId>
175+
<version>2.20.1</version>
176+
<configuration>
177+
<systemPropertyVariables>
178+
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
179+
</systemPropertyVariables>
180+
</configuration>
181+
</plugin>
182+
<plugin>
183+
<groupId>org.jacoco</groupId>
184+
<artifactId>jacoco-maven-plugin</artifactId>
185+
<version>${jacoco.version}</version>
186+
<executions>
187+
<execution>
188+
<id>default-instrument</id>
189+
<goals>
190+
<goal>instrument</goal>
191+
</goals>
192+
</execution>
193+
<execution>
194+
<id>default-restore-instrumented-classes</id>
195+
<goals>
196+
<goal>restore-instrumented-classes</goal>
197+
</goals>
198+
<phase>post-integration-test</phase>
199+
</execution>
200+
<execution>
201+
<id>default-report</id>
202+
<goals>
203+
<goal>report</goal>
204+
</goals>
205+
</execution>
206+
</executions>
207+
</plugin>
208+
</plugins>
209+
</build>
210+
</profile>
211+
</profiles>
167212
<build>
168213
<resources>
169214
<resource>
@@ -260,42 +305,6 @@
260305
</execution>
261306
</executions>
262307
</plugin>
263-
<plugin>
264-
<groupId>org.apache.maven.plugins</groupId>
265-
<artifactId>maven-surefire-plugin</artifactId>
266-
<version>2.20.1</version>
267-
<configuration>
268-
<systemPropertyVariables>
269-
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
270-
</systemPropertyVariables>
271-
</configuration>
272-
</plugin>
273-
<plugin>
274-
<groupId>org.jacoco</groupId>
275-
<artifactId>jacoco-maven-plugin</artifactId>
276-
<version>${jacoco.version}</version>
277-
<executions>
278-
<execution>
279-
<id>default-instrument</id>
280-
<goals>
281-
<goal>instrument</goal>
282-
</goals>
283-
</execution>
284-
<execution>
285-
<id>default-restore-instrumented-classes</id>
286-
<goals>
287-
<goal>restore-instrumented-classes</goal>
288-
</goals>
289-
<phase>post-integration-test</phase>
290-
</execution>
291-
<execution>
292-
<id>default-report</id>
293-
<goals>
294-
<goal>report</goal>
295-
</goals>
296-
</execution>
297-
</executions>
298-
</plugin>
299308
<plugin>
300309
<groupId>org.apache.maven.plugins</groupId>
301310
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)