Hi there,
we're using cargo to deploy our application to a Wildfly server. It works fine, but we'd like to change the name of the deployment file on Wildfly. Following code generates a file called app/api.war, but we'd like to name it app_core.war. If I got it correctly, cargo picks this name from the context root. Any idea on how to set it via script? I took a look at the container properties to set via "containerProperties", but couldn't find any property to use for this purpose.
Thanks in advance!
cargo {Hi Lucas
As per the documentation on
https://github.com/bmuschko/gradle-cargo-plugin I have the
impression you should not have to set the file
attribute of the deployable.
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/a760ab74-1d2b-4aeb-a01f-f2361a16055bn%40googlegroups.com.
Hi Lucas
Thanks for this, and what is the WAR context set to, still is it /app/api, or /api, or the context you specified?
During the preparation of the configuration, you should be seeing messages such as:
Deploying [deployable.getFile()] to [deployableDir]...
What do these messages indicate?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/fa0b63e6-ca82-469a-9921-764c830103f0n%40googlegroups.com.
Hi Lucas
Thanks for the details, I then misunderstood what you have been
doing: I thought you were using a local deployer, while I see
you're using a remote deployer. And, when I cross-check with the
Codehaus Cargo code I see the WAR deployable name should be the
context, and that's what the deployer shall be using when sending
over the file and deploying it.
Are you sure the file $project.buildDir/libs/app_core.war exists? I am suspecting that since that file doesn't exist, the Gradle Cargo container is loading the default WAR file for your Gradle project.
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/fe903cd6-3ab7-4a77-9306-bb17d4323ffan%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/959d339d-3040-4deb-80c3-b8a9d7f61ea7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/f1c19fee-a4b6-4bf5-9011-f41b1be0385cn%40googlegroups.com.
Hi Lucas
I think I understand now: do you actually expect that when the JBoss or WildFly WAR file has the context root set in the jboss-web.xml file, then the original WAR file name should be kept when deploying?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/8DD27381-F041-42CF-B3DD-33D2FBE13B41%40alishomepage.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/0366b7f0-2bf9-4716-bf19-fa0c94b7d736n%40googlegroups.com.
Hi Lucas
Excellent - Thanks for your rapid feedback!
As this would be a breaking change, I added another property, cargo.jboss.deployer.keepOriginalWarFilename, to control the behaviour.
Would you mind doing another couple tests, with the updated 1.9.10-SNAPSHOT version please?
Once you confirm that this works, if you need the new version to be "official", I'm happy to release it. If not urgent, I can also wait a little - Just in case you hit other bugs or things that would need change 😉
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/2687d06b-9826-413c-80f5-54c864134e34n%40googlegroups.com.
Hi Lucas
It seems, I put the if statement the wrong way round - In the version you have, setting the property to anything else than true actually does the job 😕
I checked in https://github.com/codehaus-cargo/cargo/commit/5a54473722f9ad9ac2f44c4731cb2fa1ef54c827 now to correct this, once https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/1191 is finished building (probably in about 90 minutes from now) the proper version 1.9.10-SNAPSHOT should be deployed in the repository.
I am looking forward to your observations. That version should
fix the issue, moreover it should only be displaying the
information messages about the context root once per JBoss WAR (I
noticed it was displayed 3 times in your execution).
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/bdcdf7ad-2d4b-421c-9b0b-ee7e2155a729n%40googlegroups.com.
On 11 Feb 2022, at 08:41, Lucas Skywalker <lucas...@live.com> wrote:
Hello Ali,
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/6dbbf847-5df3-4cfe-a1a3-5df66496eeddn%40googlegroups.com.
Hi Lucas
I've done some more improvements, in particular https://codehaus-cargo.atlassian.net/browse/CARGO-1578 which should allow the Gradle plugin to also work beautifully.
Would you mind having a look again? The CI took loooooong to compile and deploy this time.
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/8d2f4f91-0702-4b77-9432-13872030ac29n%40googlegroups.com.
Hi Lucas
Excellent news!
Do you need Codehaus Cargo a 1.9.10 release, or do you prefer to wait until you're sure everything you need is there?
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/7e6cec4e-a58a-4622-afad-792ee84e1813n%40googlegroups.com.
Hi Lucas
Excellent - I released it just now!
Regards
S. Ali Tokmen https://ali.tokmen.com/ https://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/79df83af-287c-442a-b229-3705434b10c5n%40googlegroups.com.