Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Maven Application Example

Simple Maven application with container build.

Project Structure

my-maven-app/
├── src/
│   └── main/java/...
├── pom.xml
├── Containerfile
└── .github/
    ├── artifacts.yml
    └── workflows/
        └── release-workflow.yml

Configuration Files

.github/artifacts.yml

See artifacts.yml in this directory.

Key points:

  • Single Maven artifact
  • Publishes to GitHub Packages
  • Builds multi-platform container

.github/workflows/release-workflow.yml

See release-workflow.yml in this directory.

How to Use

  1. Copy files to your repository:

    mkdir -p .github/workflows
    cp examples/maven-app/artifacts.yml .github/
    cp examples/maven-app/release-workflow.yml .github/workflows/
  2. Customize for your project:

    • Update name in artifacts.yml
    • Adjust java-version if needed
    • Verify Containerfile path
  3. Create first release:

    git tag -s v1.0.0 -m "Release v1.0.0"
    git push origin v1.0.0

What Gets Built

  • Maven JAR artifact → target/*.jar
  • Published to → GitHub Packages
  • Container image → ghcr.io/org/repo:v1.0.0
  • Platforms → linux/amd64, linux/arm64

See Also