From aeb72bd5de55cd7e5e907d4f4f76bcbf0a634278 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 12:34:02 +0200 Subject: [PATCH 01/10] move test runners Signed-off-by: Jan Kowalleck --- .../cyclonedx/schema/{ => 1.x}/BaseSchemaVerificationTest.java | 0 .../cyclonedx/schema/{ => 1.x}/JsonSchemaVerificationTest.java | 0 .../cyclonedx/schema/{ => 1.x}/XmlCatalogVerificationTest.java | 0 .../org/cyclonedx/schema/{ => 1.x}/XmlSchemaVerificationTest.java | 0 tools/src/test/js/{ => 1.x}/.gitignore | 0 tools/src/test/js/{ => 1.x}/README.md | 0 tools/src/test/js/{ => 1.x}/json-schema-functional-tests.js | 0 tools/src/test/js/{ => 1.x}/json-schema-lint-tests.js | 0 tools/src/test/js/{ => 1.x}/package.json | 0 tools/src/test/php/{ => 1.x}/.gitignore | 0 tools/src/test/php/{ => 1.x}/README.md | 0 tools/src/test/php/{ => 1.x}/composer.json | 0 tools/src/test/php/{ => 1.x}/json-schema-functional-tests.php | 0 tools/src/test/php/{ => 1.x}/json-schema-lint-tests.php | 0 tools/src/test/php/{ => 1.x}/xml-schema-functional-tests.php | 0 tools/src/test/proto/{ => 1.x}/buf_breaking-remote.yaml | 0 tools/src/test/proto/{ => 1.x}/buf_breaking-version.yaml | 0 tools/src/test/proto/{ => 1.x}/buf_lint.yaml | 0 tools/src/test/proto/{ => 1.x}/test.sh | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename tools/src/test/java/org/cyclonedx/schema/{ => 1.x}/BaseSchemaVerificationTest.java (100%) rename tools/src/test/java/org/cyclonedx/schema/{ => 1.x}/JsonSchemaVerificationTest.java (100%) rename tools/src/test/java/org/cyclonedx/schema/{ => 1.x}/XmlCatalogVerificationTest.java (100%) rename tools/src/test/java/org/cyclonedx/schema/{ => 1.x}/XmlSchemaVerificationTest.java (100%) rename tools/src/test/js/{ => 1.x}/.gitignore (100%) rename tools/src/test/js/{ => 1.x}/README.md (100%) rename tools/src/test/js/{ => 1.x}/json-schema-functional-tests.js (100%) rename tools/src/test/js/{ => 1.x}/json-schema-lint-tests.js (100%) rename tools/src/test/js/{ => 1.x}/package.json (100%) rename tools/src/test/php/{ => 1.x}/.gitignore (100%) rename tools/src/test/php/{ => 1.x}/README.md (100%) rename tools/src/test/php/{ => 1.x}/composer.json (100%) rename tools/src/test/php/{ => 1.x}/json-schema-functional-tests.php (100%) rename tools/src/test/php/{ => 1.x}/json-schema-lint-tests.php (100%) rename tools/src/test/php/{ => 1.x}/xml-schema-functional-tests.php (100%) rename tools/src/test/proto/{ => 1.x}/buf_breaking-remote.yaml (100%) rename tools/src/test/proto/{ => 1.x}/buf_breaking-version.yaml (100%) rename tools/src/test/proto/{ => 1.x}/buf_lint.yaml (100%) rename tools/src/test/proto/{ => 1.x}/test.sh (100%) diff --git a/tools/src/test/java/org/cyclonedx/schema/BaseSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/1.x/BaseSchemaVerificationTest.java similarity index 100% rename from tools/src/test/java/org/cyclonedx/schema/BaseSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/1.x/BaseSchemaVerificationTest.java diff --git a/tools/src/test/java/org/cyclonedx/schema/JsonSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/1.x/JsonSchemaVerificationTest.java similarity index 100% rename from tools/src/test/java/org/cyclonedx/schema/JsonSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/1.x/JsonSchemaVerificationTest.java diff --git a/tools/src/test/java/org/cyclonedx/schema/XmlCatalogVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/1.x/XmlCatalogVerificationTest.java similarity index 100% rename from tools/src/test/java/org/cyclonedx/schema/XmlCatalogVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/1.x/XmlCatalogVerificationTest.java diff --git a/tools/src/test/java/org/cyclonedx/schema/XmlSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/1.x/XmlSchemaVerificationTest.java similarity index 100% rename from tools/src/test/java/org/cyclonedx/schema/XmlSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/1.x/XmlSchemaVerificationTest.java diff --git a/tools/src/test/js/.gitignore b/tools/src/test/js/1.x/.gitignore similarity index 100% rename from tools/src/test/js/.gitignore rename to tools/src/test/js/1.x/.gitignore diff --git a/tools/src/test/js/README.md b/tools/src/test/js/1.x/README.md similarity index 100% rename from tools/src/test/js/README.md rename to tools/src/test/js/1.x/README.md diff --git a/tools/src/test/js/json-schema-functional-tests.js b/tools/src/test/js/1.x/json-schema-functional-tests.js similarity index 100% rename from tools/src/test/js/json-schema-functional-tests.js rename to tools/src/test/js/1.x/json-schema-functional-tests.js diff --git a/tools/src/test/js/json-schema-lint-tests.js b/tools/src/test/js/1.x/json-schema-lint-tests.js similarity index 100% rename from tools/src/test/js/json-schema-lint-tests.js rename to tools/src/test/js/1.x/json-schema-lint-tests.js diff --git a/tools/src/test/js/package.json b/tools/src/test/js/1.x/package.json similarity index 100% rename from tools/src/test/js/package.json rename to tools/src/test/js/1.x/package.json diff --git a/tools/src/test/php/.gitignore b/tools/src/test/php/1.x/.gitignore similarity index 100% rename from tools/src/test/php/.gitignore rename to tools/src/test/php/1.x/.gitignore diff --git a/tools/src/test/php/README.md b/tools/src/test/php/1.x/README.md similarity index 100% rename from tools/src/test/php/README.md rename to tools/src/test/php/1.x/README.md diff --git a/tools/src/test/php/composer.json b/tools/src/test/php/1.x/composer.json similarity index 100% rename from tools/src/test/php/composer.json rename to tools/src/test/php/1.x/composer.json diff --git a/tools/src/test/php/json-schema-functional-tests.php b/tools/src/test/php/1.x/json-schema-functional-tests.php similarity index 100% rename from tools/src/test/php/json-schema-functional-tests.php rename to tools/src/test/php/1.x/json-schema-functional-tests.php diff --git a/tools/src/test/php/json-schema-lint-tests.php b/tools/src/test/php/1.x/json-schema-lint-tests.php similarity index 100% rename from tools/src/test/php/json-schema-lint-tests.php rename to tools/src/test/php/1.x/json-schema-lint-tests.php diff --git a/tools/src/test/php/xml-schema-functional-tests.php b/tools/src/test/php/1.x/xml-schema-functional-tests.php similarity index 100% rename from tools/src/test/php/xml-schema-functional-tests.php rename to tools/src/test/php/1.x/xml-schema-functional-tests.php diff --git a/tools/src/test/proto/buf_breaking-remote.yaml b/tools/src/test/proto/1.x/buf_breaking-remote.yaml similarity index 100% rename from tools/src/test/proto/buf_breaking-remote.yaml rename to tools/src/test/proto/1.x/buf_breaking-remote.yaml diff --git a/tools/src/test/proto/buf_breaking-version.yaml b/tools/src/test/proto/1.x/buf_breaking-version.yaml similarity index 100% rename from tools/src/test/proto/buf_breaking-version.yaml rename to tools/src/test/proto/1.x/buf_breaking-version.yaml diff --git a/tools/src/test/proto/buf_lint.yaml b/tools/src/test/proto/1.x/buf_lint.yaml similarity index 100% rename from tools/src/test/proto/buf_lint.yaml rename to tools/src/test/proto/1.x/buf_lint.yaml diff --git a/tools/src/test/proto/test.sh b/tools/src/test/proto/1.x/test.sh similarity index 100% rename from tools/src/test/proto/test.sh rename to tools/src/test/proto/1.x/test.sh From 2e9d1ada6ac3b64ecf570c1a328d35a9c93823d1 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 12:37:21 +0200 Subject: [PATCH 02/10] proto Signed-off-by: Jan Kowalleck --- .github/workflows/{test_proto.yml => test_1.x_proto.yml} | 4 ++-- tools/src/test/proto/1.x/test.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{test_proto.yml => test_1.x_proto.yml} (89%) diff --git a/.github/workflows/test_proto.yml b/.github/workflows/test_1.x_proto.yml similarity index 89% rename from .github/workflows/test_proto.yml rename to .github/workflows/test_1.x_proto.yml index 7758e146e..07276b7a2 100644 --- a/.github/workflows/test_proto.yml +++ b/.github/workflows/test_1.x_proto.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT ProtoBuf +name: CT ProtoBuf CDX 1.x on: push: @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/proto + working-directory: tools/src/test/proto/1.x # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/tools/src/test/proto/1.x/test.sh b/tools/src/test/proto/1.x/test.sh index e0a78e352..9036fa002 100755 --- a/tools/src/test/proto/1.x/test.sh +++ b/tools/src/test/proto/1.x/test.sh @@ -2,7 +2,7 @@ set -ue THIS_PATH="$(realpath "$(dirname "$0")")" -ROOT_PATH="$(realpath "${THIS_PATH}/../../../..")" +ROOT_PATH="$(realpath "${THIS_PATH}/../../../../..")" # paths relative to $ROOT_PATH SCHEMA_DIR='schema' From 9bcce4f6dd88bfdfb5d4ac0bb36a79c9404a3073 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 13:37:16 +0200 Subject: [PATCH 03/10] proto: order new to old Signed-off-by: Jan Kowalleck --- tools/src/test/proto/1.x/test.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/src/test/proto/1.x/test.sh b/tools/src/test/proto/1.x/test.sh index 9036fa002..a9644ec75 100755 --- a/tools/src/test/proto/1.x/test.sh +++ b/tools/src/test/proto/1.x/test.sh @@ -118,13 +118,24 @@ function schema-functional () { --to /dev/null } - local SCHEMA_VERS - shopt -s globstar - for test_res in "$ROOT_PATH"/"$TEST_RES_DIR"/*/valid-*.textproto + local SCHEMA_VERS test_res + while IFS= read -r -d '' SCHEMA_VERS do - SCHEMA_VERS="$(basename "$(dirname "$test_res")")" - validate "$test_res" "$SCHEMA_VERS" - done + while IFS= read -r -d '' test_res + do + validate "$test_res" "$SCHEMA_VERS" + done < <( + find "$ROOT_PATH/$TEST_RES_DIR/$SCHEMA_VERS/" \ + -mindepth 1 -maxdepth 1 -type f \ + -name 'valid-*.textproto' -print0 \ + | LC_ALL=C sort -z + ) + done < <( + find "$ROOT_PATH/$TEST_RES_DIR" \ + -mindepth 1 -maxdepth 1 \ + -type d -name '1.*' -printf '%f\0' \ + | LC_ALL=C sort -zr + ) echo '>> OK.' >&2 } From 2ef5b8269f7e4b370fad0ecbba70865719778669 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 13:41:59 +0200 Subject: [PATCH 04/10] php Signed-off-by: Jan Kowalleck --- .github/workflows/{test_php.yml => test_1.x_php.yml} | 4 ++-- tools/src/test/php/1.x/json-schema-functional-tests.php | 4 ++-- tools/src/test/php/1.x/json-schema-lint-tests.php | 2 +- tools/src/test/php/1.x/xml-schema-functional-tests.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename .github/workflows/{test_php.yml => test_1.x_php.yml} (93%) diff --git a/.github/workflows/test_php.yml b/.github/workflows/test_1.x_php.yml similarity index 93% rename from .github/workflows/test_php.yml rename to .github/workflows/test_1.x_php.yml index 3d044081b..2b0f7a5e7 100644 --- a/.github/workflows/test_php.yml +++ b/.github/workflows/test_1.x_php.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT PHP +name: CT PHP CDX 1.x on: push: @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/php + working-directory: tools/src/test/php/1.x # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/tools/src/test/php/1.x/json-schema-functional-tests.php b/tools/src/test/php/1.x/json-schema-functional-tests.php index 0e4530a3a..815806439 100644 --- a/tools/src/test/php/1.x/json-schema-functional-tests.php +++ b/tools/src/test/php/1.x/json-schema-functional-tests.php @@ -12,9 +12,9 @@ // region config define('TESTSCHEMA_VERSION', getopt('v:')['v']); -define('SCHEMA_DIR', realpath(__DIR__ . '/../../../../schema')); +define('SCHEMA_DIR', realpath(__DIR__ . '/../../../../../schema')); define('SCHEMA_FILE', SCHEMA_DIR . '/bom-' . TESTSCHEMA_VERSION . '.schema.json'); -define('TESTDATA_DIR', realpath(__DIR__ . '/../resources/' . TESTSCHEMA_VERSION)); +define('TESTDATA_DIR', realpath(__DIR__ . '/../../resources/' . TESTSCHEMA_VERSION)); if (empty(TESTSCHEMA_VERSION)) { throw new Exception('missing TESTSCHEMA_VERSION. expected via opt "-v"'); diff --git a/tools/src/test/php/1.x/json-schema-lint-tests.php b/tools/src/test/php/1.x/json-schema-lint-tests.php index 12e8f1b49..b0d8671d4 100644 --- a/tools/src/test/php/1.x/json-schema-lint-tests.php +++ b/tools/src/test/php/1.x/json-schema-lint-tests.php @@ -3,7 +3,7 @@ // region config const SchemaFileGlob = '*.schema.json'; -const SchemaDir = __DIR__.'/../../../../schema/'; +const SchemaDir = __DIR__.'/../../../../../schema/'; // endregion config diff --git a/tools/src/test/php/1.x/xml-schema-functional-tests.php b/tools/src/test/php/1.x/xml-schema-functional-tests.php index e5d4da638..1b127f572 100644 --- a/tools/src/test/php/1.x/xml-schema-functional-tests.php +++ b/tools/src/test/php/1.x/xml-schema-functional-tests.php @@ -12,11 +12,11 @@ // region config define('TESTSCHEMA_VERSION', getopt('v:')['v']); -define('SCHEMA_DIR', realpath(__DIR__ . '/../../../../schema')); +define('SCHEMA_DIR', realpath(__DIR__ . '/../../../../../schema')); define('SCHEMA_FILE', SCHEMA_DIR . '/bom-' . TESTSCHEMA_VERSION . '.xsd'); define('SPDX_FILE', SCHEMA_DIR . '/spdx.xsd'); -define('TESTDATA_DIR', realpath(__DIR__ . '/../resources/' . TESTSCHEMA_VERSION)); +define('TESTDATA_DIR', realpath(__DIR__ . '/../../resources/' . TESTSCHEMA_VERSION)); if (empty(TESTSCHEMA_VERSION)) { throw new Exception('missing TESTSCHEMA_VERSION. expected via opt "-v"'); From 08cb53c55d1bec9ce14af1562528975baf13b233 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 13:45:12 +0200 Subject: [PATCH 05/10] js Signed-off-by: Jan Kowalleck --- .github/workflows/{test_js.yml => test_1.x_js.yml} | 4 ++-- tools/src/test/js/1.x/json-schema-functional-tests.js | 4 ++-- tools/src/test/js/1.x/json-schema-lint-tests.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{test_js.yml => test_1.x_js.yml} (92%) diff --git a/.github/workflows/test_js.yml b/.github/workflows/test_1.x_js.yml similarity index 92% rename from .github/workflows/test_js.yml rename to .github/workflows/test_1.x_js.yml index f2029ba40..e1a82df0b 100644 --- a/.github/workflows/test_js.yml +++ b/.github/workflows/test_1.x_js.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT JavaScript +name: CT JavaScript CDX 1.x on: push: @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/js + working-directory: tools/src/test/js/1.x # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/tools/src/test/js/1.x/json-schema-functional-tests.js b/tools/src/test/js/1.x/json-schema-functional-tests.js index 9dc1625c8..9ddbb1b7d 100644 --- a/tools/src/test/js/1.x/json-schema-functional-tests.js +++ b/tools/src/test/js/1.x/json-schema-functional-tests.js @@ -21,9 +21,9 @@ const _thisDir = dirname(fileURLToPath(import.meta.url)) // region config const testschemaVersion = (parseArgs({options: {v: {type: 'string', short: 'v'}}}).values.v ?? '').trim() -const schemaDir = join(_thisDir, '..', '..', '..', '..', 'schema') +const schemaDir = join(_thisDir, '..', '..', '..', '..', '..', 'schema') const schemaFile = join(schemaDir, `bom-${testschemaVersion}.schema.json`) -const testdataDir = join(_thisDir, '..', 'resources', testschemaVersion) +const testdataDir = join(_thisDir, '..', '..', 'resources', testschemaVersion) if (testschemaVersion.length === 0) { throw new Error('missing testschemaVersion. expected via argument') diff --git a/tools/src/test/js/1.x/json-schema-lint-tests.js b/tools/src/test/js/1.x/json-schema-lint-tests.js index b8411fcd9..b3849e220 100644 --- a/tools/src/test/js/1.x/json-schema-lint-tests.js +++ b/tools/src/test/js/1.x/json-schema-lint-tests.js @@ -13,7 +13,7 @@ import {glob} from 'glob' // region config const bomSchemasGlob = 'bom-*.schema.json' -const schemaDir = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', '..', 'schema') +const schemaDir = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', '..', '..', 'schema') // endregion config From b62fb4651bae56cc2b55162d02a43b110897f9b3 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 14:35:17 +0200 Subject: [PATCH 06/10] java Signed-off-by: Jan Kowalleck --- .../{test_java.yml => test_1.x_java.yml} | 4 ++-- tools/pom.xml | 24 ++++++++++++++++++- .../BaseSchemaVerificationTest.java | 2 +- .../JsonSchemaVerificationTest.java | 4 +++- .../XmlCatalogVerificationTest.java | 4 +++- .../XmlSchemaVerificationTest.java | 4 +++- 6 files changed, 35 insertions(+), 7 deletions(-) rename .github/workflows/{test_java.yml => test_1.x_java.yml} (92%) rename tools/src/test/java/org/cyclonedx/schema/{1.x => v1_x}/BaseSchemaVerificationTest.java (98%) rename tools/src/test/java/org/cyclonedx/schema/{1.x => v1_x}/JsonSchemaVerificationTest.java (98%) rename tools/src/test/java/org/cyclonedx/schema/{1.x => v1_x}/XmlCatalogVerificationTest.java (98%) rename tools/src/test/java/org/cyclonedx/schema/{1.x => v1_x}/XmlSchemaVerificationTest.java (98%) diff --git a/.github/workflows/test_java.yml b/.github/workflows/test_1.x_java.yml similarity index 92% rename from .github/workflows/test_java.yml rename to .github/workflows/test_1.x_java.yml index 226e1d797..43cd17f74 100644 --- a/.github/workflows/test_java.yml +++ b/.github/workflows/test_1.x_java.yml @@ -1,4 +1,4 @@ -name: CT Java +name: CT Java CDX 1.x on: push: @@ -32,4 +32,4 @@ jobs: distribution: 'zulu' java-package: jdk - name: test with Maven - run: mvn clean test + run: mvn clean test -Pv1x-tests diff --git a/tools/pom.xml b/tools/pom.xml index 9667d4090..0557211ad 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -154,6 +154,12 @@ 5.11.4 test + + org.junit.jupiter + junit-jupiter-engine + 5.11.4 + test + org.slf4j @@ -168,6 +174,13 @@ org.apache.maven.plugins maven-surefire-plugin 3.5.2 + + + + junit.jupiter.tags=${surefire.includeTags} + + + @@ -179,4 +192,13 @@ - + + + + v1x-tests + + v1x + + + + \ No newline at end of file diff --git a/tools/src/test/java/org/cyclonedx/schema/1.x/BaseSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java similarity index 98% rename from tools/src/test/java/org/cyclonedx/schema/1.x/BaseSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java index 27acc24a0..58f06d11f 100644 --- a/tools/src/test/java/org/cyclonedx/schema/1.x/BaseSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema; +package org.cyclonedx.schema.v1_x; import org.apache.commons.io.IOUtils; import java.io.InputStream; diff --git a/tools/src/test/java/org/cyclonedx/schema/1.x/JsonSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java similarity index 98% rename from tools/src/test/java/org/cyclonedx/schema/1.x/JsonSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java index 39a4a4ed6..81f7b9b0a 100644 --- a/tools/src/test/java/org/cyclonedx/schema/1.x/JsonSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema; +package org.cyclonedx.schema.v1_x; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -39,8 +39,10 @@ import java.util.List; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.DynamicTest; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.TestFactory; +@Tag("v1x") class JsonSchemaVerificationTest extends BaseSchemaVerificationTest { private static final ObjectMapper MAPPER = new JsonMapper(); diff --git a/tools/src/test/java/org/cyclonedx/schema/1.x/XmlCatalogVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java similarity index 98% rename from tools/src/test/java/org/cyclonedx/schema/1.x/XmlCatalogVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java index 30df90312..d4e9cc5b3 100644 --- a/tools/src/test/java/org/cyclonedx/schema/1.x/XmlCatalogVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java @@ -1,7 +1,8 @@ -package org.cyclonedx.schema; +package org.cyclonedx.schema.v1_x; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DynamicTest; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.TestFactory; import org.w3c.dom.Document; @@ -27,6 +28,7 @@ import static org.junit.jupiter.api.DynamicTest.dynamicTest; +@Tag("v1x") public class XmlCatalogVerificationTest { /** diff --git a/tools/src/test/java/org/cyclonedx/schema/1.x/XmlSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java similarity index 98% rename from tools/src/test/java/org/cyclonedx/schema/1.x/XmlSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java index 092aa3771..3c94f75ce 100644 --- a/tools/src/test/java/org/cyclonedx/schema/1.x/XmlSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema; +package org.cyclonedx.schema.v1_x; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -26,11 +26,13 @@ import javax.xml.validation.Validator; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.DynamicTest; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.TestFactory; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +@Tag("v1x") public class XmlSchemaVerificationTest extends BaseSchemaVerificationTest { private static final Schema VERSION_10; From 9f7825f5f8b54b99507e7c6d9a7dfc707421b563 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 14:46:56 +0200 Subject: [PATCH 07/10] rename-prefix Signed-off-by: Jan Kowalleck --- .github/workflows/test_1.x_java.yml | 2 +- .github/workflows/test_1.x_js.yml | 2 +- .github/workflows/test_1.x_php.yml | 2 +- .github/workflows/test_1.x_proto.yml | 2 +- tools/pom.xml | 4 ++-- .../schema/{v1_x => v1}/BaseSchemaVerificationTest.java | 2 +- .../schema/{v1_x => v1}/JsonSchemaVerificationTest.java | 4 ++-- .../schema/{v1_x => v1}/XmlCatalogVerificationTest.java | 4 ++-- .../schema/{v1_x => v1}/XmlSchemaVerificationTest.java | 4 ++-- tools/src/test/js/{1.x => schema-v1}/.gitignore | 0 tools/src/test/js/{1.x => schema-v1}/README.md | 0 .../js/{1.x => schema-v1}/json-schema-functional-tests.js | 0 .../src/test/js/{1.x => schema-v1}/json-schema-lint-tests.js | 0 tools/src/test/js/{1.x => schema-v1}/package.json | 0 tools/src/test/php/{1.x => schema-v1}/.gitignore | 0 tools/src/test/php/{1.x => schema-v1}/README.md | 0 tools/src/test/php/{1.x => schema-v1}/composer.json | 0 .../php/{1.x => schema-v1}/json-schema-functional-tests.php | 0 .../test/php/{1.x => schema-v1}/json-schema-lint-tests.php | 0 .../php/{1.x => schema-v1}/xml-schema-functional-tests.php | 0 .../test/proto/{1.x => schema-v1}/buf_breaking-remote.yaml | 0 .../test/proto/{1.x => schema-v1}/buf_breaking-version.yaml | 0 tools/src/test/proto/{1.x => schema-v1}/buf_lint.yaml | 0 tools/src/test/proto/{1.x => schema-v1}/test.sh | 0 24 files changed, 13 insertions(+), 13 deletions(-) rename tools/src/test/java/org/cyclonedx/schema/{v1_x => v1}/BaseSchemaVerificationTest.java (98%) rename tools/src/test/java/org/cyclonedx/schema/{v1_x => v1}/JsonSchemaVerificationTest.java (99%) rename tools/src/test/java/org/cyclonedx/schema/{v1_x => v1}/XmlCatalogVerificationTest.java (99%) rename tools/src/test/java/org/cyclonedx/schema/{v1_x => v1}/XmlSchemaVerificationTest.java (99%) rename tools/src/test/js/{1.x => schema-v1}/.gitignore (100%) rename tools/src/test/js/{1.x => schema-v1}/README.md (100%) rename tools/src/test/js/{1.x => schema-v1}/json-schema-functional-tests.js (100%) rename tools/src/test/js/{1.x => schema-v1}/json-schema-lint-tests.js (100%) rename tools/src/test/js/{1.x => schema-v1}/package.json (100%) rename tools/src/test/php/{1.x => schema-v1}/.gitignore (100%) rename tools/src/test/php/{1.x => schema-v1}/README.md (100%) rename tools/src/test/php/{1.x => schema-v1}/composer.json (100%) rename tools/src/test/php/{1.x => schema-v1}/json-schema-functional-tests.php (100%) rename tools/src/test/php/{1.x => schema-v1}/json-schema-lint-tests.php (100%) rename tools/src/test/php/{1.x => schema-v1}/xml-schema-functional-tests.php (100%) rename tools/src/test/proto/{1.x => schema-v1}/buf_breaking-remote.yaml (100%) rename tools/src/test/proto/{1.x => schema-v1}/buf_breaking-version.yaml (100%) rename tools/src/test/proto/{1.x => schema-v1}/buf_lint.yaml (100%) rename tools/src/test/proto/{1.x => schema-v1}/test.sh (100%) diff --git a/.github/workflows/test_1.x_java.yml b/.github/workflows/test_1.x_java.yml index 43cd17f74..3683aa781 100644 --- a/.github/workflows/test_1.x_java.yml +++ b/.github/workflows/test_1.x_java.yml @@ -32,4 +32,4 @@ jobs: distribution: 'zulu' java-package: jdk - name: test with Maven - run: mvn clean test -Pv1x-tests + run: mvn clean test -Pschema-v1-tests diff --git a/.github/workflows/test_1.x_js.yml b/.github/workflows/test_1.x_js.yml index e1a82df0b..ccdd65927 100644 --- a/.github/workflows/test_1.x_js.yml +++ b/.github/workflows/test_1.x_js.yml @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/js/1.x + working-directory: tools/src/test/js/schema-v1 # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/.github/workflows/test_1.x_php.yml b/.github/workflows/test_1.x_php.yml index 2b0f7a5e7..2bd965aac 100644 --- a/.github/workflows/test_1.x_php.yml +++ b/.github/workflows/test_1.x_php.yml @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/php/1.x + working-directory: tools/src/test/php/schema-v1 # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/.github/workflows/test_1.x_proto.yml b/.github/workflows/test_1.x_proto.yml index 07276b7a2..701c0e022 100644 --- a/.github/workflows/test_1.x_proto.yml +++ b/.github/workflows/test_1.x_proto.yml @@ -14,7 +14,7 @@ concurrency: defaults: run: - working-directory: tools/src/test/proto/1.x + working-directory: tools/src/test/proto/schema-v1 # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token permissions: {} diff --git a/tools/pom.xml b/tools/pom.xml index 0557211ad..27eb3a308 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -195,9 +195,9 @@ - v1x-tests + schema-v1-tests - v1x + schema-v1 diff --git a/tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1/BaseSchemaVerificationTest.java similarity index 98% rename from tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1/BaseSchemaVerificationTest.java index 58f06d11f..de3a6df9e 100644 --- a/tools/src/test/java/org/cyclonedx/schema/v1_x/BaseSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1/BaseSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema.v1_x; +package org.cyclonedx.schema.v1; import org.apache.commons.io.IOUtils; import java.io.InputStream; diff --git a/tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1/JsonSchemaVerificationTest.java similarity index 99% rename from tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1/JsonSchemaVerificationTest.java index 81f7b9b0a..00764dff2 100644 --- a/tools/src/test/java/org/cyclonedx/schema/v1_x/JsonSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1/JsonSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema.v1_x; +package org.cyclonedx.schema.v1; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.TestFactory; -@Tag("v1x") +@Tag("schema-v1") class JsonSchemaVerificationTest extends BaseSchemaVerificationTest { private static final ObjectMapper MAPPER = new JsonMapper(); diff --git a/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1/XmlCatalogVerificationTest.java similarity index 99% rename from tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1/XmlCatalogVerificationTest.java index d4e9cc5b3..cb243c16c 100644 --- a/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlCatalogVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1/XmlCatalogVerificationTest.java @@ -1,4 +1,4 @@ -package org.cyclonedx.schema.v1_x; +package org.cyclonedx.schema.v1; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DynamicTest; @@ -28,7 +28,7 @@ import static org.junit.jupiter.api.DynamicTest.dynamicTest; -@Tag("v1x") +@Tag("schema-v1") public class XmlCatalogVerificationTest { /** diff --git a/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java b/tools/src/test/java/org/cyclonedx/schema/v1/XmlSchemaVerificationTest.java similarity index 99% rename from tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java rename to tools/src/test/java/org/cyclonedx/schema/v1/XmlSchemaVerificationTest.java index 3c94f75ce..b2e5fa296 100644 --- a/tools/src/test/java/org/cyclonedx/schema/v1_x/XmlSchemaVerificationTest.java +++ b/tools/src/test/java/org/cyclonedx/schema/v1/XmlSchemaVerificationTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.cyclonedx.schema.v1_x; +package org.cyclonedx.schema.v1; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -32,7 +32,7 @@ import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; -@Tag("v1x") +@Tag("schema-v1") public class XmlSchemaVerificationTest extends BaseSchemaVerificationTest { private static final Schema VERSION_10; diff --git a/tools/src/test/js/1.x/.gitignore b/tools/src/test/js/schema-v1/.gitignore similarity index 100% rename from tools/src/test/js/1.x/.gitignore rename to tools/src/test/js/schema-v1/.gitignore diff --git a/tools/src/test/js/1.x/README.md b/tools/src/test/js/schema-v1/README.md similarity index 100% rename from tools/src/test/js/1.x/README.md rename to tools/src/test/js/schema-v1/README.md diff --git a/tools/src/test/js/1.x/json-schema-functional-tests.js b/tools/src/test/js/schema-v1/json-schema-functional-tests.js similarity index 100% rename from tools/src/test/js/1.x/json-schema-functional-tests.js rename to tools/src/test/js/schema-v1/json-schema-functional-tests.js diff --git a/tools/src/test/js/1.x/json-schema-lint-tests.js b/tools/src/test/js/schema-v1/json-schema-lint-tests.js similarity index 100% rename from tools/src/test/js/1.x/json-schema-lint-tests.js rename to tools/src/test/js/schema-v1/json-schema-lint-tests.js diff --git a/tools/src/test/js/1.x/package.json b/tools/src/test/js/schema-v1/package.json similarity index 100% rename from tools/src/test/js/1.x/package.json rename to tools/src/test/js/schema-v1/package.json diff --git a/tools/src/test/php/1.x/.gitignore b/tools/src/test/php/schema-v1/.gitignore similarity index 100% rename from tools/src/test/php/1.x/.gitignore rename to tools/src/test/php/schema-v1/.gitignore diff --git a/tools/src/test/php/1.x/README.md b/tools/src/test/php/schema-v1/README.md similarity index 100% rename from tools/src/test/php/1.x/README.md rename to tools/src/test/php/schema-v1/README.md diff --git a/tools/src/test/php/1.x/composer.json b/tools/src/test/php/schema-v1/composer.json similarity index 100% rename from tools/src/test/php/1.x/composer.json rename to tools/src/test/php/schema-v1/composer.json diff --git a/tools/src/test/php/1.x/json-schema-functional-tests.php b/tools/src/test/php/schema-v1/json-schema-functional-tests.php similarity index 100% rename from tools/src/test/php/1.x/json-schema-functional-tests.php rename to tools/src/test/php/schema-v1/json-schema-functional-tests.php diff --git a/tools/src/test/php/1.x/json-schema-lint-tests.php b/tools/src/test/php/schema-v1/json-schema-lint-tests.php similarity index 100% rename from tools/src/test/php/1.x/json-schema-lint-tests.php rename to tools/src/test/php/schema-v1/json-schema-lint-tests.php diff --git a/tools/src/test/php/1.x/xml-schema-functional-tests.php b/tools/src/test/php/schema-v1/xml-schema-functional-tests.php similarity index 100% rename from tools/src/test/php/1.x/xml-schema-functional-tests.php rename to tools/src/test/php/schema-v1/xml-schema-functional-tests.php diff --git a/tools/src/test/proto/1.x/buf_breaking-remote.yaml b/tools/src/test/proto/schema-v1/buf_breaking-remote.yaml similarity index 100% rename from tools/src/test/proto/1.x/buf_breaking-remote.yaml rename to tools/src/test/proto/schema-v1/buf_breaking-remote.yaml diff --git a/tools/src/test/proto/1.x/buf_breaking-version.yaml b/tools/src/test/proto/schema-v1/buf_breaking-version.yaml similarity index 100% rename from tools/src/test/proto/1.x/buf_breaking-version.yaml rename to tools/src/test/proto/schema-v1/buf_breaking-version.yaml diff --git a/tools/src/test/proto/1.x/buf_lint.yaml b/tools/src/test/proto/schema-v1/buf_lint.yaml similarity index 100% rename from tools/src/test/proto/1.x/buf_lint.yaml rename to tools/src/test/proto/schema-v1/buf_lint.yaml diff --git a/tools/src/test/proto/1.x/test.sh b/tools/src/test/proto/schema-v1/test.sh similarity index 100% rename from tools/src/test/proto/1.x/test.sh rename to tools/src/test/proto/schema-v1/test.sh From 023de6ddfc45be78da678b9e533f016456c64bda Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 14:50:10 +0200 Subject: [PATCH 08/10] prep-v2 Signed-off-by: Jan Kowalleck --- tools/src/test/java/org/cyclonedx/schema/v2/.gitkeep | 0 tools/src/test/js/schema-v2/.gitkeep | 0 tools/src/test/php/schema-v2/.gitkeep | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tools/src/test/java/org/cyclonedx/schema/v2/.gitkeep create mode 100644 tools/src/test/js/schema-v2/.gitkeep create mode 100644 tools/src/test/php/schema-v2/.gitkeep diff --git a/tools/src/test/java/org/cyclonedx/schema/v2/.gitkeep b/tools/src/test/java/org/cyclonedx/schema/v2/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/tools/src/test/js/schema-v2/.gitkeep b/tools/src/test/js/schema-v2/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/tools/src/test/php/schema-v2/.gitkeep b/tools/src/test/php/schema-v2/.gitkeep new file mode 100644 index 000000000..e69de29bb From e89f7c3722f1424784b471823eba572d3a55f838 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 14:52:20 +0200 Subject: [PATCH 09/10] tidy Signed-off-by: Jan Kowalleck --- tools/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pom.xml b/tools/pom.xml index 27eb3a308..92a85e825 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -201,4 +201,4 @@ - \ No newline at end of file + From 2064add12306dd79fe4e669a37ed9c34b1d9aaa7 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Mon, 3 Aug 2026 14:54:33 +0200 Subject: [PATCH 10/10] workflows Signed-off-by: Jan Kowalleck --- .github/workflows/test_1.x_java.yml | 2 +- .github/workflows/test_1.x_js.yml | 2 +- .github/workflows/test_1.x_php.yml | 2 +- .github/workflows/test_1.x_proto.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_1.x_java.yml b/.github/workflows/test_1.x_java.yml index 3683aa781..75eb22f68 100644 --- a/.github/workflows/test_1.x_java.yml +++ b/.github/workflows/test_1.x_java.yml @@ -1,4 +1,4 @@ -name: CT Java CDX 1.x +name: CT CDX-1.x Java on: push: diff --git a/.github/workflows/test_1.x_js.yml b/.github/workflows/test_1.x_js.yml index ccdd65927..86f6e9a28 100644 --- a/.github/workflows/test_1.x_js.yml +++ b/.github/workflows/test_1.x_js.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT JavaScript CDX 1.x +name: CT CDX-1.x JavaScript on: push: diff --git a/.github/workflows/test_1.x_php.yml b/.github/workflows/test_1.x_php.yml index 2bd965aac..c06be15ca 100644 --- a/.github/workflows/test_1.x_php.yml +++ b/.github/workflows/test_1.x_php.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT PHP CDX 1.x +name: CT CDX-1.x PHP on: push: diff --git a/.github/workflows/test_1.x_proto.yml b/.github/workflows/test_1.x_proto.yml index 701c0e022..ee4c33727 100644 --- a/.github/workflows/test_1.x_proto.yml +++ b/.github/workflows/test_1.x_proto.yml @@ -1,6 +1,6 @@ # docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions -name: CT ProtoBuf CDX 1.x +name: CT CDX-1.x ProtoBuf on: push: