Skip to content

Commit 1820c4c

Browse files
feat!: rename Java packages from gov.nist.secauto.metaschema to dev.metaschema
BREAKING CHANGE: All Java packages have been renamed to align with the Maven groupId (dev.metaschema.java). Changes: - Renamed all Java packages from gov.nist.secauto.metaschema.* to dev.metaschema.* - Updated JPMS module names accordingly - Renamed SPI service files to match new package names - Updated all pom.xml path references - Moved java-templates to correct package paths - Regenerated bootstrap binding classes - Updated documentation, .claude files, and skills - Updated CI workflow to build maven-plugin first (avoids stale remote SNAPSHOT) - Fixed CI to treat link checker timeouts as warnings, not errors - Fixed Javadoc issues (incomplete tags, typos, redundant code) Migration required for downstream users: - Update all import statements - Update JPMS requires directives - Update SPI service file references - Update any reflection-based code using FQCNs Closes #616
1 parent 648bbd1 commit 1820c4c

File tree

1,687 files changed

+13048
-13067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,687 files changed

+13048
-13067
lines changed

.claude/rules/metaschema-authoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ When modifying Metapath functions or Metaschema features, update the correspondi
126126
| New exception type | Add to `.claude/skills/metaschema-java-library.md` exception hierarchy |
127127
| New key interface | Add to `.claude/skills/metaschema-java-library.md` |
128128

129-
**Function location:** `core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/`
129+
**Function location:** `core/src/main/java/dev/metaschema/core/metapath/function/library/`
130130

131131
## Related Skills
132132

.claude/skills/metapath-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ $config/@value
128128
**Note on function variants:** Many functions have multiple signatures with different argument counts. Optional parameters are shown with `?`. For the authoritative list of all function signatures, see the source code in:
129129

130130
```text
131-
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/
131+
core/src/main/java/dev/metaschema/core/metapath/function/library/
132132
```
133133

134134
### String Functions

.claude/skills/metaschema-java-library.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ metaschema-framework (parent)
3030

3131
| Package | Purpose |
3232
|---------|---------|
33-
| `gov.nist.secauto.metaschema.core.model` | Model interfaces (`IModule`, `IAssemblyDefinition`, etc.) |
34-
| `gov.nist.secauto.metaschema.core.metapath` | Metapath expression engine |
35-
| `gov.nist.secauto.metaschema.core.metapath.function` | Function library |
36-
| `gov.nist.secauto.metaschema.core.metapath.item` | Item types (nodes, atomics) |
37-
| `gov.nist.secauto.metaschema.core.model.constraint` | Constraint validation |
38-
| `gov.nist.secauto.metaschema.databind` | Data binding context |
39-
| `gov.nist.secauto.metaschema.databind.io` | Serialization/deserialization |
40-
| `gov.nist.secauto.metaschema.databind.model.annotations` | Binding annotations (`@BoundField`, `@BoundChoice`, etc.) |
41-
| `gov.nist.secauto.metaschema.databind.codegen` | Code generation from Metaschema modules |
33+
| `dev.metaschema.core.model` | Model interfaces (`IModule`, `IAssemblyDefinition`, etc.) |
34+
| `dev.metaschema.core.metapath` | Metapath expression engine |
35+
| `dev.metaschema.core.metapath.function` | Function library |
36+
| `dev.metaschema.core.metapath.item` | Item types (nodes, atomics) |
37+
| `dev.metaschema.core.model.constraint` | Constraint validation |
38+
| `dev.metaschema.databind` | Data binding context |
39+
| `dev.metaschema.databind.io` | Serialization/deserialization |
40+
| `dev.metaschema.databind.model.annotations` | Binding annotations (`@BoundField`, `@BoundChoice`, etc.) |
41+
| `dev.metaschema.databind.codegen` | Code generation from Metaschema modules |
4242

4343
## Annotation-Based Binding Model
4444

@@ -113,8 +113,8 @@ For annotation-based bindings, choices are optional by default (`minOccurs = 0`)
113113
### Using IBindingContext
114114

115115
```java
116-
import gov.nist.secauto.metaschema.databind.IBindingContext;
117-
import gov.nist.secauto.metaschema.databind.model.IBoundModule;
116+
import dev.metaschema.databind.IBindingContext;
117+
import dev.metaschema.databind.model.IBoundModule;
118118

119119
// Create binding context
120120
IBindingContext bindingContext = IBindingContext.newInstance();
@@ -131,7 +131,7 @@ IBindingContext context = IBindingContext.builder()
131131
### Loading Module Files
132132

133133
```java
134-
import gov.nist.secauto.metaschema.databind.model.metaschema.IBindingModuleLoader;
134+
import dev.metaschema.databind.model.metaschema.IBindingModuleLoader;
135135

136136
IBindingContext bindingContext = IBindingContext.newInstance();
137137
IBindingModuleLoader loader = bindingContext.newModuleLoader();
@@ -145,10 +145,10 @@ IBindingMetaschemaModule module = loader.load(moduleUri);
145145
### Compiling and Evaluating Expressions
146146

147147
```java
148-
import gov.nist.secauto.metaschema.core.metapath.MetapathExpression;
149-
import gov.nist.secauto.metaschema.core.metapath.StaticContext;
150-
import gov.nist.secauto.metaschema.core.metapath.DynamicContext;
151-
import gov.nist.secauto.metaschema.core.metapath.item.ISequence;
148+
import dev.metaschema.core.metapath.MetapathExpression;
149+
import dev.metaschema.core.metapath.StaticContext;
150+
import dev.metaschema.core.metapath.DynamicContext;
151+
import dev.metaschema.core.metapath.item.ISequence;
152152

153153
// Compile expression with static context
154154
StaticContext staticContext = StaticContext.builder()
@@ -270,7 +270,7 @@ Add dependencies to the `metaschema-maven-plugin` configuration to ensure classe
270270

271271
```xml
272272
<plugin>
273-
<groupId>gov.nist.secauto.metaschema</groupId>
273+
<groupId>dev.metaschema</groupId>
274274
<artifactId>metaschema-maven-plugin</artifactId>
275275
<dependencies>
276276
<!-- Add dependency containing custom interfaces/base classes -->
@@ -298,8 +298,8 @@ Add dependencies to the `metaschema-maven-plugin` configuration to ensure classe
298298
### Deserializing Content
299299

300300
```java
301-
import gov.nist.secauto.metaschema.databind.io.IBoundLoader;
302-
import gov.nist.secauto.metaschema.databind.io.Format;
301+
import dev.metaschema.databind.io.IBoundLoader;
302+
import dev.metaschema.databind.io.Format;
303303

304304
IBindingContext bindingContext = IBindingContext.newInstance();
305305
IBoundLoader loader = bindingContext.newBoundLoader();
@@ -316,7 +316,7 @@ MyRootClass object = deserializer.deserialize(inputStream);
316316
### Serializing Content
317317

318318
```java
319-
import gov.nist.secauto.metaschema.databind.io.ISerializer;
319+
import dev.metaschema.databind.io.ISerializer;
320320

321321
ISerializer<MyRootClass> serializer = bindingContext.newSerializer(
322322
Format.JSON, MyRootClass.class);
@@ -368,9 +368,9 @@ MyClass obj = deserializer.deserialize(inputStream);
368368
### Basic Validation
369369

370370
```java
371-
import gov.nist.secauto.metaschema.core.model.constraint.IConstraintValidator;
372-
import gov.nist.secauto.metaschema.core.model.constraint.DefaultConstraintValidator;
373-
import gov.nist.secauto.metaschema.core.model.constraint.FindingCollectingConstraintValidationHandler;
371+
import dev.metaschema.core.model.constraint.IConstraintValidator;
372+
import dev.metaschema.core.model.constraint.DefaultConstraintValidator;
373+
import dev.metaschema.core.model.constraint.FindingCollectingConstraintValidationHandler;
374374

375375
// Create handler to collect findings
376376
FindingCollectingConstraintValidationHandler handler =
@@ -395,8 +395,8 @@ if (!result.isPassing()) {
395395
### Loading External Constraints
396396

397397
```java
398-
import gov.nist.secauto.metaschema.core.model.constraint.IConstraintSet;
399-
import gov.nist.secauto.metaschema.databind.model.metaschema.BindingConstraintLoader;
398+
import dev.metaschema.core.model.constraint.IConstraintSet;
399+
import dev.metaschema.databind.model.metaschema.BindingConstraintLoader;
400400

