Skip to content

Latest commit

 

History

59 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eclipse-java-maven-template

A Java + Maven course-project template: JUnit 5 tests, JaCoCo + ReportGenerator coverage, Doxygen + Javadoc API docs, a MkDocs Material site with every report for Windows and Linux, the native Maven site next to it, and numbered -windows.bat / -linux.sh scripts that take you from a fresh clone to a built, tested, documented, releasable project. Use it as the starting point for a CEN207/CEN206/CEN429-style term project.

CI GitHub release License: AGPL-3.0 Windows badge Ubuntu badge macOS badge

Live site: https://ucoruh.github.io/eclipse-java-maven-template/ - Latest release: https://github.com/ucoruh/eclipse-java-maven-template/releases/latest

Coverage (regenerated by 7-build-all-*): All Branch Coverage Line Coverage Method Coverage - Documentation coverage: Doc coverage

1. Start your own PRIVATE project from this template

Use Use this template, not Fork - a fork of a public repository cannot be made private, a repository created from a template can.

  1. Open https://github.com/ucoruh/eclipse-java-maven-template.
  2. Click the green Use this template button (top right, next to Code) -> Create a new repository.
  3. Owner: your account. Repository name: e.g. cen207-yourname-project. Select Private. Create repository.
  4. In your new repository: Settings -> Collaborators -> Add people -> add the instructor ucoruh and your team mates (they must accept the invitation).
  5. Clone it, install the tools (install-en.md), edit project.env, build.

What a private repository on GitHub Free cannot do (GitHub Pages) you show locally: 7-build-all-* builds the whole site with every report, 9-open-site-* serves it on http://localhost:8000/, and the release/ folder holds every output. The demo checklist: Showing your project without GitHub Pages / TR.

2. Quick start

project.env names the project (PROJECT_NAME, VERSION, GITHUB_REPO) - the one place a student renames it.

Windows (cmd/PowerShell):

git clone https://github.com/<your-account>/<your-repo>.git
cd <your-repo>
4-install-tools-windows.bat
1-configure-git-hooks-windows.bat
6-build-and-test-windows.bat
8-run-app-windows.bat 6 "*" 7
7-build-all-windows.bat
9-open-site-windows.bat

Linux / WSL (bash; WSL is Linux):

git clone https://github.com/<your-account>/<your-repo>.git
cd <your-repo>
./4-install-tools-linux.sh
./1-configure-git-hooks-linux.sh
./6-build-and-test-linux.sh
./8-run-app-linux.sh 6 '*' 7
./7-build-all-linux.sh
./9-open-site-linux.sh

Walkthrough: use-template-en.md / use-template-tr.md.

3. The numbered scripts

Same number = same job in every course template; the platform is the suffix. 1-5 are one-time setup, 6-11 are the ones you use every day. Helper scripts live in scripts/.

# Job Windows Linux / WSL
1 Install pre-commit (Astyle + sanity checks) and pre-push into .git/hooks/ 1-configure-git-hooks-windows.bat 1-configure-git-hooks-linux.sh
2 One-time bootstrap of .gitignore (not for routine use) 2-create-gitignore-windows.bat 2-create-gitignore-linux.sh
3 Chocolatey + Scoop 3-install-package-manager-windows.bat -
4 Every tool the scripts use (JDK 17, Maven, Doxygen, lcov, ReportGenerator, Python packages, gh) 4-install-tools-windows.bat 4-install-tools-linux.sh
5 Format with Astyle 5-format-code-windows.bat 5-format-code-linux.sh
6 Fast: build + unit tests + app 6-build-and-test-windows.bat 6-build-and-test-linux.sh
7 Everything: + coverage (both families), doc coverage (both), API docs, Maven site, MkDocs site, release/ 7-build-all-windows.bat 7-build-all-linux.sh
8 Run the app 8-run-app-windows.bat 8-run-app-linux.sh
9 Serve the site on http://localhost:8000/ 9-open-site-windows.bat 9-open-site-linux.sh
10 Publish a GitHub Release (--dry-run first) 10-release-windows.bat 10-release-linux.sh
11 Delete everything generated 11-clean-windows.bat 11-clean-linux.sh

0-init-submodules exists only in templates that have submodules; this one has none.

Old name -> new name

