Skip to content

Commit fc3a616

Browse files
authored
Merge pull request #50 from 398ja/fix/commons-lang3-runtime-0.1.1
fix/commons-lang3-runtime-0.1.1
2 parents 0dbc5c2 + b17d60d commit fc3a616

6 files changed

Lines changed: 58 additions & 28 deletions

File tree

AGENTS.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,58 @@
33
## Description
44
A simple Java client for ACINQ's [phoenixd REST API](https://phoenix.acinq.co/server/api). It wraps the HTTP endpoints and exposes typed requests and responses.
55

6+
## Project
7+
- Maintain the versions in the configuration section of the parent pom.xml file.
8+
9+
## Coding
10+
- When writing code, follow the "Clean Code" principles:
11+
- [Clean Code](https://dev.398ja.xyz/books/Clean_Architecture.pdf)
12+
- Relevant chapters: 2, 3, 4, 7, 10, 17
13+
- [Clean Architecture](https://dev.398ja.xyz/books/Clean_Code.pdf)
14+
- Relevant chapters: All chapters in part III and IV, 7-14.
15+
- [Design Patterns](https://github.com/iluwatar/java-design-patterns)
16+
- Follow design patterns as described in the book, whenever possible.
17+
- When commiting code, follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
18+
- When adding new features, ensure they are compliant with the Cashu specification (NUTs) provided above.
19+
20+
## Documentation
21+
22+
- When generating documentation:
23+
- Follow the Diátaxis framework and classify each document as a tutorial, how-to guide, reference, or explanation.
24+
- Place new Markdown files under `docs/<section>` matching the chosen category.
25+
- Start each document with a top-level `#` heading and a short introduction that states the purpose.
26+
- Link the document from `docs/README.md` in the corresponding section.
27+
- Use relative links to reference other documents and keep code snippets minimal and tested.
28+
- Consult the following resources on Diátaxis for guidance:
29+
- https://github.blog/developer-skills/documentation-done-right-a-developers-guide/
30+
- https://diataxis.fr/
31+
- https://diataxis.fr/start-here/
32+
- https://diataxis.fr/how-to-use-diataxis/
33+
- https://diataxis.fr/tutorials/
34+
- https://diataxis.fr/how-to-guides/
35+
- https://diataxis.fr/tutorials-how-to/
36+
- https://diataxis.fr/quality/
37+
- https://diataxis.fr/complex-hierarchies/
38+
- https://diataxis.fr/compass/
639

740
## Testing
841

942
- Always run `mvn -q verify` from the repository root before committing your changes.
1043
- Include the command's output in the PR description.
1144
- If tests fail due to dependency or network issues, mention this in the PR.
12-
- Update the `README.md` file if you add or modify features.
45+
- Update the documentation files if you add or modify features.
1346
- Update the `pom.xml` file for new modules or dependencies, ensuring compatibility with Java 21.
1447
- Verify new Dockerfiles or `docker-compose.yml` files by running `docker-compose build`.
1548
- Document new REST endpoints in the API documentation and ensure they are tested.
16-
- Add unit tests for new functionality, covering edge cases.
49+
- Add unit tests for new functionality, covering edge cases. Follow "Clean Code" principles on unit tests, as described in the "Clean Code" book (Chapter 9).
1750
- Ensure modifications to existing code do not break functionality and pass all tests.
1851
- Add integration tests for new features to verify end-to-end functionality.
1952
- Ensure new dependencies or configurations do not introduce security vulnerabilities.
20-
- Maintain the versions in the configuration section of the pom.xml files.
2153
- Add a comment on top of every test method to describe the test in plain English.
2254

2355
## Pull Requests
2456

57+
- Always follow the repository's PR submission guidelines and use the PR template located at `.github/pull_request_template.md`.
2558
- Summarize the changes made and describe how they were tested.
2659
- Include any limitations or known issues in the description.
27-
- Add a "Network Access" section summarizing blocked domains if network requests were denied.
28-
- Ensure all new features, modules, or dependencies are properly documented in the `README.md` file.
29-
- Always follow the repository's PR submission guidelines and use the PR template located at `.github/pull_request_template.md`.
30-
- When implementing features, consult the API specifications:
31-
32-
## PR Quality Gate
33-
34-
- Always follow the PR submission guidelines and use the [PR template](.github/pull_request_template.md) when creating pull requests.
35-
- PR summaries must reference modified files with file path citations (e.g. `F:path/to/file.java†L1-L2`).
36-
- PR titles and commit messages must follow the `type: description` naming format.
37-
- Allowed types: feat, fix, docs, refactor, test, chore, ci, build, perf, style.
38-
- The description should be a concise verb + object phrase (e.g., `refactor: Refactor auth middleware to async`).
39-
- Include a Testing section listing the commands run. Prefix each command with ✅, ⚠️, or ❌ and cite relevant terminal output.
40-
- If network requests fail, add a Network Access section noting blocked domains.
41-
- When TODOs or placeholders remain, include a Notes section.
42-
- Review AI-generated changes with developer expertise, ensuring you understand why the code works and that it remains resilient, scalable, and secure.
43-
- Use `rg` for search instead of `ls -R` or `grep -R`.
44-
- Ensure all new features are compliant with the API specification provided above.
60+
- Ensure all new features are compliant with the Cashu specification (NUTs) provided above.

phoenixd-base/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@
2727
<dependency>
2828
<groupId>org.apache.commons</groupId>
2929
<artifactId>commons-configuration2</artifactId>
30-
<version>2.11.0</version>
30+
<version>${commons.configuration2.version}</version>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.apache.commons</groupId>
34+
<artifactId>commons-lang3</artifactId>
35+
<version>${commons.lang3.version}</version>
3136
</dependency>
3237
<dependency>
3338
<groupId>commons-beanutils</groupId>
3439
<artifactId>commons-beanutils</artifactId>
35-
<version>1.9.4</version>
40+
<version>${commons.beanutils.version}</version>
3641
</dependency>
3742
<dependency>
3843
<groupId>org.junit.jupiter</groupId>

phoenixd-mock/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<plugin>
5959
<groupId>com.google.cloud.tools</groupId>
6060
<artifactId>jib-maven-plugin</artifactId>
61-
<version>3.4.1</version>
61+
<version>${jib-maven-plugin.version}</version>
6262
<configuration>
6363
<from>
6464
<image>gcr.io/distroless/java21</image>

phoenixd-rest/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>commons-beanutils</groupId>
3333
<artifactId>commons-beanutils</artifactId>
34-
<version>1.9.4</version>
34+
<version>${commons.beanutils.version}</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>org.projectlombok</groupId>
@@ -52,7 +52,7 @@
5252
<dependency>
5353
<groupId>com.squareup.okhttp3</groupId>
5454
<artifactId>mockwebserver</artifactId>
55-
<version>4.12.0</version>
55+
<version>${mockwebserver.version}</version>
5656
<scope>test</scope>
5757
</dependency>
5858
</dependencies>
@@ -62,7 +62,7 @@
6262
<plugin>
6363
<groupId>com.google.cloud.tools</groupId>
6464
<artifactId>jib-maven-plugin</artifactId>
65-
<version>3.4.1</version>
65+
<version>${jib-maven-plugin.version}</version>
6666
<configuration>
6767
<from>
6868
<image>gcr.io/distroless/java21</image>

phoenixd-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<dependency>
2323
<groupId>commons-beanutils</groupId>
2424
<artifactId>commons-beanutils</artifactId>
25-
<version>1.9.4</version> <!-- Use the latest stable version -->
25+
<version>${commons.beanutils.version}</version>
2626
</dependency>
2727
<dependency>
2828
<groupId>${project.groupId}</groupId>

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626

2727
<fasterxml.jackson.version>2.18.3</fasterxml.jackson.version>
2828

29+
<!-- Apache Commons Versions -->
30+
<commons.configuration2.version>2.11.0</commons.configuration2.version>
31+
<commons.beanutils.version>1.9.4</commons.beanutils.version>
32+
<commons.lang3.version>3.14.0</commons.lang3.version>
33+
34+
<!-- Test Dependency Versions (module-specific) -->
35+
<mockwebserver.version>4.12.0</mockwebserver.version>
36+
2937
<!-- Test Dependency Versions -->
3038
<junit.version>5.9.1</junit.version>
3139
<assertj.version>3.23.1</assertj.version>
@@ -35,6 +43,7 @@
3543
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
3644
<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
3745
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
46+
<jib-maven-plugin.version>3.4.1</jib-maven-plugin.version>
3847
</properties>
3948

4049
<dependencyManagement>

0 commit comments

Comments
 (0)