summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.gitlab-ci.yml91
-rw-r--r--.mvn/wrapper/maven-wrapper.properties2
-rw-r--r--REUSE.toml7
-rw-r--r--TODO.org15
-rwxr-xr-xbuild.sh2
-rw-r--r--buildstuffs/pom.xml4
-rw-r--r--ci/mvn-settings.xml28
-rw-r--r--pom.xml77
9 files changed, 209 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index e98a643..908ca94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,6 @@ build/
37 37
38### JVM crashes ### 38### JVM crashes ###
39hs_err_* 39hs_err_*
40
41### GitLab CI ###
42/.cache
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..a8025f1
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,91 @@
1variables:
2 XDG_CACHE_HOME: "${CI_PROJECT_DIR}/.cache"
3 M2_REPO: "${XDG_CACHE_HOME}/m2/repository"
4 MAVEN_OPTS: "-Dmaven.repo.local=${M2_REPO}"
5 PRE_COMMIT_HOME: "${XDG_CACHE_HOME}/pre-commit"
6
7default:
8 image: registry.gitlab.com/lv.enes/containers/build-env:latest
9 cache:
10 paths:
11 - .cache/
12 - target/
13 - buildstuffs/target/
14
15stages:
16 - cache
17 - lint
18 - build
19 - test
20 - deploy
21
22# Can't do this, it tries to fetch buildstuffs which is outdated...
23# cache-maven:
24# stage: cache
25# script:
26# - ./mvnw dependency:go-offline
27
28lint-pre-commit:
29 stage: lint
30 script:
31 - pre-commit run -a
32 rules:
33 - if: $CI_PIPELINE_SOURCE != "schedule"
34
35build:
36 stage: build
37 script:
38 - ./mvnw install
39 rules:
40 - if: $CI_PIPELINE_SOURCE != "schedule"
41
42# Currently this one is just dependency-check, it didn't like my requests to populate the cache before, so leaving it
43# off for now...
44# test-all:
45# stage: test
46# script:
47# - ./mvnw verify -Denv=test
48
49test-libyear:
50 stage: test
51 script:
52 - ./mvnw verify -DmaxLibYears=1
53
54# NOTE: This one always fails when there's an update available
55test-pre-commit-update:
56 stage: test
57 artifacts:
58 paths:
59 - update.diff
60 when: on_failure
61 script:
62 - pre-commit autoupdate
63 - git diff --exit-code | tee update.diff
64
65test-repro:
66 stage: test
67 cache:
68 # This job deletes stuff from the maven repository to make sure the parent is reproducible, don't update the cache
69 policy: pull
70 script:
71 - ./build.sh
72 rules:
73 - if: $CI_PIPELINE_SOURCE != "schedule"
74
75# NOTE: This one never fails on updates, that's left for test-libyear
76test-versions-update:
77 stage: test
78 artifacts:
79 paths:
80 - update.diff
81 script:
82 - ./mvnw versions:update-child-modules versions:update-parent versions:update-properties
83 - git diff | tee update.diff
84
85deploy:
86 stage: deploy
87 environment: production
88 script:
89 - ./mvnw -s ci/mvn-settings.xml deploy
90 rules:
91 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index c0b0262..c0b0f6f 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,3 +1,3 @@
1wrapperVersion=3.3.4 1wrapperVersion=3.3.4
2distributionType=only-script 2distributionType=only-script
3distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-5/apache-maven-4.0.0-rc-5-bin.zip 3distributionUrl=https://mvn.enes.lv/releases/org/apache/maven/apache-maven/4.0.0-rc-5/apache-maven-4.0.0-rc-5-bin.zip
diff --git a/REUSE.toml b/REUSE.toml
index 57eeea1..0df0f3a 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -9,6 +9,9 @@ SPDX-FileCopyrightText = "Apache Software Foundation"
9 9
10[[annotations]] 10[[annotations]]
11label = "Miscellaneous little shits I put under CC0" 11label = "Miscellaneous little shits I put under CC0"
12path = ["build.sh", ".gitattributes", ".gitignore", ".pre-commit-config.yaml", ".sdkmanrc"] 12path = [
13 "build.sh", "ci/mvn-settings.xml", ".gitattributes", ".gitignore", ".gitlab-ci.yml", ".pre-commit-config.yaml",
14 ".sdkmanrc", "TODO.org",
15]
13SPDX-License-Identifier = "CC0-1.0" 16SPDX-License-Identifier = "CC0-1.0"
14SPDX-FileCopyrightText = " 2025 Uko Kokņevičs <perkontevs@gmail.com>" 17SPDX-FileCopyrightText = " 2025-2026 Uko Kokņevičs <perkontevs@gmail.com>"
diff --git a/TODO.org b/TODO.org
new file mode 100644
index 0000000..988128a
--- /dev/null
+++ b/TODO.org
@@ -0,0 +1,15 @@
1* TODO Replace buildstuffs with an extra jar with a classifier maybe?
2* Waiting for Maven 4
3** TODO pom.rb or pom.yaml
4*** https://github.com/takari/polyglot-maven/
5The inspiration, pom.rb in examples and, eg, in [[https://github.com/jruby/jruby/blob/master/pom.rb][JRuby]] look /quite/ hot. Problem currently is Maven 4 support, probably
6have to wait for that to be fully released, see [[https://github.com/takari/polyglot-maven/issues/344][takari/polyglot-maven#334]].
7*** https://github.com/maveniverse/mason
8Benefit over polyglot-maven is that this is built specifically for Maven 4. Downside, however, is that this doesn't
9have ruby. Something like ~pom.yaml~ would be good enough though if Ruby is not possible, but, again, wait for full
10Maven 4 release, then, maybe make an issue :smile:.
11** TODO mvnd wrapper
12Currently, ~wrapper~ plugin can generate a wrapper using Maven Daemon instead of Maven with something like
13~./mvnw wrapper:wrapper -Dmvnd=2.0.0-rc-3~. Problem is that it is currently lagging behind Maven 4 release candidates
14so my strict version range which allows only one release candidate doesn't like this. Once again, wait for full Maven 4
15release :grin:.
diff --git a/build.sh b/build.sh
index 52ae44a..db17021 100755
--- a/build.sh
+++ b/build.sh
@@ -6,6 +6,6 @@
6set -eu 6set -eu
7 7
8./mvnw dependency:go-offline install 8./mvnw dependency:go-offline install
9rm -fr ~/.m2/repository/lv/enes/ 9rm -fr ${M2_REPO:-~/.m2/repository}/lv/enes/
10./mvnw -o clean 10./mvnw -o clean
11./mvnw -o install 11./mvnw -o install
diff --git a/buildstuffs/pom.xml b/buildstuffs/pom.xml
index 5e6feeb..2d2fe0b 100644
--- a/buildstuffs/pom.xml
+++ b/buildstuffs/pom.xml
@@ -10,7 +10,7 @@
10 10
11 <groupId>lv.enes</groupId> 11 <groupId>lv.enes</groupId>
12 <artifactId>buildstuffs</artifactId> 12 <artifactId>buildstuffs</artifactId>
13 <version>1.1.0-SNAPSHOT</version> 13 <version>3-SNAPSHOT</version>
14 14
15 <licenses> 15 <licenses>
16 <license> 16 <license>
@@ -47,7 +47,7 @@
47 <jar-plugin.version>3.5.0</jar-plugin.version> 47 <jar-plugin.version>3.5.0</jar-plugin.version>
48 <resources-plugin.version>3.4.0</resources-plugin.version> 48 <resources-plugin.version>3.4.0</resources-plugin.version>
49 <surefire-plugin.version>3.5.4</surefire-plugin.version> 49 <surefire-plugin.version>3.5.4</surefire-plugin.version>
50 <versions-plugin.version>2.20.1</versions-plugin.version> 50 <versions-plugin.version>2.21.0</versions-plugin.version>
51 </properties> 51 </properties>
52 52
53 <build> 53 <build>
diff --git a/ci/mvn-settings.xml b/ci/mvn-settings.xml
new file mode 100644
index 0000000..4e6fb80
--- /dev/null
+++ b/ci/mvn-settings.xml
@@ -0,0 +1,28 @@
1<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
4 <mirrors>
5 <mirror>
6 <id>mvn.enes.lv</id>
7 <name>Enes Maven (also mirrors central)</name>
8 <url>https://mvn.enes.lv/releases</url>
9 <mirrorOf>central</mirrorOf>
10 </mirror>
11 </mirrors>
12 <servers>
13 <server>
14 <id>mvn.enes.lv</id>
15 <username>${env.MAVEN_REPO_USER}</username>
16 <password>${env.MAVEN_REPO_PASS}</password>
17 </server>
18 <server>
19 <id>mvn.enes.lv-snapshots</id>
20 <username>${env.MAVEN_REPO_USER}</username>
21 <password>${env.MAVEN_REPO_PASS}</password>
22 </server>
23 <server>
24 <id>nvd.nist.gov</id>
25 <password>${env.NVD_NIST_API_KEY}</password>
26 </server>
27 </servers>
28</settings>
diff --git a/pom.xml b/pom.xml
index f24bfc7..371ffe9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
11 11
12 <groupId>lv.enes</groupId> 12 <groupId>lv.enes</groupId>
13 <artifactId>parent</artifactId> 13 <artifactId>parent</artifactId>
14 <version>1.1.0-SNAPSHOT</version> 14 <version>3-SNAPSHOT</version>
15 <packaging>pom</packaging> 15 <packaging>pom</packaging>
16 16
17 <subprojects> 17 <subprojects>
@@ -50,35 +50,38 @@
50 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 50 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
51 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 51 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
52 52
53 <ignored-versions>.*-M.*,.*\.M.*,.*-RC.*,.*-alpha.*,.*\.Alpha.*,.*-beta.*,.*-ea.*</ignored-versions>
54
53 <java.version>25</java.version> 55 <java.version>25</java.version>
54 <java.preview>true</java.preview> 56 <java.preview>true</java.preview>
55 57
56 <maven.version>4.0.0-rc-5</maven.version> 58 <maven.version>4.0.0-rc-5</maven.version>
57 <maven.version-range>[${maven.version}]</maven.version-range> 59 <maven.version-range>[${maven.version}]</maven.version-range>
58 60
59 <enes-parent.version>1.1.0-SNAPSHOT</enes-parent.version> 61 <enes-parent.version>3-SNAPSHOT</enes-parent.version>
60 <enes-vocabulary-plugin.version>1.0.0</enes-vocabulary-plugin.version> 62 <enes-vocabulary-plugin.version>1.0.0</enes-vocabulary-plugin.version>
61 63
62 <bouncycastle.version>1.83</bouncycastle.version> 64 <bouncycastle.version>1.83</bouncycastle.version>
63 <brotli4j.version>1.20.0</brotli4j.version> 65 <brotli4j.version>1.20.0</brotli4j.version>
64 <checkstyle.version>13.0.0</checkstyle.version> 66 <checkstyle.version>13.0.0</checkstyle.version>
65 <commons-lang.version>3.20.0</commons-lang.version> 67 <commons-lang.version>3.20.0</commons-lang.version>
66 <dagger.version>2.57.2</dagger.version> 68 <dagger.version>2.59</dagger.version>
67 <dirs.version>26</dirs.version> 69 <dirs.version>26</dirs.version>
68 <errorprone-annot.version>2.46.0</errorprone-annot.version> 70 <errorprone-annot.version>2.46.0</errorprone-annot.version>
69 <guava.version>33.5.0-jre</guava.version> 71 <guava.version>33.5.0-jre</guava.version>
70 <jakarta.inject.version>2.0.1</jakarta.inject.version> 72 <jakarta.inject.version>2.0.1</jakarta.inject.version>
71 <jakarta.json.version>3.0.1</jakarta.json.version> 73 <jakarta.json.version>3.0.1</jakarta.json.version>
72 <jansi.version>2.4.2</jansi.version> 74 <jansi.version>2.4.2</jansi.version>
73 <javafx.version>25.0.1</javafx.version> 75 <javafx.version>25.0.2</javafx.version>
74 <javalin.version>6.7.0</javalin.version> 76 <javalin.version>6.7.0</javalin.version>
75 <jena.version>5.6.0</jena.version> 77 <jena.version>5.6.0</jena.version>
76 <jline.version>3.30.6</jline.version> 78 <jline.version>3.30.6</jline.version>
77 <joml.version>1.10.8</joml.version> 79 <joml.version>1.10.8</joml.version>
78 <junit.version>6.0.2</junit.version> 80 <junit.version>6.0.2</junit.version>
79 <logback.version>1.5.24</logback.version> 81 <logback.version>1.5.25</logback.version>
80 <lombok.version>1.18.42</lombok.version> 82 <lombok.version>1.18.42</lombok.version>
81 <lwjgl.version>3.3.6</lwjgl.version> 83 <lwjgl.version>3.4.0</lwjgl.version>
84 <modernizer.version>3.2.0</modernizer.version>
82 <netty.version>4.2.9.Final</netty.version> 85 <netty.version>4.2.9.Final</netty.version>
83 <picocli.version>4.7.7</picocli.version> 86 <picocli.version>4.7.7</picocli.version>
84 <plugin-annotations.version>3.15.2</plugin-annotations.version> 87 <plugin-annotations.version>3.15.2</plugin-annotations.version>
@@ -102,6 +105,7 @@
102 <jacoco-plugin.version>0.8.14</jacoco-plugin.version> 105 <jacoco-plugin.version>0.8.14</jacoco-plugin.version>
103 <jar-plugin.version>3.5.0</jar-plugin.version> 106 <jar-plugin.version>3.5.0</jar-plugin.version>
104 <javafx-plugin.version>0.0.8</javafx-plugin.version> 107 <javafx-plugin.version>0.0.8</javafx-plugin.version>
108 <libyear-plugin.version>1.3.0</libyear-plugin.version>
105 <owasp-plugin.version>12.2.0</owasp-plugin.version> 109 <owasp-plugin.version>12.2.0</owasp-plugin.version>
106 <plugin-plugin.version>3.15.2</plugin-plugin.version> 110 <plugin-plugin.version>3.15.2</plugin-plugin.version>
107 <pmd-plugin.version>3.28.0</pmd-plugin.version> 111 <pmd-plugin.version>3.28.0</pmd-plugin.version>
@@ -109,7 +113,7 @@
109 <resources-plugin.version>3.4.0</resources-plugin.version> 113 <resources-plugin.version>3.4.0</resources-plugin.version>
110 <site-plugin.version>3.21.0</site-plugin.version> 114 <site-plugin.version>3.21.0</site-plugin.version>
111 <surefire-plugin.version>3.5.4</surefire-plugin.version> 115 <surefire-plugin.version>3.5.4</surefire-plugin.version>
112 <versions-plugin.version>2.20.1</versions-plugin.version> 116 <versions-plugin.version>2.21.0</versions-plugin.version>
113 <wrapper-plugin.version>3.3.4</wrapper-plugin.version> 117 <wrapper-plugin.version>3.3.4</wrapper-plugin.version>
114 </properties> 118 </properties>
115 119
@@ -243,6 +247,11 @@
243 <version>${jansi.version}</version> 247 <version>${jansi.version}</version>
244 </dependency> 248 </dependency>
245 <dependency> 249 <dependency>
250 <groupId>org.gaul</groupId>
251 <artifactId>modernizer-maven-annotations</artifactId>
252 <version>${modernizer.version}</version>
253 </dependency>
254 <dependency>
246 <groupId>org.jline</groupId> 255 <groupId>org.jline</groupId>
247 <artifactId>jline</artifactId> 256 <artifactId>jline</artifactId>
248 <version>${jline.version}</version> 257 <version>${jline.version}</version>
@@ -267,12 +276,6 @@
267 <artifactId>slf4j-api</artifactId> 276 <artifactId>slf4j-api</artifactId>
268 <version>${slf4j.version}</version> 277 <version>${slf4j.version}</version>
269 </dependency> 278 </dependency>
270 <dependency>
271 <!-- TODO[2.0.0]: Remove this -->
272 <groupId>org.slf4j</groupId>
273 <artifactId>slf4j-simple</artifactId>
274 <version>${slf4j.version}</version>
275 </dependency>
276 </dependencies> 279 </dependencies>
277 </dependencyManagement> 280 </dependencyManagement>
278 281
@@ -285,6 +288,11 @@
285 288
286 <!-- provided scope --> 289 <!-- provided scope -->
287 <dependency> 290 <dependency>
291 <groupId>org.gaul</groupId>
292 <artifactId>modernizer-maven-annotations</artifactId>
293 <scope>provided</scope>
294 </dependency>
295 <dependency>
288 <groupId>org.projectlombok</groupId> 296 <groupId>org.projectlombok</groupId>
289 <artifactId>lombok</artifactId> 297 <artifactId>lombok</artifactId>
290 <scope>provided</scope> 298 <scope>provided</scope>
@@ -479,6 +487,21 @@
479 <version>${wrapper-plugin.version}</version> 487 <version>${wrapper-plugin.version}</version>
480 </plugin> 488 </plugin>
481 <plugin> 489 <plugin>
490 <groupId>io.github.mfoo</groupId>
491 <artifactId>libyear-maven-plugin</artifactId>
492 <version>${libyear-plugin.version}</version>
493 <configuration>
494 <ignoredVersions>${ignored-versions}</ignoredVersions>
495 </configuration>
496 <executions>
497 <execution>
498 <goals>
499 <goal>analyze</goal>
500 </goals>
501 </execution>
502 </executions>
503 </plugin>
504 <plugin>
482 <groupId>lv.enes</groupId> 505 <groupId>lv.enes</groupId>
483 <artifactId>vocabulary-builder-plugin</artifactId> 506 <artifactId>vocabulary-builder-plugin</artifactId>
484 <version>${enes-vocabulary-plugin.version}</version> 507 <version>${enes-vocabulary-plugin.version}</version>
@@ -501,7 +524,15 @@
501 <artifactId>versions-maven-plugin</artifactId> 524 <artifactId>versions-maven-plugin</artifactId>
502 <version>${versions-plugin.version}</version> 525 <version>${versions-plugin.version}</version>
503 <configuration> 526 <configuration>
504 <ignoredVersions>.*-M.*,.*\.M.*,.*-RC.*,.*-alpha.*,.*\.Alpha.*,.*-beta.*,.*-ea.*</ignoredVersions> 527 <ignoredVersions>${ignored-versions}</ignoredVersions>
528 </configuration>
529 </plugin>
530 <plugin>
531 <groupId>org.gaul</groupId>
532 <artifactId>modernizer-maven-plugin</artifactId>
533 <version>${modernizer.version}</version>
534 <configuration>
535 <javaVersion>${java.version}</javaVersion>
505 </configuration> 536 </configuration>
506 </plugin> 537 </plugin>
507 <plugin> 538 <plugin>
@@ -555,6 +586,10 @@
555 <artifactId>maven-wrapper-plugin</artifactId> 586 <artifactId>maven-wrapper-plugin</artifactId>
556 </plugin> 587 </plugin>
557 <plugin> 588 <plugin>
589 <groupId>io.github.mfoo</groupId>
590 <artifactId>libyear-maven-plugin</artifactId>
591 </plugin>
592 <plugin>
558 <groupId>org.codehaus.mojo</groupId> 593 <groupId>org.codehaus.mojo</groupId>
559 <artifactId>versions-maven-plugin</artifactId> 594 <artifactId>versions-maven-plugin</artifactId>
560 </plugin> 595 </plugin>
@@ -603,6 +638,20 @@
603 </plugin> 638 </plugin>
604 639
605 <plugin> 640 <plugin>
641 <groupId>org.gaul</groupId>
642 <artifactId>modernizer-maven-plugin</artifactId>
643 <executions>
644 <execution>
645 <id>modernizer</id>
646 <phase>verify</phase>
647 <goals>
648 <goal>modernizer</goal>
649 </goals>
650 </execution>
651 </executions>
652 </plugin>
653
654 <plugin>
606 <groupId>org.jacoco</groupId> 655 <groupId>org.jacoco</groupId>
607 <artifactId>jacoco-maven-plugin</artifactId> 656 <artifactId>jacoco-maven-plugin</artifactId>
608 <executions> 657 <executions>