Old New
1-configure-git-hooks.bat/.sh 1-configure-git-hooks-windows.bat / 1-configure-git-hooks-linux.sh
2-create-git-ignore.bat/.sh 2-create-gitignore-windows.bat / 2-create-gitignore-linux.sh
3-install-package-manager.bat 3-install-package-manager-windows.bat
3-install-package-manager.sh merged into 4-install-tools-linux.sh
4-install-required-apps.bat/.sh 4-install-tools-windows.bat / 4-install-tools-linux.sh
5-format-code.bat/.sh 5-format-code-windows.bat / 5-format-code-linux.sh
7-build-app.bat/.sh 7-build-all-windows.bat / 7-build-all-linux.sh (fast part: 6-build-and-test-*)
8-run-app.bat/.sh 8-run-app-windows.bat / 8-run-app-linux.sh
9-run-webpage.bat/.sh 9-open-site-windows.bat / 9-open-site-linux.sh
10-release.bat/.sh 10-release-windows.bat / 10-release-linux.sh
delete_desktop_ini.bat/.sh scripts/delete-desktop-ini-windows.bat / scripts/delete-desktop-ini-linux.sh
init-submodules.bat, update-submodules.bat docs/archive/legacy-scripts/
VERSION project.env

4. Where things land (all gitignored)

build/<platform>-<config>/ (jar) - publish/<platform>-<arch>/ (runnable app) - reports/<platform>/<kind>-<tool>/ (every report, Windows and Linux separately) - site/ (MkDocs site) - site-native/ (Maven site) - release/ (every release asset). Details and the release asset naming: Naming standard.

Report Native tool Other family
Unit tests tests-junit2html (+ Surefire page in the Maven site) -
Code coverage coverage-jacoco coverage-reportgenerator (HTML + badges + history)
Documentation coverage doccoverage-lcov (coverxygen + genhtml) doccoverage-reportgenerator
API docs api-javadoc api-doxygen
Code quality Maven site: Checkstyle, PMD, CPD, SpotBugs, JXR -

Site rule: standalone HTML reports are shown in a frame inside the MkDocs site; Maven-site pages carry their own navigation, so they are never framed - they open as their own site in a new tab (published under native/).

5. Release assets and CI

release/ holds exactly what the GitHub Release gets, e.g. for calculator 1.1.0: calculator-1.1.0-windows-x64-app.zip, calculator-1.1.0-linux-x64-app.tar.gz, calculator-1.1.0-<platform>-report-tests.zip, ...-report-coverage-reportgenerator.zip, ...-report-coverage-jacoco.zip, ...-report-doccoverage-reportgenerator.zip, ...-report-doccoverage-lcov.zip, ...-api-doxygen.zip, ...-api-javadoc.zip, calculator-1.1.0-site-maven.zip, calculator-1.1.0-site.zip, calculator-1.1.0-source.zip, ASSETS.md, SHA256SUMS.txt (and macos-arm64-app.tar.gz from CI).

.github/workflows/ci.yml: Windows and Linux jobs build, test and produce reports; a macOS job builds the app; a merge job builds the site (both platforms), checks links, deploys Pages on main (skipped on a private repo unless PAGES_ON_PRIVATE=true) and, on a v* tag, publishes every asset. See releases-en.md / releases-tr.md.

6. Guides (English / Türkçe)

Written for someone who has never used this toolchain; also on the site (one menu, English and Türkçe with the language switcher).

Topic English Türkçe
Install everything (Windows + Linux/WSL) install-en.md install-tr.md
Use this template (private repo, first build) use-template-en.md use-template-tr.md
From a project topic to your own project from-topic-en.md from-topic-tr.md
Daily workflow, reports, framing a report workflow-en.md workflow-tr.md
Showing your project without GitHub Pages showcase-en.md showcase-tr.md
Releases and private repositories releases-en.md releases-tr.md
Naming standard and site rules standard-en.md standard-tr.md
Troubleshooting troubleshooting-en.md troubleshooting-tr.md
Reports across the 3 course templates toolchain-comparison-en.md toolchain-comparison-tr.md
Which report is which? which-report.en.md which-report.tr.md

Also in this repository

  • docs/archive/README-history.md - this README's original ~1000-line "how it was built" narrative (2023).
  • docs/archive/Java_Installation_Guide_Windows.md, docs/archive/Maven_Installation_Guide_Windows.md - earlier, unmaintained install walkthroughs; superseded by install-en.md.
  • LICENSE, Homework and Report Template.docx - course paperwork, unrelated to the build.

About

Maven (Build,Test,Coverage,Publish) + Doxygen (HTML, Latex, RTF) + ReportGenerator + QA (Test Coverage) + Astyle Template

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages