This repository is a modernized fork of the original Apache Click framework, transitioned from its legacy Apache Ant build system to a clean, multi-module Apache Maven project targeting Java 17.
This fork represents a significant update to the project infrastructure:
- Java 17+ Support: Updated source and target compatibility to JDK 17, resolving legacy
doclintJavadoc errors and modernizing the bytecode. - Maven Migration: Replaced the monolithic
build.xmlwith a standard Maven Reactor build. - API Cleanup: Migrated deprecated Jdk API calls.
- Unified Architecture: Integrated the
mocksource and its corresponding tests directly into theclickruntime module, eliminating circular dependencies.
The project is organized into the following Maven modules:
click(clickdirectory): The core application framework runtime.click-extras(extrasdirectory): The core lightweight controls extensions (free from heavy third-party dependencies).click-extras-cayenne(extras-cayennedirectory): Apache Cayenne ORM integration layer.click-extras-hibernate(extras-hibernatedirectory): Hibernate ORM integration layer.click-extras-spring(extras-springdirectory): Spring Framework integration layer.click-user-guide(user-guidedirectory): Framework documentation written in Asciidoc.showcase/examples: (showcasedirectory):The showcase web application demonstrating all components in action.
Ensure you have JDK 17 and Maven 3.8+ installed.
# Build the entire project and install artifacts to your local .m2 repository
mvn clean install
# Run the Click Examples application
cd showcase/examples
mvn clean package jetty:run
In this modernized version, the Mock utilities and their tests are fully integrated into the click runtime module. You no longer need to build a separate test module.
Maven automatically executes all unit tests (including the integrated Mock tests) during the standard build lifecycle:
# Run tests for the core module only
mvn test -pl click
# Run a specific Mock test
mvn test -Dtest=MockContainerTest -pl clickThe Mock utilities (e.g., MockContainer, MockRequest) are packaged as a classifier. To use them in your own application's test suite:
<dependency>
<groupId>org.apache.click</groupId>
<artifactId>click</artifactId>
<version>${click.version}</version>
<classifier>mock</classifier>
<scope>test</scope>
</dependency>Now that framework dependencies are decoupled (CLK-47), add only the modules you actually need to your application's pom.xml:
<dependency>
<groupId>org.apache.click</groupId>
<artifactId>click-extras</artifactId>
<version>${click.version}</version>
</dependency><dependency>
<groupId>org.apache.click</groupId>
<artifactId>click-extras-cayenne</artifactId>
<version>${click.version}</version>
</dependency><dependency>
<groupId>org.apache.click</groupId>
<artifactId>click-extras-hibernate</artifactId>
<version>${click.version}</version>
</dependency><dependency>
<groupId>org.apache.click</groupId>
<artifactId>click-extras-spring</artifactId>
<version>${click.version}</version>
</dependency>The user guide is generated automatically during the build process using Asciidoctor. To generate the HTML and PDF documentation explicitly:
mvn generate-resources -pl user-guideWe use the maven-release-plugin configured with <localCheckout>true</localCheckout> to manage version transitions and tagging locally before pushing to GitHub.
This updates the pom.xml versions, runs validation checks, and creates the local Git tag:
mvn release:prepare -DskipTests -DallowTimestampedSnapshots=trueAccept the default version suggestions (e.g. tag click-2.7.0, and next development 2.7.1-SNAPSHOT).
This checks out the newly created tag internally and bundles all production artifacts into the central target/checkout/ folder:
mvn release:perform -DskipTestsOnce the local build succeeds, push the development cycle commits and the new release tag to GitHub. The tag push will trigger the automated GitHub Actions release workflow.
git push origin main
git push origin --tagsIf the release process fails halfway through or needs to be rolled back locally, run the following commands to return to a clean SNAPSHOT state:
# 1. Clean Maven release properties
mvn release:clean
# 2. Undo the 2 local version commits made by Maven
git reset --hard HEAD~2
# 3. Delete the local tag so it can be recreated from scratch
git tag -d click-2.7.0