Re: [S2-ish] deploying exploded webapps with maven2 and cargo
On 1/12/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 1/12/07, Joe Germuska [EMAIL PROTECTED] wrote: (I sent the below to the cargo users list, but haven't gotten a response in several days, so I'm going to be gauche and send it to struts; now that Struts2 uses Maven2, some Struts folks must be dealing with this [*cough* Wendy :-) ] If anyone has advice, it will be appreciated... ) You must have learned the secret-- I can't read all the mail I get, so I search for my name occasionally to see if anyone is calling me. :) duly noted! I'm slightly confused about what's going on, since you mention both an exploded webapp and remote deployment. I don't see how that would work. Maybe I'm confused; the combinations of values for type (container), type (configuration) and type (deployer) are not manifestly clear to me, which I think is a combination of unintuitive naming, overloading the concept of type, and my laziness in not wanting to spend time developing a deep understanding of the Cargo architecture. I thought remote was the way that you did things if you had an already running Tomcat instance. That's how we used the Codeczar plugin, so I was trying to maintain the analog. Perhaps I should switch to trying to have the plugin start Tomcat. When we used Tomcat with Maven 1 this way it resulted in a fat memory-hogging Maven process hanging around not achieving much, so I steered away from that and wasn't enthusiastic Best bet would be to construct a simple example app, maybe start with the Struts blank archetype and add the Cargo config, and post back to the Cargo list with a link to it. I'll probably give this a shot when time allows, which is not just right now... Thanks again Joe -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com The truth is that we learned from João forever to be out of tune. -- Caetano Veloso
[S2-ish] deploying exploded webapps with maven2 and cargo
(I sent the below to the cargo users list, but haven't gotten a response in several days, so I'm going to be gauche and send it to struts; now that Struts2 uses Maven2, some Struts folks must be dealing with this [*cough* Wendy :-) ] If anyone has advice, it will be appreciated... ) I'm exploring the possibility of moving my webapp development team from using Maven1 to Maven2 and one of the major practices we've developed has to do with deploying our work in progress to a locally running Tomcat instance. In the interest of not changing too many things at once, I'm hoping to figure out how to use Cargo to do what we've previously had great success achieving with the CodeCzar plugin. I have found examples from various folks online indicating success with this, but I am hitting a roadblock when I try to run exploded. Everything seems to be fairly functional (if not quite straightforward!) when I run from the WAR, but when I follow instructions from this post (http://www.nabble.com/-mvnreloadable-webapps-t2762768.html#a7715823 ) and add a location element to my deployable, I get the following FileNotFound error java.io.FileNotFoundException: /Users/germuska/Development/myriad/webapp-customization/target/webapp- customization-1.0-SNAPSHOT (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatDeployer.deploy( AbstractTomcatDeployer.java:115) When I copy the not-found path and execute the following, I get something: % ls -lad /Users/germuska/Development/myriad/webapp-customization/target/webapp- customization-1.0-SNAPSHOT drwxr-xr-x 20 germuska admin 680 Jan 8 13:29 /Users/germuska/Development/myriad/webapp-customization/target/webapp- customization-1.0-SNAPSHOT Any suggestions on how to dig more deeply on this? Below is the cargo section of my effective POM. One thing which seems a little odd is that the location element is only partially interpolated, although as seen in the error message, it ends up fully interpolated by that point. So I don't know if that is of any import or not. plugin groupIdorg.codehaus.cargo/groupId artifactIdcargo-maven2-plugin/artifactId configuration container containerIdtomcat5x/containerId home/opt/tomcat/home typeremote/type /container configuration typeruntime/type properties cargo.remote.username*/cargo.remote.username cargo.remote.password*/cargo.remote.password cargo.servlet.port9000/cargo.servlet.port /properties /configuration deployer typeremote/type deployables deployable location${project.build.directory}/webapp- customization-1.0-SNAPSHOT/location properties contextcustomization/context /properties /deployable /deployables /deployer /configuration /plugin Thanks in advance... Joe -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com The truth is that we learned from João forever to be out of tune. -- Caetano Veloso
Re: [S2-ish] deploying exploded webapps with maven2 and cargo
On 1/12/07, Joe Germuska [EMAIL PROTECTED] wrote: (I sent the below to the cargo users list, but haven't gotten a response in several days, so I'm going to be gauche and send it to struts; now that Struts2 uses Maven2, some Struts folks must be dealing with this [*cough* Wendy :-) ] If anyone has advice, it will be appreciated... ) You must have learned the secret-- I can't read all the mail I get, so I search for my name occasionally to see if anyone is calling me. :) Just for fun, try ${basedir}/target rather than ${project.build.directory} -- I think it's just surefire, but there are definitely cases where the former works and not the latter. I'm slightly confused about what's going on, since you mention both an exploded webapp and remote deployment. I don't see how that would work. Best bet would be to construct a simple example app, maybe start with the Struts blank archetype and add the Cargo config, and post back to the Cargo list with a link to it. I don't have time to set it up, but I'll probably play with it if you get it started. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]