Skip to content

Add fecsmith --version - #1

Merged
Gulliby merged 1 commit into
mainfrom
feature/version-flag
Oct 19, 2026
Merged

Gulliby merged 1 commit into
mainfrom
feature/version-flag

Conversation

@Gulliby

@Gulliby Gulliby commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Requested by gulliby

Before. fecsmith had no way to print its version.

After. fecsmith --version prints the program name and the version of the Maven project and exits with 0. The number comes from the build (a filtered resource), not from the source, so it cannot drift from pom.xml. --version combined with anything else is not special (--version crc is fecsmith: unknown command "--version").

$ fecsmith --version
fecsmith 0.1.0

How. pom.xml gets a <resources> element with filtering enabled for src/main/resources (no new plugin, version unchanged). New src/main/resources/fecsmith.properties holds version=${project.version}. Cli.java handles the sole --version argument. CliTest.java gains two tests (286 to 288). README.md gets one paragraph in the Usage section.

--version prints the program name and the Maven project version, read from a resource filtered at build time so it stays in step with pom.xml.
@Gulliby Gulliby self-assigned this Oct 19, 2026
@Gulliby
Gulliby merged commit 10682f8 into main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant