From 6bf7673a5f79a82902183c042a1384514ec1a828 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 15:08:16 +0000 Subject: [PATCH 1/8] Add GitHub Packages publishing setup - Add Central-ready metadata to pom.xml: url, licenses (MIT), scm, developers - Add publish workflow triggered on release creation - Workflow uses actions/setup-java@v4 with server-id: github for auto settings.xml https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ pom.xml | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ae0edb6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish to GitHub Packages + +on: + release: + types: [created] + +permissions: + contents: read + packages: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + server-id: github + + - name: Publish package + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pom.xml b/pom.xml index b24bdbf..752867e 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,29 @@ nsv-java Java implementation of NSV (Newline-Separated Values) format + https://github.com/nsv-format/nsv-java + + + + MIT License + https://opensource.org/licenses/MIT + repo + + + + + scm:git:git://github.com/nsv-format/nsv-java.git + scm:git:ssh://github.com:nsv-format/nsv-java.git + https://github.com/nsv-format/nsv-java + + + + + nsv-format + nsv-format + https://github.com/nsv-format + + 11 From 308bb6834e8cca2970af21ce4457656040cea8de Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 15:16:42 +0000 Subject: [PATCH 2/8] Add CI test workflow with Java 11/17/21 matrix https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1401237 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + java-version: ['11', '17', '21'] + name: Test (Java ${{ matrix.java-version }}) + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java-version }} + distribution: 'temurin' + + - name: Run tests + run: mvn test From 00040f149f05ee0b5d09a35793d696451c6e23aa Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 16:07:02 +0000 Subject: [PATCH 3/8] Add Java 25 (latest LTS) to CI test matrix https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1401237..68ca250 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java-version: ['11', '17', '21'] + java-version: ['11', '17', '21', '25'] name: Test (Java ${{ matrix.java-version }}) steps: - uses: actions/checkout@v4 From b7b1a2fffeaf377bacd1ef7d91cdd2917189580c Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 16:32:38 +0000 Subject: [PATCH 4/8] Run CI on all branches, not just master https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ca250..5a31a97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,7 @@ name: CI on: push: - branches: [master] pull_request: - branches: [master] jobs: test: From 5ece779f78b592366de9a95b18f5bab256d61a35 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 16:48:33 +0000 Subject: [PATCH 5/8] Fix Java 11 compat: Stream.toList() -> Collectors.toList() Stream.toList() was added in Java 16. Also set fail-fast: false so all matrix jobs run even if one fails. https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- .github/workflows/ci.yml | 1 + src/test/java/org/nsvformat/EscapeTest.java | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a31a97..eb8b7b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java-version: ['11', '17', '21', '25'] name: Test (Java ${{ matrix.java-version }}) diff --git a/src/test/java/org/nsvformat/EscapeTest.java b/src/test/java/org/nsvformat/EscapeTest.java index b499a48..4c265f8 100644 --- a/src/test/java/org/nsvformat/EscapeTest.java +++ b/src/test/java/org/nsvformat/EscapeTest.java @@ -2,6 +2,7 @@ import org.junit.jupiter.api.Test; import java.util.List; +import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.*; public class EscapeTest { @@ -82,13 +83,13 @@ public void testEscapeSeqseqUsingMap() { ); List> result = seqseq.stream() - .map(row -> row.stream().map(Nsv::escape).toList()) - .toList(); + .map(row -> row.stream().map(Nsv::escape).collect(Collectors.toList())) + .collect(Collectors.toList()); assertEquals(expected, result); List> recovered = result.stream() - .map(row -> row.stream().map(Nsv::unescape).toList()) - .toList(); + .map(row -> row.stream().map(Nsv::unescape).collect(Collectors.toList())) + .collect(Collectors.toList()); assertEquals(seqseq, recovered); } } From 088408da04f5c4f0acd281637d6566f39c925815 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 16:52:52 +0000 Subject: [PATCH 6/8] Add TODO comment on developers metadata for Central https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 752867e..efa7493 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,7 @@ https://github.com/nsv-format/nsv-java + nsv-format From ca77a0ac1a5d5b62fd63621e95f31c8b8caa2828 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 16:54:02 +0000 Subject: [PATCH 7/8] Update README with GitHub Packages installation instructions https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5082985..5436977 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,21 @@ Java implementation of the [NSV (Newline-Separated Values)](https://nsv-format.o ## Installation +Published to [GitHub Packages](https://github.com/nsv-format/nsv-java/packages). Requires [authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry). + ### Maven +Add the repository to your `pom.xml` or `~/.m2/settings.xml`: + +```xml + + github + https://maven.pkg.github.com/nsv-format/nsv-java + +``` + +Then add the dependency: + ```xml org.nsv-format @@ -17,7 +30,19 @@ Java implementation of the [NSV (Newline-Separated Values)](https://nsv-format.o ### Gradle ```groovy -implementation 'org.nsv-format:nsv-java:0.2.0' +repositories { + maven { + url = uri("https://maven.pkg.github.com/nsv-format/nsv-java") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } +} + +dependencies { + implementation 'org.nsv-format:nsv-java:0.2.0' +} ``` ## Usage From 5ce317f2af4807f97ec3123efeeee3271c4445aa Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Feb 2026 17:08:31 +0000 Subject: [PATCH 8/8] Note GitHub Packages auth requirement, mention planned Maven Central GitHub Packages requires a PAT with read:packages even for public packages. Be upfront about this and flag Maven Central as planned. https://claude.ai/code/session_01S1ZeyRwg7BTY7iEHo3bLPV --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5436977..96ab6ca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Java implementation of the [NSV (Newline-Separated Values)](https://nsv-format.o ## Installation -Published to [GitHub Packages](https://github.com/nsv-format/nsv-java/packages). Requires [authenticating to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry). +Maven Central publishing is planned. For now, the package is available via [GitHub Packages](https://github.com/nsv-format/nsv-java/packages), which requires a GitHub account and a personal access token with `read:packages` scope. ### Maven