Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting <warName> on maven-war-plugin is not respected by the CICS Maven bundle plugin bundle-war build #245

Open
PhilWakelin opened this issue Oct 14, 2024 · 0 comments

Comments

@PhilWakelin
Copy link
Member

The name of the WAR archive file built by the maven-war-plugin can be important and in Maven & Gradle builds defaults to the artifact + version. However, it can be easily pre-set to a given name .

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, a bundle-war build ignores this and creates a CICS bundle zip using a WAR built using the <artifact> 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>

When using the Gradle plugin, this problem does not exist as the archiveFileName property is respected by the CICS bundle plugin build. i.e.

     archiveFileName='cics-java-liberty-restapp.war'
}

This sample repo was used in the above example

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

No branches or pull requests

1 participant