Skip to content

Commit d7add6d

Browse files
committed
Add flatten-maven-plugin and explicit dependency versions
Introduced the flatten-maven-plugin to the build process and updated .gitignore to exclude .flattened-pom.xml. Added explicit ${project.version} to internal Nitrite dependencies across modules for clarity and consistency. Updated release workflow to use the 'central' server ID and added a deployRelease flag. Added a new Maven profile for releases in the root pom.xml.
1 parent 4e00496 commit d7add6d

File tree

9 files changed

+96
-3
lines changed

9 files changed

+96
-3
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
java-package: jdk
3535
architecture: x64
3636
cache: 'maven'
37-
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
37+
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
3838
server-username: MAVEN_USERNAME
3939
server-password: MAVEN_PASSWORD
4040

@@ -59,7 +59,7 @@ jobs:
5959
]
6060
6161
- name: Deploy Release
62-
run: mvn deploy -DskipTests -Dgpg.passphrase="$PGP_KEY_PASSWORD"
62+
run: mvn deploy -DdeployRelease=true -DskipTests -Dgpg.passphrase="$PGP_KEY_PASSWORD"
6363
shell: bash
6464
env:
6565
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,4 +454,5 @@ test.log
454454
!no2-v3.db
455455
.diffblue
456456
infer-out
457-
secring.gpg
457+
secring.gpg
458+
.flattened-pom.xml

nitrite-jackson-mapper/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<dependency>
3434
<groupId>org.dizitart</groupId>
3535
<artifactId>nitrite</artifactId>
36+
<version>${project.version}</version>
3637
</dependency>
3738
<dependency>
3839
<groupId>org.slf4j</groupId>
@@ -51,6 +52,7 @@
5152
<dependency>
5253
<groupId>org.dizitart</groupId>
5354
<artifactId>nitrite-mvstore-adapter</artifactId>
55+
<version>${project.version}</version>
5456
<scope>test</scope>
5557
</dependency>
5658
<dependency>

nitrite-mvstore-adapter/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<dependency>
3434
<groupId>org.dizitart</groupId>
3535
<artifactId>nitrite</artifactId>
36+
<version>${project.version}</version>
3637
</dependency>
3738
<dependency>
3839
<groupId>org.slf4j</groupId>

nitrite-rocksdb-adapter/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<dependency>
3434
<groupId>org.dizitart</groupId>
3535
<artifactId>nitrite</artifactId>
36+
<version>${project.version}</version>
3637
</dependency>
3738
<dependency>
3839
<groupId>org.slf4j</groupId>

nitrite-spatial/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<dependency>
3434
<groupId>org.dizitart</groupId>
3535
<artifactId>nitrite</artifactId>
36+
<version>${project.version}</version>
3637
</dependency>
3738
<dependency>
3839
<groupId>org.slf4j</groupId>
@@ -60,6 +61,7 @@
6061
<dependency>
6162
<groupId>org.dizitart</groupId>
6263
<artifactId>nitrite-mvstore-adapter</artifactId>
64+
<version>${project.version}</version>
6365
<scope>test</scope>
6466
</dependency>
6567
<dependency>

nitrite-support/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@
3333
<dependency>
3434
<groupId>org.dizitart</groupId>
3535
<artifactId>nitrite</artifactId>
36+
<version>${project.version}</version>
3637
</dependency>
3738
<dependency>
3839
<groupId>org.dizitart</groupId>
3940
<artifactId>nitrite-spatial</artifactId>
41+
<version>${project.version}</version>
4042
</dependency>
4143
<dependency>
4244
<groupId>com.fasterxml.jackson.core</groupId>
@@ -56,11 +58,13 @@
5658
<dependency>
5759
<groupId>org.dizitart</groupId>
5860
<artifactId>nitrite-mvstore-adapter</artifactId>
61+
<version>${project.version}</version>
5962
<scope>test</scope>
6063
</dependency>
6164
<dependency>
6265
<groupId>org.dizitart</groupId>
6366
<artifactId>nitrite-jackson-mapper</artifactId>
67+
<version>${project.version}</version>
6468
<scope>test</scope>
6569
</dependency>
6670
<dependency>

pom.xml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,35 @@
583583
<skip>false</skip>
584584
</configuration>
585585
</plugin>
586+
<plugin>
587+
<groupId>org.apache.maven.plugins</groupId>
588+
<artifactId>maven-gpg-plugin</artifactId>
589+
</plugin>
590+
<plugin>
591+
<groupId>org.codehaus.mojo</groupId>
592+
<artifactId>flatten-maven-plugin</artifactId>
593+
<version>1.7.2</version>
594+
<configuration>
595+
<updatePomFile>true</updatePomFile>
596+
<flattenMode>oss</flattenMode>
597+
</configuration>
598+
<executions>
599+
<execution>
600+
<id>flatten</id>
601+
<phase>process-resources</phase>
602+
<goals>
603+
<goal>flatten</goal>
604+
</goals>
605+
</execution>
606+
<execution>
607+
<id>flatten.clean</id>
608+
<phase>clean</phase>
609+
<goals>
610+
<goal>clean</goal>
611+
</goals>
612+
</execution>
613+
</executions>
614+
</plugin>
586615
</plugins>
587616
</build>
588617
<distributionManagement>
@@ -592,6 +621,55 @@
592621
</snapshotRepository>
593622
</distributionManagement>
594623
</profile>
624+
<profile>
625+
<id>releases</id>
626+
<activation>
627+
<property>
628+
<name>deployReleases</name>
629+
</property>
630+
</activation>
631+
<build>
632+
<plugins>
633+
<plugin>
634+
<groupId>org.apache.maven.plugins</groupId>
635+
<artifactId>maven-deploy-plugin</artifactId>
636+
<version>3.1.4</version>
637+
<configuration>
638+
<skip>false</skip>
639+
</configuration>
640+
</plugin>
641+
<plugin>
642+
<groupId>org.apache.maven.plugins</groupId>
643+
<artifactId>maven-gpg-plugin</artifactId>
644+
</plugin>
645+
<plugin>
646+
<groupId>org.codehaus.mojo</groupId>
647+
<artifactId>flatten-maven-plugin</artifactId>
648+
<version>1.7.2</version>
649+
<configuration>
650+
<updatePomFile>true</updatePomFile>
651+
<flattenMode>oss</flattenMode>
652+
</configuration>
653+
<executions>
654+
<execution>
655+
<id>flatten</id>
656+
<phase>process-resources</phase>
657+
<goals>
658+
<goal>flatten</goal>
659+
</goals>
660+
</execution>
661+
<execution>
662+
<id>flatten.clean</id>
663+
<phase>clean</phase>
664+
<goals>
665+
<goal>clean</goal>
666+
</goals>
667+
</execution>
668+
</executions>
669+
</plugin>
670+
</plugins>
671+
</build>
672+
</profile>
595673
</profiles>
596674

597675
</project>

potassium-nitrite/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@
3434
<dependency>
3535
<groupId>org.dizitart</groupId>
3636
<artifactId>nitrite</artifactId>
37+
<version>${project.version}</version>
3738
</dependency>
3839
<dependency>
3940
<groupId>org.dizitart</groupId>
4041
<artifactId>nitrite-spatial</artifactId>
42+
<version>${project.version}</version>
4143
</dependency>
4244
<dependency>
4345
<groupId>org.dizitart</groupId>
4446
<artifactId>nitrite-jackson-mapper</artifactId>
47+
<version>${project.version}</version>
4548
</dependency>
4649
<dependency>
4750
<groupId>com.fasterxml.jackson.core</groupId>
@@ -95,6 +98,7 @@
9598
<dependency>
9699
<groupId>org.dizitart</groupId>
97100
<artifactId>nitrite-mvstore-adapter</artifactId>
101+
<version>${project.version}</version>
98102
<scope>test</scope>
99103
</dependency>
100104
<dependency>

0 commit comments

Comments
 (0)