Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release #72

Merged
merged 2 commits into from
Nov 13, 2024
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the openfasttrace-maven-plugin to your `pom.xml`:
<plugin>
<groupId>org.itsallcode</groupId>
<artifactId>openfasttrace-maven-plugin</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
<executions>
<execution>
<id>trace-requirements</id>
Expand Down Expand Up @@ -69,7 +69,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.2.0</version>
<version>2.3.0</version>
<configuration>
<failBuild>true</failBuild>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion 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.2.0</version>
<version>2.3.0</version>
<packaging>maven-plugin</packaging>

<name>OpenFastTrace Maven Plugin</name>
Expand Down
23 changes: 21 additions & 2 deletions src/main/java/org/itsallcode/openfasttrace/maven/TraceMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ public void execute() throws MojoFailureException
}
final Oft oft = new OftRunner();
getLog().info("Importing spec items...");
final List<SpecificationItem> items = oft.importItems(createImportSettings());
getLog().info("Imported " + items.size() + " items.");
final ImportSettings importSettings = createImportSettings();
final List<SpecificationItem> items = oft.importItems(importSettings);
getLog().info("Imported " + items.size() + " items using settings " + formatImportSettings(importSettings));
final List<LinkedSpecificationItem> linkedItems = oft.link(items);
final Trace trace = oft.trace(linkedItems);
writeTracingReport(oft, trace);
Expand All @@ -187,6 +188,24 @@ public void execute() throws MojoFailureException
}
}

private static String formatImportSettings(final ImportSettings settings)
{
return "[inputs: " + settings.getInputs()
+ ", path config: " + settings.getPathConfigs()
+ ", filters: " + formatFilterSettings(settings.getFilters())
+ "]";
}

private static String formatFilterSettings(final FilterSettings settings)
{
return "[any criteria set: " + settings.isAnyCriteriaSet() +
", artifact type criteria set: " + settings.isArtifactTypeCriteriaSet() +
", artifact types: " + settings.getArtifactTypes()
+ ", tag criteria set: " + settings.isTagCriteriaSet()
+ ", tags: " + settings.getTags() +
", without tags: " + settings.withoutTags() + "]";
}

private static void logTracingReport(final Oft oft, final Trace trace)
{
final ReportSettings reportSettings = ReportSettings.builder()
Expand Down