Skip to content

Commit eb84bdc

Browse files
committed
refactor: update groupId and package to io.github.reqstool
- Change groupId from se.lfv.reqstool to io.github.reqstool in pom.xml - Migrate package from se.lfv.reqstool.plugins.maven to io.github.reqstool.plugins.maven - Reorganize directory structure to match new package naming - Add comprehensive javadoc comments to all public classes and constants - Silences all javadoc warnings during build
1 parent 14b50a0 commit eb84bdc

4 files changed

Lines changed: 38 additions & 3 deletions

File tree

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(mvn clean:*)"
5+
]
6+
}
7+
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
66
<modelVersion>4.0.0</modelVersion>
77

8-
<groupId>se.lfv.reqstool</groupId>
8+
<groupId>io.github.reqstool</groupId>
99
<artifactId>reqstool-maven-plugin</artifactId>
1010
<packaging>maven-plugin</packaging>
1111
<version>1.0.3</version>

src/main/java/se/lfv/reqstool/plugins/maven/RequirementsToolMojo.java renamed to src/main/java/io/github/reqstool/plugins/maven/RequirementsToolMojo.java

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright © LFV
2-
package se.lfv.reqstool.plugins.maven;
2+
package io.github.reqstool.plugins.maven;
33

44
import java.io.File;
55
import java.io.FileOutputStream;
@@ -47,39 +47,57 @@
4747
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
4848
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
4949

50+
/**
51+
* Maven Mojo for assembling and attaching reqstool artifacts. This plugin packages
52+
* requirements, test results, and annotations into a ZIP artifact during the verify phase
53+
* of the Maven build lifecycle.
54+
*/
5055
@Mojo(name = "assemble-and-attach-zip-artifact", defaultPhase = LifecyclePhase.VERIFY)
5156
public class RequirementsToolMojo extends AbstractMojo {
5257

5358
// Constants
5459

5560
private static final String[] OUTPUT_ARTIFACT_TEST_RESULTS_PATTERN = { "test_results/**/*.xml" };
5661

62+
/** Input file name for manual verification results. */
5763
public static final String INPUT_FILE_MANUAL_VERIFICATION_RESULTS_YML = "manual_verification_results.yml";
5864

65+
/** Input file name for requirements. */
5966
public static final String INPUT_FILE_REQUIREMENTS_YML = "requirements.yml";
6067

68+
/** Input file name for software verification cases. */
6169
public static final String INPUT_FILE_SOFTWARE_VERIFICATION_CASES_YML = "software_verification_cases.yml";
6270

71+
/** Input dataset directory path. */
6372
public static final String INPUT_PATH_DATASET = "reqstool";
6473

74+
/** Output file name for annotations. */
6575
public static final String OUTPUT_FILE_ANNOTATIONS_YML_FILE = "annotations.yml";
6676

6777
private static final String OUTPUT_ARTIFACT_CLASSIFIER = "reqstool";
6878

79+
/** Output artifact file name for reqstool configuration. */
6980
public static final String OUTPUT_ARTIFACT_FILE_REQSTOOL_CONFIG_YML = "reqstool_config.yml";
7081

82+
/** Output artifact directory name for test results. */
7183
public static final String OUTPUT_ARTIFACT_DIR_TEST_RESULTS = "test_results";
7284

85+
/** XML element name for implementations. */
7386
public static final String XML_IMPLEMENTATIONS = "implementations";
7487

88+
/** XML element name for requirement annotations. */
7589
public static final String XML_REQUIREMENT_ANNOTATIONS = "requirement_annotations";
7690

91+
/** XML element name for tests. */
7792
public static final String XML_TESTS = "tests";
7893

94+
/** YAML language server schema annotation. */
7995
protected static final String YAML_LANG_SERVER_SCHEMA_ANNOTATIONS = "# yaml-language-server: $schema=https://raw.githubusercontent.com/Luftfartsverket/reqstool-client/main/src/reqstool/resources/schemas/v1/annotations.schema.json";
8096

97+
/** YAML language server schema for configuration. */
8198
protected static final String YAML_LANG_SERVER_SCHEMA_CONFIG = "# yaml-language-server: $schema=https://raw.githubusercontent.com/Luftfartsverket/reqstool-client/main/src/reqstool/resources/schemas/v1/reqstool_config.schema.json";
8299

100+
/** ObjectMapper for YAML serialization and deserialization. */
83101
protected static final ObjectMapper yamlMapper;
84102

85103
static {
@@ -122,6 +140,16 @@ public class RequirementsToolMojo extends AbstractMojo {
122140
@Parameter(property = "reqstool.skipAttachZipArtifact", defaultValue = "false")
123141
private boolean skipAttachZipArtifact;
124142

143+
/** Default constructor. */
144+
public RequirementsToolMojo() {
145+
}
146+
147+
/**
148+
* Executes the Mojo goal to assemble and attach the reqstool ZIP artifact. Combines
149+
* requirement and test annotations, assembles them into a ZIP file with requirements
150+
* and test results, and attaches the artifact to the Maven project.
151+
* @throws MojoExecutionException if an error occurs during execution
152+
*/
125153
public void execute() throws MojoExecutionException {
126154
if (skip) {
127155
getLog().info("Skipping execution of reqstool plugin");

src/test/java/se/lfv/reqstool/plugins/maven/RequirementsToolMojoTests.java renamed to src/test/java/io/github/reqstool/plugins/maven/RequirementsToolMojoTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright © LFV
2-
package se.lfv.reqstool.plugins.maven;
2+
package io.github.reqstool.plugins.maven;
33

44
import static org.junit.jupiter.api.Assertions.assertEquals;
55
import static org.junit.jupiter.api.Assertions.assertTrue;

0 commit comments

Comments
 (0)