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

Non-reactor bundles fail to deploy if classifier is not set #151

Closed
tom-foyle opened this issue Jul 16, 2020 · 2 comments · Fixed by #236
Closed

Non-reactor bundles fail to deploy if classifier is not set #151

tom-foyle opened this issue Jul 16, 2020 · 2 comments · Fixed by #236
Assignees
Labels
bug Something isn't working

Comments

@tom-foyle
Copy link
Contributor

In the scenarios where we create a CICS bundle from an existing project, using the bundle-osgi / bundle-war / bundle-ear / bundle-eba goals, the classifier attribute claims to be optional with a default value of cics-bundle, but omitting it from pom.xml results in a deployment failure with the error message:

[ERROR] Failed to execute goal com.ibm.cics:cics-bundle-maven-plugin:1.0.1-SNAPSHOT:deploy (default) on project standalone-war: Some of the supplied parameters were invalid:
[ERROR]  - bundle: Error reading bundle manifest: Supplied CICS bundle must have a manifest at META-INF/cics.xml

Also, the comment in the samples makes it sound like the cics-bundle value is somehow significant to the packaging method, whereas I think it's actually just an arbitrary string which is appended to the zip filename?

<!-- The bundle classifier indicates that the war should be packaged into a CICS bundle -->
<classifier>cics-bundle</classifier>

Relevant doc pages:
https://github.com/IBM/cics-bundle-maven#create-a-cics-bundle-from-an-existing-java-module-using-cics-bundle-maven-plugin
https://ibm.github.io/cics-bundle-maven/bundle-war-mojo.html#classifier

@tom-foyle tom-foyle added the bug Something isn't working label Jul 16, 2020
@ind1go
Copy link
Member

ind1go commented Jan 18, 2021

I'll use bundle-war below to mean all the bundle-war, bundle-ear, etc goals.

I think the thing here is that the bundle-war goal default to it being cics-bundle, but the deploy goal doesn't default to that because it could be being used to deploy a bundle created by either a bundle-war goal (where classifier will be cics-bundle or another classifier as specified) or a build goal (where there will be no classifier, at least not without explicitly setting it).

I think this will need to be a documentation fix and logging fix - not sure I can see a fix that makes it 'just work' for all combinations. Perhaps it's possible to work out which goals have run ahead of the deploy goal? @stewartfrancis

However, we could do the following:

  • in the README, in the Deploy a CICS bundle section, mention that you should also use the <classifier> configuration option to select the bundle, in the case where you're deploying a bundle-war-built bundle.
  • in the log messages for the deploy goal, print out the file that we're deploying. This'll make it more obvious when it ends .war instead of .zip.

Any other ideas?

@ind1go
Copy link
Member

ind1go commented Jan 18, 2021

Would definitely be good to fix it though because I fall over it every time I create a new project! 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants