Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ This file provides guidance for AI agents and LLMs working on the OpenFastTrace

All commands should be run from the repository root.

| Task | Command |
|:-------------------------|:-------------------------------------------------------------------------|
| **Verify (All tests)** | `mvn verify` |
| **Build (full)** | `mvn clean package -DskipTests` |
| **Run Unit Tests** | `mvn test` |
| **Run Single Test** | `mvn test -Dtest=ClassName` |
| **Run Integration Test** | `mvn failsafe:integration-test` |
| **Check Dependencies** | `mvn versions:display-dependency-updates` |
| Task | Command |
|:-------------------------|:------------------------------------------|
| **Verify (All tests)** | `mvn verify` |
| **Build (full)** | `mvn clean package -DskipTests` |
| **Run Unit Tests** | `mvn test` |
| **Run Single Test** | `mvn test -Dtest=ClassName` |
| **Run Integration Test** | `mvn failsafe:integration-test` |
| **Check Dependencies** | `mvn versions:display-dependency-updates` |

### Agent Role & Persona

Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.0] - 2026-06-14
## [3.0.0] - 2026-08-09

* [PR# 88](https://github.com/itsallcode/openfasttrace-maven-plugin/pull/88) Updated to [OpenFastTrace 4.5.0](https://github.com/itsallcode/openfasttrace/releases/tag/4.5.0)
* **Breaking change**: Add `openfasttrace.` prefix to all plugin properties to avoid conflicts and allow consistent command-line overrides ([#80](https://github.com/itsallcode/openfasttrace-maven-plugin/issues/80)). Existing configurations using the old names in `pom.xml` remain compatible.
* **Breaking change**: Set default value for `statuses` to `APPROVED` to align with OpenFastTrace core behavior. Items without an explicit status are considered `APPROVED` by default.
Comment thread
redcatbear marked this conversation as resolved.
* [PR# 88](https://github.com/itsallcode/openfasttrace-maven-plugin/pull/88) Updated to [OpenFastTrace 4.9.0](https://github.com/itsallcode/openfasttrace/releases/tag/4.9.0)
* We also now generate an SPDX SBOM
* Added compatibility shim for `RegexMatchingImporterFactory` to support older OpenFastTrace plugins with OpenFastTrace 4.8.0.

- Update OpenFastTrace to 4.9.0.
- Add support for filtering by item status using the `statuses` property.

## [2.3.1] - 2026-05-18

Expand Down
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Add the openfasttrace-maven-plugin to your `pom.xml`:
<plugin>
<groupId>org.itsallcode</groupId>
<artifactId>openfasttrace-maven-plugin</artifactId>
<version>2.3.1</version>
<version>3.0.0</version>
<executions>
<execution>
<id>trace-requirements</id>
Expand All @@ -54,6 +54,7 @@ Add the openfasttrace-maven-plugin to your `pom.xml`:
<detailsSectionDisplay>COLLAPSE</detailsSectionDisplay>
<artifactTypes>feat,req</artifactTypes>
<tags>prototype,mvp</tags>
<statuses>APPROVED,DRAFT</statuses>
</configuration>
</plugin>
```
Expand All @@ -72,7 +73,7 @@ You can use OpenFastTrace plugins to import and export requirements in additiona
<plugin>
<groupId>org.itsallcode</groupId>
<artifactId>openfasttrace-maven-plugin</artifactId>
<version>2.3.1</version>
<version>3.0.0</version>
<configuration>
<failBuild>true</failBuild>
</configuration>
Expand Down Expand Up @@ -197,7 +198,21 @@ This works similar to OFT's command line argument `--wanted-tags`.

You can specify the underscore `_` to import specification items without tags.

You can also specify the tags to import using CLI option `-Dtags=prototype,mvp`.
You can also specify the tags to import using CLI option `-Dopenfasttrace.tags=prototype,mvp`.

##### Select Statuses

The following example configuration limits import to statuses `APPROVED` and `DRAFT`.

```xml
<configuration>
<statuses>APPROVED,DRAFT</statuses>
</configuration>
```

This works similar to OFT's command line argument `--wanted-statuses`.

You can also specify the statuses to import using CLI option `-Dopenfasttrace.statuses=APPROVED,DRAFT`.

#### Report

Expand All @@ -215,7 +230,7 @@ The HTML report will have its details sections collapsed (i.e. hidden) by defaul

#### Fail Build

By default, the build will fail when there are errors found during tracing. To continue with the build when tracing fails, use configuration `<failBuild>false</failBuild>`.
By default, the build will fail when there are errors found during tracing. To continue with the build when tracing fails, use configuration `<failBuild>false</failBuild>` or command line option `-Dopenfasttrace.failBuild=false`.

#### Skipping Execution

Expand Down Expand Up @@ -301,7 +316,7 @@ mvn --update-snapshots versions:use-latest-releases versions:update-properties
#### Prepare the Release

1. Checkout the `main` branch.
2. Update version in `pom.xml`, `CHANGELOG.md` and `README.md`.
2. Update the version in `pom.xml`, `CHANGELOG.md` and `README.md`.
3. Commit and push changes.
4. Create a new pull request, have it reviewed and merged to `main`.

Expand All @@ -310,5 +325,5 @@ mvn --update-snapshots versions:use-latest-releases versions:update-properties
1. Start the release workflow
* Run command `gh workflow run release.yml --repo itsallcode/openfasttrace-maven-plugin --ref main`
* or go to [GitHub Actions](https://github.com/itsallcode/openfasttrace-maven-plugin/actions/workflows/release.yml) and start the `release.yml` workflow on branch `main`.
2. Update title and description of the newly created [GitHub release](https://github.com/itsallcode/openfasttrace-maven-plugin/releases).
2. Update the title and description of the newly created [GitHub release](https://github.com/itsallcode/openfasttrace-maven-plugin/releases).
3. After some time the release will be available at [Maven Central](https://repo1.maven.org/maven2/org/itsallcode/openfasttrace-maven-plugin/).
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ To report a vulnerability, please use the [GitHub Security Advisory reporting fe

## Software Bill of Materials (SBOM)

To enhance transparency and security, SPDX SBOMs (Software Bill of Materials) are included with the plugin releases starting from version 2.4.0. These files provide a comprehensive list of all components and dependencies used in the project.
To enhance transparency and security, SPDX SBOMs (Software Bill of Materials) are included with the plugin releases starting from version 3.0.0. These files provide a comprehensive list of all components and dependencies used in the project.
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.itsallcode</groupId>
<artifactId>openfasttrace-maven-plugin</artifactId>
<version>2.4.0</version>
<version>3.0.0</version>
<packaging>maven-plugin</packaging>

<name>OpenFastTrace Maven Plugin</name>
Expand All @@ -15,12 +15,12 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<oft.version>4.5.0</oft.version>
<oft.version>4.9.0</oft.version>
<!-- Maven version available in Debian 13 -->
<maven.core.version>3.9.9</maven.core.version>
<!-- Below is not a typo. It's the version of the Maven Plugin Plugin. -->
<!-- Below is not a typo. It's the version of the "Maven Plugin-Plugin". -->
<maven.plugin.plugin.version>3.15.2</maven.plugin.plugin.version>
<jacoco.version>0.8.14</jacoco.version>
<jacoco.version>0.8.15</jacoco.version>
<sonar.organization>itsallcode</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
Expand Down Expand Up @@ -134,7 +134,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>6.1.0</version>
<version>6.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -171,7 +171,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<version>0.11.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand Down Expand Up @@ -229,7 +229,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<executions>
<execution>
<?m2e ignore?>
Expand All @@ -249,7 +249,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand Down Expand Up @@ -330,7 +330,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- Upgrade to a version that supports reproducible builds -->
<version>3.5.0</version>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -416,7 +416,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.10.0</version>
<version>3.11.0</version>
<executions>
<execution>
<id>copy-jacoco</id>
Expand All @@ -436,7 +436,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
<version>3.5.6</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>
Expand All @@ -446,7 +446,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
<version>3.5.6</version>
<configuration>
<systemPropertyVariables>
<test.coverage>true</test.coverage>
Expand Down Expand Up @@ -555,7 +555,7 @@
<!-- Create an aggregated SPDX SBOM -->
<groupId>org.spdx</groupId>
<artifactId>spdx-maven-plugin</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<executions>
<execution>
<id>aggregate-spdx</id>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.itsallcode.openfasttrace.api.importer;

import java.util.Collection;

/**
* Compatibility shim for RegexMatchingImporterFactory which was renamed to
* AbstractRegexMatchingImporterFactory in OpenFastTrace 4.5.0.
* <p>
* Shim can be removed when the following issue is fixed:
* <a href="https://github.com/itsallcode/openfasttrace-asciidoc-plugin/issues/27">
* itsallcode/openffasttrace-asciidoc-plugin # 27
* </a>
* </p>
*
* @deprecated use {@link AbstractRegexMatchingImporterFactory} instead.
*/
@Deprecated(since = "4.5.0")
@SuppressWarnings("java:S118") // Shim class. Ignore name convention.
public abstract class RegexMatchingImporterFactory extends AbstractRegexMatchingImporterFactory
{
protected RegexMatchingImporterFactory(final String... extensions)
{
super(extensions);
}

protected RegexMatchingImporterFactory(final Collection<String> extensions)
{
super(extensions);
}
}
39 changes: 31 additions & 8 deletions src/main/java/org/itsallcode/openfasttrace/maven/TraceMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public class TraceMojo extends AbstractMojo
* <p>
* Default: <code>${project.build.directory}</code>
*/
@Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}", required = true)
@Parameter(property = "openfasttrace.outputDirectory", defaultValue = "${project.build.directory}", required = true)
private File outputDirectory;

/**
* Let build fail when tracing fails.
* <p>
* Default: {@code true}
*/
@Parameter(property = "failBuild", defaultValue = "true", required = true)
@Parameter(property = "openfasttrace.failBuild", defaultValue = "true", required = true)
private boolean failBuild;

/**
Expand All @@ -55,7 +55,7 @@ public class TraceMojo extends AbstractMojo
* <li>{@code plain}: Plain text format</li>
* </ul>
*/
@Parameter(property = "reportOutputFormat", defaultValue = "html", required = true)
@Parameter(property = "openfasttrace.reportOutputFormat", defaultValue = "html", required = true)
private String reportOutputFormat;

/**
Expand All @@ -70,15 +70,15 @@ public class TraceMojo extends AbstractMojo
* <li>{@code ALL}</li>
* </ul>
*/
@Parameter(property = "reportVerbosity", defaultValue = "FAILURE_DETAILS", required = true)
@Parameter(property = "openfasttrace.reportVerbosity", defaultValue = "FAILURE_DETAILS", required = true)
private ReportVerbosity reportVerbosity;

/**
* Show the origin in the tracing report.
* <p>
* Default: <code>false</code>
*/
@Parameter(property = "reportShowOrigin", defaultValue = "false", required = true)
@Parameter(property = "openfasttrace.reportShowOrigin", defaultValue = "false", required = true)
private boolean reportShowOrigin;

/**
Expand All @@ -89,7 +89,7 @@ public class TraceMojo extends AbstractMojo
* <li>{@code EXPAND}: show details section</li>
* </ul>
*/
@Parameter(property = "detailsSectionDisplay", defaultValue = "COLLAPSE", required = true)
@Parameter(property = "openfasttrace.detailsSectionDisplay", defaultValue = "COLLAPSE", required = true)
private DetailsSectionDisplay detailsSectionDisplay;

/**
Expand All @@ -101,7 +101,7 @@ public class TraceMojo extends AbstractMojo
* match the specified types will be imported.</li>
* </ul>
*/
@Parameter(property = "artifactTypes")
@Parameter(property = "openfasttrace.artifactTypes")
Set<String> artifactTypes;

/**
Expand All @@ -113,9 +113,24 @@ public class TraceMojo extends AbstractMojo
* <p>
* Default: Import all specification items.
*/
@Parameter(property = "tags")
@Parameter(property = "openfasttrace.tags")
Set<String> tags;

/**
* Determines which statuses should be imported.
* <p>
* Only artifacts with statuses that match the specified statuses will be
* imported. Artifacts without an explicit status are considered
* {@code APPROVED}.
* <p>
* Default: {@code APPROVED}
* <p>
* Valid values: {@code APPROVED}, {@code PROPOSED}, {@code DRAFT},
* {@code REJECTED}.
*/
@Parameter(property = "openfasttrace.statuses", defaultValue = "APPROVED")
Set<ItemStatus> statuses;

/**
* Skip running OFT.
* <p>
Expand Down Expand Up @@ -203,6 +218,8 @@ private static String formatFilterSettings(final FilterSettings settings)
", artifact types: " + settings.getArtifactTypes()
+ ", tag criteria set: " + settings.isTagCriteriaSet()
+ ", tags: " + settings.getTags() +
", status criteria set: " + settings.isStatusCriteriaSet() +
", statuses: " + settings.getWantedStatuses() +
", without tags: " + settings.withoutTags() + "]";
}

Expand Down Expand Up @@ -279,6 +296,7 @@ ImportSettings createImportSettings()
final FilterSettings filterSettings = FilterSettings.builder()
.artifactTypes(getFilteredArtifactTypes())
.tags(getFilteredTags())
.wantedStatuses(getFilteredStatuses())
.withoutTags(isFilterWithoutTags())
.build();
settings.filter(filterSettings);
Expand All @@ -290,6 +308,11 @@ private Set<String> getFilteredArtifactTypes()
return artifactTypes == null ? emptySet() : artifactTypes;
}

private Set<ItemStatus> getFilteredStatuses()
{
return statuses == null ? emptySet() : statuses;
}

private Set<String> getFilteredTags()
{
if (tags == null)
Expand Down
Loading
Loading