Skip to content

Commit 1849f52

Browse files
Merge pull request #23 from OP-TED/feature/add-xpath-api
Feature: Add API for XPath parsing and processing (TEDEFO-2401)
2 parents ebd3c69 + 5ed31ef commit 1849f52

10 files changed

Lines changed: 1244 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/target/
2+
.antlr
23
.settings
34
.project
45
.classpath

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ Execute the following on the root folder of this project:
3939

4040
mvn clean install
4141

42+
## Testing
43+
44+
Unit tests are available under `src/test/java/`.
45+
46+
After running the unit tests with `mvn test`, you can generate a coverage report with `mvn jacoco:report`.
47+
The report is available under `target/site/jacoco/`, in HTML, CSV, and XML format.
48+
4249

4350
[^1]: _Copyright 2022 European Union_
4451
_Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission –

pom.xml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<maven.compiler.target>${java.version}</maven.compiler.target>
5656

5757
<!-- Versions - Third-party libraries -->
58+
<version.antlr4>4.9.3</version.antlr4>
5859
<version.commons-collections>3.2.2</version.commons-collections>
5960
<version.commons-io>2.11.0</version.commons-io>
6061
<version.commons-lang3>3.12.0</version.commons-lang3>
@@ -72,9 +73,11 @@
7273
<version.slf4j>2.0.3</version.slf4j>
7374

7475
<!-- Versions - Plugins -->
76+
<version.build-helper.plugin>3.3.0</version.build-helper.plugin>
7577
<version.compiler.plugin>3.10.1</version.compiler.plugin>
7678
<version.gpg.plugin>1.5</version.gpg.plugin>
7779
<version.install.plugin>2.5.2</version.install.plugin>
80+
<version.jacoco.plugin>0.8.10</version.jacoco.plugin>
7881
<version.javadoc.plugin>3.4.0</version.javadoc.plugin>
7982
<version.source.plugin>3.2.1</version.source.plugin>
8083
<version.jar.plugin>3.3.0</version.jar.plugin>
@@ -211,6 +214,11 @@
211214
<artifactId>jsr305</artifactId>
212215
<version>${version.jsr305}</version>
213216
</dependency>
217+
<dependency>
218+
<groupId>org.antlr</groupId>
219+
<artifactId>antlr4-runtime</artifactId>
220+
<version>${version.antlr4}</version>
221+
</dependency>
214222
<dependency>
215223
<groupId>org.jooq</groupId>
216224
<artifactId>jool</artifactId>
@@ -338,6 +346,10 @@
338346
<artifactId>jsr305</artifactId>
339347
<scope>provided</scope>
340348
</dependency>
349+
<dependency>
350+
<groupId>org.antlr</groupId>
351+
<artifactId>antlr4-runtime</artifactId>
352+
</dependency>
341353
<dependency>
342354
<groupId>org.jooq</groupId>
343355
<artifactId>jool</artifactId>
@@ -367,6 +379,16 @@
367379
<createChecksum>true</createChecksum>
368380
</configuration>
369381
</plugin>
382+
<plugin>
383+
<groupId>org.antlr</groupId>
384+
<artifactId>antlr4-maven-plugin</artifactId>
385+
<version>${version.antlr4}</version>
386+
</plugin>
387+
<plugin>
388+
<groupId>org.codehaus.mojo</groupId>
389+
<artifactId>build-helper-maven-plugin</artifactId>
390+
<version>${version.build-helper.plugin}</version>
391+
</plugin>
370392
<plugin>
371393
<groupId>org.apache.maven.plugins</groupId>
372394
<artifactId>maven-jar-plugin</artifactId>
@@ -387,13 +409,76 @@
387409
<artifactId>maven-gpg-plugin</artifactId>
388410
<version>${version.gpg.plugin}</version>
389411
</plugin>
412+
<plugin>
413+
<groupId>org.jacoco</groupId>
414+
<artifactId>jacoco-maven-plugin</artifactId>
415+
<version>${version.jacoco.plugin}</version>
416+
</plugin>
390417
<plugin>
391418
<groupId>org.sonatype.plugins</groupId>
392419
<artifactId>nexus-staging-maven-plugin</artifactId>
393420
<version>${version.nexus-staging.plugin}</version>
394421
</plugin>
395422
</plugins>
396423
</pluginManagement>
424+
425+
<plugins>
426+
<plugin>
427+
<groupId>org.antlr</groupId>
428+
<artifactId>antlr4-maven-plugin</artifactId>
429+
<executions>
430+
<execution>
431+
<id>antlr</id>
432+
<goals>
433+
<goal>antlr4</goal>
434+
</goals>
435+
</execution>
436+
</executions>
437+
</plugin>
438+
439+
<plugin>
440+
<groupId>org.codehaus.mojo</groupId>
441+
<artifactId>build-helper-maven-plugin</artifactId>
442+
<executions>
443+
<execution>
444+
<id>add-source</id>
445+
<phase>generate-sources</phase>
446+
<goals>
447+
<goal>add-source</goal>
448+
</goals>
449+
<configuration>
450+
<sources>
451+
<source>${project.build.directory}/generated-sources/antlr4/</source>
452+
</sources>
453+
</configuration>
454+
</execution>
455+
</executions>
456+
</plugin>
457+
458+
<plugin>
459+
<groupId>org.jacoco</groupId>
460+
<artifactId>jacoco-maven-plugin</artifactId>
461+
<configuration>
462+
<excludes>
463+
<exclude>**/XPath20*.class</exclude>
464+
</excludes>
465+
</configuration>
466+
<executions>
467+
<execution>
468+
<goals>
469+
<goal>prepare-agent</goal>
470+
</goals>
471+
</execution>
472+
<execution>
473+
<id>report</id>
474+
<phase>prepare-package</phase>
475+
<goals>
476+
<goal>report</goal>
477+
</goals>
478+
</execution>
479+
</executions>
480+
</plugin>
481+
</plugins>
397482
</build>
398483

399484
<profiles>

0 commit comments

Comments
 (0)