Skip to content

Commit 2b54bf4

Browse files
authored
Merge pull request #51 from levigo/feature/update_dependencies
feat(deps): update dependencies
2 parents f87e2ec + 492f9b6 commit 2b54bf4

File tree

6 files changed

+47
-78
lines changed

6 files changed

+47
-78
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121

2222
strategy:
2323
fail-fast: false
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
with:
3535
# We must fetch at least the immediate parents so that if this is
3636
# a pull request then we can check out the head.

.github/workflows/continuous-delivery.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ on:
1010
env:
1111
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
1212
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
13-
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
13+
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
1414
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
1515
# when running from the command line.
1616
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
1717
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
1818

1919
jobs:
2020
build:
21-
22-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
2322
timeout-minutes: 10
2423

2524
steps:
26-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2726

2827
- name: Bump version and create tag
2928
id: semanticversion
@@ -42,19 +41,11 @@ jobs:
4241
exit -1
4342
fi
4443
45-
## Enable Caching
46-
- name: Cache SonarCloud packages
47-
uses: actions/cache@v4
48-
with:
49-
path: ~/.sonar/cache
50-
key: ${{ runner.os }}-sonar
51-
restore-keys: ${{ runner.os }}-sonar
52-
53-
- name: Set up JDK 17
54-
uses: actions/setup-java@v4
44+
- name: Set up JDK 21
45+
uses: actions/setup-java@v5
5546
with:
5647
distribution: 'temurin'
57-
java-version: '17'
48+
java-version: '21'
5849
cache: 'maven'
5950

6051
## Build with maven
@@ -73,9 +64,8 @@ jobs:
7364
7465
- name: Perform build and analysis
7566
env:
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
77-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
78-
run: mvn $MAVEN_CLI_OPTS package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
run: mvn $MAVEN_CLI_OPTS package
7969

8070
## Deploy
8171
- name: Deploy package

.github/workflows/continuous-integration.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,31 @@ on:
1010
env:
1111
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
1212
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
13-
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
13+
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
1414
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
1515
# when running from the command line.
1616
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
1717
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
1818

1919
jobs:
2020
build:
21-
22-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-24.04
2322
timeout-minutes: 10
2423

2524
steps:
26-
- uses: actions/checkout@v4
27-
28-
## Enable Caching
29-
- name: Cache SonarCloud packages
30-
uses: actions/cache@v4
31-
with:
32-
path: ~/.sonar/cache
33-
key: ${{ runner.os }}-sonar
34-
restore-keys: ${{ runner.os }}-sonar
25+
- uses: actions/checkout@v5
3526

36-
- name: Set up JDK 17
37-
uses: actions/setup-java@v4
27+
- name: Set up JDK 21
28+
uses: actions/setup-java@v5
3829
with:
3930
distribution: 'temurin'
40-
java-version: '17'
31+
java-version: '21'
4132
cache: 'maven'
4233

4334
- name: Perform build and analysis
4435
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
46-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47-
run: mvn $MAVEN_CLI_OPTS verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: mvn $MAVEN_CLI_OPTS verify
4838

4939
- name: Notify Developers
5040
uses: 8398a7/action-slack@v3

pom.xml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -49,51 +49,42 @@
4949
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5050
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5151

52-
<zip4j.version>2.11.5</zip4j.version>
53-
<slf4j.version>2.0.17</slf4j.version>
54-
55-
<poi.version>5.4.1</poi.version>
56-
<rtfparserkit.version>1.16.0</rtfparserkit.version>
57-
<commons.io.version>2.19.0</commons.io.version>
58-
<commons-compress.version>1.27.1</commons-compress.version>
52+
<bouncycastle.version>1.82</bouncycastle.version>
53+
<commons-compress.version>1.28.0</commons-compress.version>
54+
<commons.io.version>2.21.0</commons.io.version>
55+
<jaxb-api.version>4.0.4</jaxb-api.version>
56+
<jaxb-core.version>4.0.6</jaxb-core.version>
57+
<jaxb-impl.version>4.0.6</jaxb-impl.version>
5958
<opennlp-tools.version>1.9.3</opennlp-tools.version>
60-
61-
<pdfbox.version>3.0.5</pdfbox.version>
62-
63-
<jaxb-api.version>4.0.2</jaxb-api.version>
64-
<jaxb-core.version>4.0.5</jaxb-core.version>
65-
<jaxb-impl.version>4.0.5</jaxb-impl.version>
66-
59+
<pdfbox.version>3.0.6</pdfbox.version>
60+
<poi.version>5.5.0</poi.version>
61+
<rtfparserkit.version>1.16.0</rtfparserkit.version>
62+
<slf4j.version>2.0.17</slf4j.version>
63+
<zip4j.version>2.11.5</zip4j.version>
6764
<!-- testing -->
68-
<junit.version>5.11.4</junit.version>
6965
<hamcrest.version>3.0</hamcrest.version>
7066
<jmock-junit5.version>2.13.1</jmock-junit5.version>
71-
<log4j.version>2.24.3</log4j.version>
72-
73-
<!-- sonarcloud -->
74-
<sonar.projectKey>levigo_filetype-analyzer</sonar.projectKey>
75-
<sonar.organization>levigo</sonar.organization>
76-
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
77-
78-
<bouncycastle.version>1.80</bouncycastle.version>
67+
<junit.version>5.11.4</junit.version>
68+
<log4j.version>2.25.2</log4j.version>
7969
</properties>
8070