401401
BindingConstraintLoader constraintLoader = new BindingConstraintLoader(bindingContext);
402402
IConstraintSet constraintSet = constraintLoader.load(constraintUri);
@@ -482,9 +482,9 @@ NegativeLengthArrayMetapathException
482482
### Function Structure
483483

484484
```java
485-
import gov.nist.secauto.metaschema.core.metapath.function.IFunction;
486-
import gov.nist.secauto.metaschema.core.metapath.function.IArgument;
487-
import gov.nist.secauto.metaschema.core.metapath.MetapathConstants;
485+
import dev.metaschema.core.metapath.function.IFunction;
486+
import dev.metaschema.core.metapath.function.IArgument;
487+
import dev.metaschema.core.metapath.MetapathConstants;
488488

489489
public final class FnMyFunction {
490490
private static final String NAME = "my-function";
@@ -590,7 +590,7 @@ IItem (base)
590590
### Working with Sequences
591591

592592
```java
593-
import gov.nist.secauto.metaschema.core.metapath.item.ISequence;
593+
import dev.metaschema.core.metapath.item.ISequence;
594594

595595
// Create sequences
596596
ISequence<IStringItem> seq = ISequence.of(item1, item2);

.github/workflows/build.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ jobs:
8383
# -------------------------
8484
# Maven Build
8585
# -------------------------
86+
- name: Build Maven Plugin First
87+
run: |
88+
# Build and install the maven-plugin and its dependencies first.
89+
# This ensures the local plugin is used instead of a potentially stale remote SNAPSHOT.
90+
mvn -B -e -pl metaschema-maven-plugin -am install -DskipTests
8691
- name: Build and Test Code
8792
run: |
8893
mvn -B -e -Prelease -Psnapshots -DaltDeploymentRepository=repo-snapshot::file://${GITHUB_WORKSPACE}/maven2/ -DaltSnapshotDeploymentRepository=repo-snapshot::file://${GITHUB_WORKSPACE}/maven2/ -DrepositoryId=repo-snapshot deploy
@@ -229,6 +234,11 @@ jobs:
229234
# -------------------------
230235
# Maven Build
231236
# -------------------------
237+
- name: Build Maven Plugin First
238+
run: |
239+
# Build and install the maven-plugin and its dependencies first.
240+
# This ensures the local plugin is used instead of a potentially stale remote SNAPSHOT.
241+
mvn -B -e -pl metaschema-maven-plugin -am install -DskipTests
232242
- name: Build and Test Website
233243
run: |
234244
mvn -B -e -PCI -Prelease install site site:stage -Dmaven.test.skip=true
@@ -263,12 +273,15 @@ jobs:
263273
if [ -f "html-link-report.md" ]; then
264274
# Extract summary stats from the report
265275
ERRORS=$(grep -c "^\[ERR\]" html-link-report.md 2>/dev/null || echo "0")
276+
TIMEOUTS=$(grep -c "^\[TIMEOUT\]" html-link-report.md 2>/dev/null || echo "0")
266277
if [ "$ERRORS" -gt 0 ]; then
267278
echo ":x: **Found $ERRORS broken link(s)**" >> $GITHUB_STEP_SUMMARY
268279
echo "" >> $GITHUB_STEP_SUMMARY
269280
echo '```' >> $GITHUB_STEP_SUMMARY
270281
grep "^\[ERR\]" html-link-report.md >> $GITHUB_STEP_SUMMARY
271282
echo '```' >> $GITHUB_STEP_SUMMARY
283+
elif [ "$TIMEOUTS" -gt 0 ]; then
284+
echo ":warning: **$TIMEOUTS link(s) timed out** (external sites may be slow)" >> $GITHUB_STEP_SUMMARY
272285
else
273286
echo ":white_check_mark: **All links valid**" >> $GITHUB_STEP_SUMMARY
274287
fi
@@ -284,7 +297,8 @@ jobs:
284297
path: html-link-report.md
285298
retention-days: 5
286299
- name: Create issue if bad links detected
287-
if: ${{ !cancelled() && steps.linkchecker.outputs.exit_code != 0 && env.INPUT_ISSUE_ON_ERROR == 'true' }}
300+
# Only create issues for actual broken links (exit code 2), not timeouts (exit code 1)
301+
if: ${{ !cancelled() && steps.linkchecker.outputs.exit_code == 2 && env.INPUT_ISSUE_ON_ERROR == 'true' }}
288302
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710
289303
with:
290304
title: Scheduled Check of Website Content Found Bad Hyperlinks
@@ -293,7 +307,9 @@ jobs:
293307
bug
294308
documentation
295309
- name: Fail on link check error
296-
if: ${{ !cancelled() && steps.linkchecker.outputs.exit_code != 0 && env.INPUT_FAIL_ON_ERROR == 'true' }}
310+
# Exit codes: 0=success, 1=runtime errors/timeouts, 2=broken links found
311+
# Only fail on actual broken links (exit code 2), not timeouts (exit code 1)
312+
if: ${{ !cancelled() && steps.linkchecker.outputs.exit_code == 2 && env.INPUT_FAIL_ON_ERROR == 'true' }}
297313
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
298314
with:
299315
script: |

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ metaschema-framework (parent)
7979
└── metaschema-cli - Command-line interface
8080
```
8181

82-
### Core Module Structure (gov.nist.secauto.metaschema.core)
82+
### Core Module Structure (dev.metaschema.core)
8383

8484
- **model/** - Metaschema model interfaces (`IModule`, `IAssemblyDefinition`, `IFieldDefinition`, `IFlagDefinition`)
8585
- **metapath/** - Metapath query language implementation
@@ -182,7 +182,7 @@ mvn -pl core test -Dtest=FnCountTest#testCount
182182

183183
- Java 11 target
184184
- Uses SpotBugs annotations (`@NonNull`, `@Nullable`) for null safety
185-
- Package structure follows `gov.nist.secauto.metaschema.*` convention
185+
- Package structure follows `dev.metaschema.*` convention
186186

187187
### Javadoc Requirements (BLOCKING)
188188

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ This project enforces code style through static analysis tools. Contributors sho
107107

108108
### Core Metaschema functions
109109

110-
The Metaschema [specification](https://pages.nist.gov/metaschema/specification/syntax/metapath/) and [this conformant library](https://github.com/metaschema-framework/metaschema-java) library implement the Metapath functions required by the specification. See the library's [registry class with an inventory listing of the functions](https://github.com/metaschema-framework/metaschema-java/blob/main/core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/DefaultFunctionLibrary.java) supported in the most current release.
110+
The Metaschema [specification](https://pages.nist.gov/metaschema/specification/syntax/metapath/) and [this conformant library](https://github.com/metaschema-framework/metaschema-java) library implement the Metapath functions required by the specification. See the library's [registry class with an inventory listing of the functions](https://github.com/metaschema-framework/metaschema-java/blob/main/core/src/main/java/dev/metaschema/core/metapath/function/library/DefaultFunctionLibrary.java) supported in the most current release.
111111

112112
# Licenses and attribution
113113

PRDs/20251206-build-cleanup/implementation-plan.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ This ensures behavioral equivalence is verified, not assumed.
3333

3434
#### Files Modified
3535

36-
1. `core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractContainerModelSupport.java`
36+
1. `core/src/main/java/dev/metaschema/core/model/AbstractContainerModelSupport.java`
3737
- **Removed** empty `finalize()` method - abstract class with non-throwing constructor doesn't need finalizer attack protection
38-
2. `databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java`
38+
2. `databind/src/main/java/dev/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java`
3939
- **Removed** empty `finalize()` method and unused `@SuppressFBWarnings` import - abstract class with non-throwing constructor doesn't need finalizer attack protection
4040

4141
#### Files NOT Modified (intentionally kept)
4242

43-
1. `databind/src/main/java/gov/nist/secauto/metaschema/databind/DefaultBindingContext.java`
43+
1. `databind/src/main/java/dev/metaschema/databind/DefaultBindingContext.java`
4444
- **Kept** empty `finalize()` method - this is a non-final concrete class with a constructor that can throw, so the finalize() is required to prevent SEI CERT OBJ-11 finalizer attacks. Updated Javadoc to clarify this.
4545

4646
#### Implementation Findings
@@ -75,7 +75,7 @@ The original code used empty `finalize()` methods to prevent finalizer attacks (
7575

7676
#### Files Modified
7777

78-
1. `metaschema-maven-plugin/src/main/java/gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java`
78+
1. `metaschema-maven-plugin/src/main/java/dev/metaschema/maven/plugin/AbstractMetaschemaMojo.java`
7979
- Replaced deprecated `@Component` annotation with JSR-330 `@Inject` annotation for `BuildContext` injection
8080
- Updated import from `org.apache.maven.plugins.annotations.Component` to `javax.inject.Inject`
8181

@@ -283,7 +283,7 @@ Type requirement methods and remaining usages.
283283
| **Target Branch** | develop |
284284

285285
#### Scope
286-
`core/src/main/java/gov/nist/secauto/metaschema/core/model/`
286+
`core/src/main/java/dev/metaschema/core/model/`
287287

288288
#### Key Files
289289
- Interface definitions for metaschema model elements
@@ -308,7 +308,7 @@ Type requirement methods and remaining usages.
308308
| **Target Branch** | develop |
309309

310310
#### Scope
311-
`core/src/main/java/gov/nist/secauto/metaschema/core/metapath/`
311+
`core/src/main/java/dev/metaschema/core/metapath/`
312312

313313
#### Key Files
314314
- Expression interfaces
@@ -359,7 +359,7 @@ Type requirement methods and remaining usages.
359359
| **Target Branch** | develop |
360360

361361
#### Scope
362-
`databind/src/main/java/gov/nist/secauto/metaschema/databind/`
362+
`databind/src/main/java/dev/metaschema/databind/`
363363

364364
#### Key Files
365365
- `binding/AssemblyModel.java` (72 warnings - highest priority)
@@ -384,7 +384,7 @@ Type requirement methods and remaining usages.
384384
| **Target Branch** | develop |
385385

386386
#### Scope
387-
`schemagen/src/main/java/gov/nist/secauto/metaschema/schemagen/`
387+
`schemagen/src/main/java/dev/metaschema/schemagen/`
388388

389389
#### Key Files
390390
- `ModuleIndex.java` (23 warnings - highest priority)

PRDs/20251206-build-cleanup/warning-analysis.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ This document provides a detailed analysis of warnings from the build output.
2828

2929
| File | Line | Context |
3030
|------|------|---------|
31-
| `core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractContainerModelSupport.java` | 89 | Resource cleanup |
32-
| `databind/src/main/java/gov/nist/secauto/metaschema/databind/DefaultBindingContext.java` | 268 | Binding context cleanup |
33-
| `databind/src/main/java/gov/nist/secauto/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java` | 223 | Generator cleanup |
31+
| `core/src/main/java/dev/metaschema/core/model/AbstractContainerModelSupport.java` | 89 | Resource cleanup |
32+
| `databind/src/main/java/dev/metaschema/databind/DefaultBindingContext.java` | 268 | Binding context cleanup |
33+
| `databind/src/main/java/dev/metaschema/databind/model/metaschema/impl/AbstractAbsoluteModelGenerator.java` | 223 | Generator cleanup |
3434

3535
**Recommended Fix**: Replace with `java.lang.ref.Cleaner` API or remove if unnecessary.
3636

@@ -43,7 +43,7 @@ This document provides a detailed analysis of warnings from the build output.
4343

4444
| File | Line | Field |
4545
|------|------|-------|
46-
| `metaschema-maven-plugin/src/main/java/gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java` | 102 | Multiple `@Component` fields |
46+
| `metaschema-maven-plugin/src/main/java/dev/metaschema/maven/plugin/AbstractMetaschemaMojo.java` | 102 | Multiple `@Component` fields |
4747

4848
**Recommended Fix**: Replace `@Component` with `@Inject` from JSR-330.
4949

PRDs/20251208-constraint-builder/PRD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Additional constraint types (for future extensibility):
5353
#### FR4: Integration with Test Support Infrastructure
5454
- Integrate with `IModuleMockFactory` interface
5555
- Follow the same patterns as `IModuleBuilder`
56-
- Place in `gov.nist.secauto.metaschema.core.testsupport.builder` package
56+
- Place in `dev.metaschema.core.testsupport.builder` package
5757

5858
### Test Migration Requirements
5959

@@ -113,7 +113,7 @@ IConstraintSet constraints = mocking.constraintSet()
113113

114114
### Package Structure
115115
```
116-
gov.nist.secauto.metaschema.core.testsupport.builder/
116+
dev.metaschema.core.testsupport.builder/
117117
├── IConstraintSetBuilder.java # Main builder interface
118118
├── ConstraintSetBuilder.java # Implementation
119119
├── IContextBuilder.java # Context builder interface

0 commit comments

Comments
 (0)