Homework-quickstart is an Apache Maven project archetype pre-configured for
- Your current Java runtime by default — Java 17 or newer is required. The target release is fixed when the project is generated; to pin a specific release instead, see Choosing the Java version.
- JUnit 6
- AssertJ
- Approvals
- JaCoCo
- Checkstyle with a pre-selected set of rules
- export-maven-plugin — run
mvn export:exportto bundle the project into atarget/export.zipfor submission
First, install Maven — Maven 3.9 or newer is required.
Then run the command for your shell:
Bash (Linux / macOS):
mvn archetype:generate \
-DarchetypeGroupId=org.atp-fivt \
-DarchetypeArtifactId=homework-quickstart \
-DarchetypeVersion=3.0Windows (cmd):
mvn archetype:generate ^
-DarchetypeGroupId=org.atp-fivt ^
-DarchetypeArtifactId=homework-quickstart ^
-DarchetypeVersion=3.0archetype:generate runs interactively and asks for a few properties, then shows them
for confirmation (press Enter to accept):
| Property | What it is |
|---|---|
groupId |
Maven group identifier for your project, e.g. org.example or your study-group id. |
artifactId |
Project name — becomes the generated folder name and the Maven artifact id. |
version |
Initial project version; the default 1.0-SNAPSHOT is fine. |
package |
Root Java package for your source files. Defaults to the groupId. |
javaversion |
Target Java release. Default auto = your current Java runtime (see Choosing the Java version). |
By default the generated project targets the Java runtime you generate it with, and
that release is baked into the project's pom.xml. To target a specific release
instead, set the javaversion property — either answer the interactive prompt, or
pass it on the command line:
-Djavaversion=17
The value must be between 17 and your current Java runtime version. Anything
outside that range aborts generation with an error.