Skip to content

πŸ› Compilation Failure: Missing Lombok Getters and Constructor Initialization IssuesΒ #1

@shivanand007

Description

@shivanand007

Problem Description

The project fails to compile with Maven due to missing getter methods in JenkinsProperties class and constructor initialization issues in JenkinsJobApiService. This prevents successful packaging with mvn package.

[ERROR] Compilation failure: Compilation failure:
[ERROR] /src/main/java/com/agua/ai/mcp/server/service/JenkinsJobApiService.java:[21,35] variable jenkinsTemplate not initialized in the default constructor
[ERROR] /src/main/java/com/agua/ai/mcp/server/util/JenkinsTemplate.java:[37,47] cannot find symbol
  symbol:   method getUsername()
  location: variable jenkinsProperties of type com.agua.ai.mcp.server.properties.JenkinsProperties
[ERROR] /src/main/java/com/agua/ai/mcp/server/util/JenkinsTemplate.java:[37,87] cannot find symbol
  symbol:   method getPassword()
  location: variable jenkinsProperties of type com.agua.ai.mcp.server.properties.JenkinsProperties
[ERROR] /src/main/java/com/agua/ai/mcp/server/util/JenkinsTemplate.java:[36,44] cannot find symbol
  symbol:   method getServerUri()
  location: variable jenkinsProperties of type com.agua.ai.mcp.server.properties.JenkinsProperties

Root Cause Analysis

Lombok @DaTa annotation issue: The JenkinsProperties class uses @DaTa but the generated getters are not being recognized during compilation
Constructor annotation conflict: JenkinsJobApiService uses @AllArgsConstructor which creates compilation issues with final field initialization

Expected Outcome

  • mvn clean compile should succeed without errors
  • mvn package should generate target/mcp-jenkins-server-0.0.1-SNAPSHOT.jar
  • No environment variables should be required for compilation/packaging

How to Reproduce the Issue

   git clone [repository-url]
   cd jenkins-mcp-server
   mvn clean compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions