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-guideUse code with caution.
This project is licensed under the Apache License, Version 2.0. See the LICENSE.txt and NOTICE.txt files for details.