Skip to content

Conversation

@stewartfrancis
Copy link
Contributor

@stewartfrancis stewartfrancis commented Jan 30, 2026

PR Architecture Summary

Overview

Added support for Liberty server configuration and authentication role control in WAR and EAR bundle parts by exposing two new properties through the Maven plugin configuration. This implementation covers both bundle part bindings (for separate bundle modules) and bundle-war/bundle-ear goals (for existing Java modules).

Core Changes

1. Bundle Part Bindings (Warbundle.java, Earbundle.java)

  • Added fields:
    • addCicsAllAuthenticatedRole (boolean, default: true)
    • libertyAppConfigFile (File, optional)
  • Modified: toBundlePartImpl() methods now pass these parameters to WarBundlePart and EarBundlePart constructors
  • Pattern: Direct property exposure following existing jvmserver property pattern

2. Bundle-War and Bundle-Ear Mojos (AbstractBundleWebAppMojo.java, BundleWarMojo.java, BundleEarMojo.java)

  • New class: AbstractBundleWebAppMojo - intermediate abstract class extending AbstractBundleJavaMojo
  • Added Maven parameters:
    • @Parameter(property = "cicsbundle.addCicsAllAuthenticatedRole", defaultValue = "true")
    • @Parameter(property = "cicsbundle.libertyAppConfigFile")
  • Modified: BundleWarMojo and BundleEarMojo now extend AbstractBundleWebAppMojo and set properties on bundle part bindings
  • Validation: File existence check for libertyAppConfigFile if specified

3. Integration Tests

Created 10 new integration tests:

Reactor-based tests (6):

  • WAR tests: test-reactor-war-liberty-config, test-reactor-war-auth-role, test-reactor-war-liberty-full
  • EAR tests: test-reactor-ear-liberty-config, test-reactor-ear-auth-role, test-reactor-ear-liberty-full
  • Test infrastructure: New setup-test-artifacts reactor with test-war and test-ear modules

Bundle-war/bundle-ear goal tests (4):

  • WAR tests: test-bundle-war-liberty-config, test-bundle-war-auth-role
  • EAR tests: test-bundle-ear-liberty-config, test-bundle-ear-auth-role

Validators: 10 new PostBuild* classes using XMLUnit to verify:

  • Bundle XML attributes (addCICSAllAuth, appConfigFile)
  • Liberty server.xml file inclusion in bundles
  • Correct file references in bundle part definitions

4. Unit Tests

  • Updated WarbundleTest and EarbundleTest with test cases for new properties
  • Tests verify getters/setters and toBundlePartImpl() parameter passing

5. Build Infrastructure Improvements

  • Version management: Centralized Tycho (2.7.5) and bnd-maven-plugin (6.4.0) versions via filterProperties
  • Fixed: 6 pre-existing OSGi test failures caused by outdated plugin versions
  • Result: All 50 integration tests now pass (previously 40/46)

6. Documentation

  • Added "Configuring bundle part properties" section to README.md (lines 161-286)
  • Added "Configuring properties for bundle-war and bundle-ear goals" section (after line 320)
  • Documented all properties for WAR, EAR, and OSGi bundle parts with examples
  • Included single and multiple bundle part configuration examples

Configuration Examples

Bundle Part Configuration (separate bundle module):

<bundlePart implementation="com.ibm.cics.cbmp.Warbundle">
  <artifact><artifactId>my-app</artifactId></artifact>
  <jvmserver>DFHWLP</jvmserver>
  <addCicsAllAuthenticatedRole>false</addCicsAllAuthenticatedRole>
  <libertyAppConfigFile>server.xml</libertyAppConfigFile>
</bundlePart>

Bundle-War Goal Configuration (existing WAR module):

<goal>bundle-war</goal>
<configuration>
  <jvmserver>DFHWLP</jvmserver>
  <addCicsAllAuthenticatedRole>false</addCicsAllAuthenticatedRole>
  <libertyAppConfigFile>src/main/liberty/server.xml</libertyAppConfigFile>
</configuration>

Signed-off-by: Stewart Francis <stewartfrancis@uk.ibm.com>
@stewartfrancis stewartfrancis marked this pull request as draft January 30, 2026 11:57
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.

1 participant