|
|
|
Abstract Class for deployable start stop actions
Thank you Vincent for the comments.
Some remarks from my side as well: We would need some tests. Unit tests would be fine I think. All updated files are attached. > What these tests should verify?
We have a ContainerStartMojoTest class. We need something similar for the deploy mojos. >How to commit renamed files ? Just also commiting it here and yes, sure if you want I can do sharing for this mojos as well and also I see DeployMojo can use then URL as additional argument. You need to create a patch. Almost all SVN clients have a "create patch" feature. For new files you need to "svn add" them before creating the patch or they won't be in the patch. I'll have a look at the new files you've committed later today, thanks. Juri, I think you're preparing a new patch so I'll wait for it before applying anything. Let me know if this is ok.
Here is updated and renamed DeployerMojos that uses new AbstractClass with common code, except DeployMojo. Deploy Mojo contains PingUrl attribute which belong to Deployable object for m2 not for real Deployable. I think this is up to you Vincent to decide if real Deployable could have getPingUrl attribute. Anyway this will be like ahack not like a fix
Please let me know what do you think. Best regards, Hi Juri. Thanks a lot for your patch! I've applied it. Here are the things I had to change. I'm just listing them so that you know what can be improved for the next time you send some patches. Some of them are important and others are minor but I'm listing them all in order to be exhaustive:
D:/workspace/cargo-svn/extensions/maven2/src/main/java/org/codehaus/cargo/maven2/ModuleStopMojo.java The root of the patch should be extensions/. I've fixed this manually for now but please make sure this is fine for the next patches you send.
@version $Id: AbstractCargoMojo.java 940 2006-03-17 21:29:46Z vmassol $
private void deploySingleDeployable(org.codehaus.cargo.container.deployer.Deployer deployer, org.codehaus.cargo.container.deployable.Deployable deployable, URL pingURL) { getLog().debug("Deploying [" + deployable.getFile() + "]" + ((pingURL == null) ? "..." : " using ping URL [" + pingURL + "]")); if (pingURL != null) { deployer.deploy(deployable, createDeployableMonitor(pingURL, deployable)); } else { deployer.deploy(deployable); } } (in this example you can remove 4 lines).
Once more thanks a lot for your patch! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Some remarks: