IBM / cics-bundle-gradle

The plugin to build and deploy CICS bundles in a Gradle build.
Eclipse Public License 2.0
7 stars 20 forks source link

Setting the WAR archive file name is not respected by the CICS bundle plugin bundle-war builds #161

Closed PhilWakelin closed 1 month ago

PhilWakelin commented 1 month ago

The name of the WAR archive file can be important and in Maven & Gradle builds defaults to the artifact + version. However, it can be pre-set to a given name for both Maven and Gradle.

Here is an example Maven pom.xml excerpt, which uses the <warName>attribute to set the name of the WAR archive. This works correctly and the WAR file is built as cics-java-liberty-restapp.war. However, the bundle-war build creates a WAR built using the and elements i.e. cics-java-liberty-restapp-0.1.0.war

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.4.0</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>                    
                    <warName>cics-java-liberty-restapp</warName>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.ibm.cics</groupId>
                <artifactId>cics-bundle-maven-plugin</artifactId>
                <version>1.0.6</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>bundle-war</goal>
                    </goals>                                
                    <configuration>
                      <jvmserver>${jvmserver}</jvmserver>
                    </configuration>
                  </execution>
                </executions>
              </plugin>
        </plugins>
    </build>

A similar problem exists with the Gradle plugin.

This sample repo was used in the above example

PhilWakelin commented 1 month ago

Closing this issue as on a closer look this problem is only relevant to the CICS Maven Plugin, and I've re-raised this as #245