8171
<build>
8272
<plugins>
8373
<plugin>
8474
<groupId>org.apache.maven.plugins</groupId>
8575
<artifactId>maven-compiler-plugin</artifactId>
86-
<version>3.13.0</version>
76+
<version>3.14.1</version>
8777
<configuration>
8878
<source>17</source>
8979
<target>17</target>
80+
<release>17</release>
9081
</configuration>
9182
</plugin>
9283
<plugin>
9384
<!-- Calculating the test coverage -->
9485
<groupId>org.jacoco</groupId>
9586
<artifactId>jacoco-maven-plugin</artifactId>
96-
<version>0.8.12</version>
87+
<version>0.8.14</version>
9788
<executions>
9889
<execution>
9990
<id>pre-unit-test</id>
@@ -117,7 +108,7 @@
117108
<plugin>
118109
<groupId>org.apache.maven.plugins</groupId>
119110
<artifactId>maven-surefire-plugin</artifactId>
120-
<version>3.5.2</version>
111+
<version>3.5.4</version>
121112
<configuration>
122113
<!-- Sets the VM argument line as defined by the JaCoCo plugin. -->
123114
<argLine>${jacocoAgentArgLine}</argLine>
@@ -133,12 +124,12 @@
133124
<plugin>
134125
<groupId>org.apache.maven.plugins</groupId>
135126
<artifactId>maven-enforcer-plugin</artifactId>
136-
<version>3.5.0</version>
127+
<version>3.6.2</version>
137128
<dependencies>
138129
<dependency>
139130
<groupId>org.codehaus.mojo</groupId>
140131
<artifactId>extra-enforcer-rules</artifactId>
141-
<version>1.9.0</version>
132+
<version>1.11.0</version>
142133
</dependency>
143134
</dependencies>
144135
<executions>
@@ -154,7 +145,7 @@
154145
</requireMavenVersion>
155146
<requireJavaVersion>
156147
<!-- http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
157-
<version>[17,21)</version>
148+
<version>[17,22)</version>
158149
</requireJavaVersion>
159150
<!-- <requirePluginVersions> <message>Best Practice is to
160151
always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease>
@@ -200,17 +191,17 @@
200191
<plugin>
201192
<groupId>org.apache.maven.plugins</groupId>
202193
<artifactId>maven-jar-plugin</artifactId>
203-
<version>3.4.2</version>
194+
<version>3.5.0</version>
204195
</plugin>
205196
<plugin>
206197
<groupId>org.apache.maven.plugins</groupId>
207198
<artifactId>maven-clean-plugin</artifactId>
208-
<version>3.4.0</version>
199+
<version>3.5.0</version>
209200
</plugin>
210201
<plugin>
211202
<groupId>org.apache.maven.plugins</groupId>
212203
<artifactId>maven-install-plugin</artifactId>
213-
<version>3.1.3</version>
204+
<version>3.1.4</version>
214205
</plugin>
215206
<plugin>
216207
<groupId>org.apache.maven.plugins</groupId>
@@ -225,12 +216,12 @@
225216
<plugin>
226217
<groupId>org.apache.maven.plugins</groupId>
227218
<artifactId>maven-deploy-plugin</artifactId>
228-
<version>3.1.3</version>
219+
<version>3.1.4</version>
229220
</plugin>
230221
<plugin>
231222
<groupId>org.apache.maven.plugins</groupId>
232223
<artifactId>maven-javadoc-plugin</artifactId>
233-
<version>3.11.2</version>
224+
<version>3.12.0</version>
234225
</plugin>
235226
</plugins>
236227
</pluginManagement>
@@ -412,7 +403,7 @@
412403
<plugin>
413404
<groupId>org.sonatype.central</groupId>
414405
<artifactId>central-publishing-maven-plugin</artifactId>
415-
<version>0.7.0</version>
406+
<version>0.9.0</version>
416407
<extensions>true</extensions>
417408
<configuration>
418409
<publishingServerId>central</publishingServerId>
@@ -456,7 +447,7 @@
456447
<plugin>
457448
<groupId>org.apache.maven.plugins</groupId>
458449
<artifactId>maven-gpg-plugin</artifactId>
459-
<version>3.2.6</version>
450+
<version>3.2.8</version>
460451
<executions>
461452
<execution>
462453
<id>sign-artifacts</id>

src/main/java/org/jadice/filetype/matchers/TextMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ private float countCharacters(final String text, final Context context) {
160160
|| Character.isIdentifierIgnorable(c) //
161161
|| Character.isSpaceChar(c) //
162162
|| Character.isWhitespace(c)) {
163-
LOGGER.debug("Recognized char '{}' @ {}", c, i);
163+
LOGGER.trace("Recognized char '{}' @ {}", c, i);
164164
defined++;
165165
} else if (PUNCTUATION.contains(c)) {
166-
LOGGER.debug("Ignoring punctuation char '{}' @ {}", c, i);
166+
LOGGER.trace("Ignoring punctuation char '{}' @ {}", c, i);
167167
ignored++;
168168
}
169169
}

src/test/java/TestHeicImages.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ void testHeicFiles() throws IOException {
3030
final Map<String, Object> result = analyzer.analyze(f);
3131
assertNotNull(result, f + " could not be analyzed");
3232
assertEquals("image/heic", result.get(MimeTypeAction.KEY), f + " is not recognized as heic");
33-
3433
}
3534
}
3635

@@ -40,7 +39,6 @@ void testNonHeicFiles() throws IOException {
4039
final Map<String, Object> result = analyzer.analyze(f);
4140
assertNotNull(result, f + " could not be analyzed");
4241
assertNotEquals("image/heic", result.get(MimeTypeAction.KEY), "false positive: " + f + " is recognized as heic");
43-
4442
}
4543
}
4644

0 commit comments

Comments
 (0)