Skip to content

feat: Add --manager flag to CLI project create command (#1410) - #606

Open
sd66dar wants to merge 1 commit into
galasa-dev:mainfrom
sd66dar:1410_cli_create_manager_project
Open

feat: Add --manager flag to CLI project create command (#1410)#606
sd66dar wants to merge 1 commit into
galasa-dev:mainfrom
sd66dar:1410_cli_create_manager_project

Conversation

@sd66dar

@sd66dar sd66dar commented May 22, 2026

Copy link
Copy Markdown
Contributor

Refer to galasa-dev/projectmanagement#1410.

Summary

Implements #1410 to add manager project creation capability to the Galasa CLI. The new --manager flag allows developers to generate a complete manager project structure with all necessary components.

CLI Enhancement

  • Added --manager flag to galasactl project create command
  • Added --managerName parameter for specifying manager name
  • Implemented mutual exclusivity between --manager and --features flags
  • Added validation for manager and package names

Manager Project Generation

The tool generates a complete manager project including:

  • Manager Interface (IManager.java) - Public API for the manager
  • Manager Implementation (ManagerImpl.java) - Core manager logic with lifecycle methods
  • Annotation (Manager.java) - For injecting the manager into test classes
  • Resource Interface (IManagerResource.java) - Public API for managed resources
  • Resource Implementation (ResourceImpl.java) - Resource implementation with null safety
  • Unit Tests (ManagerImplTest.java) - JUnit 5 test suite
  • Build Configuration - Both Maven (pom.xml) and Gradle (build.gradle) support
  • OSGi Bundle - Proper bundle configuration with bnd.bnd
  • OBR Integration - Automatic inclusion in OSGi Bundle Repository

Testing

  • Added 7 comprehensive unit tests (all passing)
  • Integration tests added to build-locally.sh
  • Tests cover Maven, Gradle, and combined build systems
  • Stress test script included for validation

Documentation

  • Updated CLI README.md with --manager flag usage and examples
  • Auto-generated CLI documentation updated
  • Added usage patterns and best practices

@eamansour eamansour left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking on this story! The changes are looking great, I've just added a few comments/suggestions that would be great to go through whenever you can :)

Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/README.md

@jadecarino jadecarino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for this PR Sheriell! Really keen to get this feature into Galasa. Changes look great overall, I have a few additional minor comments in addition to Eamonn's. Let us know if you'd like to discuss any requested changes!

Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/embedded/templates/projectCreate/manager-project/build.gradle Outdated
Comment thread modules/cli/pkg/embedded/templates/projectCreate/manager-project/pom.xml Outdated
Comment thread modules/cli/README.md

@jadecarino jadecarino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments Sheriell! I've resolved all of my original comments and I have one 1-line change remaining that I just noticed.

In terms of Eamonn's comments, as part of this PR, please can we also get the build issue resolved as well as add the missing Javadoc to ManagerImpl and the missing properties and resource management template files.

We would be happy for you to add the documentation to docs and tackle the more complex issue of adding a manager to an existing test project in a second PR.

Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/cmd/projectCreate.go Outdated
Comment thread modules/cli/pkg/embedded/templates/projectCreate/manager-project/bnd.bnd Outdated
Comment thread modules/cli/test-manager-creation.sh Outdated

@eamansour eamansour left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes! One small comment but overall the code changes look good - happy to approve once the comment is sorted out :)

Resolves galasa-dev/projectmanagement#1410

Adds --manager and --managerName flags to galasactl project create.
Generates a complete manager project including interface, implementation,
annotations, resources, CPS properties, unit tests, OSGi bundle config,
and OBR integration. Supports both Maven and Gradle build systems.

Signed-off-by: Sheriell Dar <asd638796@gmail.com>
@sd66dar
sd66dar force-pushed the 1410_cli_create_manager_project branch from a4d126c to 8d89927 Compare July 22, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants