This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Che Server is the backend component of Eclipse Che - a Kubernetes-native IDE platform. It provides REST APIs for managing Kubernetes namespaces and retrieving devfile content from various Git hosting services (GitHub, GitLab, Bitbucket, Azure DevOps).
Tech Stack: Java 11, Apache Maven, Jakarta EE, Google Guice (dependency injection), Fabric8 Kubernetes Client, deployed as a WAR on Apache Tomcat.
mvn clean installmvn clean install -V -e -Pfast -DskipTests -Dskip-validate-sources -Denforcer.skip=true# Run a single test class
mvn test -Dtest=ClassName
# Run a single test method
mvn test -Dtest=ClassName#methodName./build/build.shIntegration tests require Podman or Docker to be running. They use TestNG framework.
mvn verify -PintegrationThe project is organized into five main Maven modules:
che-core-api-core: Core APIs, DTOs, REST framework, WebSocket supportche-core-api-dto: DTO serialization/deserialization frameworkche-core-api-model: Shared data modelscommons/: Common utilities (JSON, logging, dependency injection, tracing)che-core-metrics-core: Metrics collection (Micrometer/Prometheus)che-core-tracing-*: Distributed tracing (OpenTracing/Jaeger)
Contains all REST API implementations organized by feature domain:
OAuth/Authentication Modules (pattern: che-core-api-auth-<provider>):
che-core-api-auth: Base OAuth frameworkche-core-api-auth-github,che-core-api-auth-gitlab,che-core-api-auth-bitbucket,che-core-api-auth-azure-devops: Provider-specific OAuth implementations- Each contains an
OAuthAuthenticatorandOAuthAuthenticatorProvider
Factory Modules (pattern: che-core-api-factory-<provider>):
che-core-api-factory-shared: Common factory interfacesche-core-api-factory-github,che-core-api-factory-gitlab,che-core-api-factory-bitbucket*,che-core-api-factory-azure-devops: Provider-specific factory resolvers- Each implements:
ApiClient,FactoryParametersResolver,PersonalAccessTokenFetcher,ScmFileResolver,URLParser,UserDataFetcher
Other wsmaster Modules:
che-core-api-devfile: Devfile parsing and validationche-core-api-workspace: Workspace lifecycle managementche-core-api-user: User management APIsche-core-api-ssh: SSH key managementche-core-sql-schema: Database schema definitions
kubernetes/: Base Kubernetes infrastructure implementation (uses Fabric8 client)openshift/: OpenShift-specific extensionsinfrastructure-factory: Infrastructure abstraction layerinfrastructure-metrics: Infrastructure-specific metrics
Permission and authentication modules for multi-user deployments.
Assembles all modules into deployable WAR files.
Dependency Injection: Google Guice is used throughout. Each module defines a *Module.java class that binds interfaces to implementations.
SCM Provider Pattern: To add support for a new Git hosting provider, you must implement TWO modules:
che-core-api-auth-<provider>for OAuth authenticationche-core-api-factory-<provider>for devfile resolution and API operations
Shared vs Provider-Specific: Some providers have -common modules (e.g., che-core-api-auth-github-common) that contain shared logic between multiple instances of the same provider (e.g., github.com vs GitHub Enterprise).
The project uses TestNG (not JUnit). Test classes follow the pattern *Test.java.
- Enforcer plugin validates dependencies and versions
- Source validation can be skipped with
-Dskip-validate-sources
- Build sources with fast profile
- Run
./build/build.shto create container imagequay.io/eclipse/che-server:next - Tag and push to your registry
- Deploy with
chectl server:deploy --platform=<openshift|minikube> --cheimage=<your-image> --debug
- Deploy Che with
--debugflag - Run
chectl server:debugto enable remote debugging - Attach debugger to port exposed by chectl (default: 8000)
Follow the established pattern in wsmaster/:
- Create
che-core-api-auth-<provider>with<Provider>OAuthAuthenticatorand<Provider>OAuthAuthenticatorProvider - Create
che-core-api-factory-<provider>with the six required classes:ApiClient,FactoryParametersResolver,PersonalAccessTokenFetcher,ScmFileResolver,URLParser,UserDataFetcher - Each module needs a Guice
Moduleclass to register bindings
The infrastructures/kubernetes module uses the Fabric8 Kubernetes Java client. Infrastructure provisioning is abstracted through factory interfaces in infrastructure-factory.
Schema definitions are in wsmaster/che-core-sql-schema. Liquibase is used for migrations.
GitHub Actions workflows handle:
- PR builds:
.github/workflows/build-pr-check.yml - Main branch builds:
.github/workflows/next-build.yml(pushes to quay.io) - Releases:
.github/workflows/release.yml - Sonar analysis:
.github/workflows/sonar.yaml
- Issues: https://github.com/eclipse/che/issues
- Documentation: https://www.eclipse.org/che/docs/
- Devfile:
devfile.yamlin project root defines development container with Maven, JDK 17, and Podman