You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Neal Sanche <ne...@nsdev.org> on 2005/06/09 07:00:19 UTC

Best way to 'auto deploy'?

Hi All,

I've built a little Ant script to deploy my app at the end of a build. 
The task looks like this:

    <target name="deploy" depends="compile,package" description="--> A 
simple Geronimo Phonebook JDBC Application">
        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
            <arg value="--user"/>
            <arg value="${geronimo.user}"/>
            <arg value="--password"/>
            <arg value="${geronimo.password}"/>
            <arg value="undeploy"/>
            <arg value="PhoneBookWeb"/>
        </java>
        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
            <arg value="--user"/>
            <arg value="${geronimo.user}"/>
            <arg value="--password"/>
            <arg value="${geronimo.password}"/>
            <arg value="deploy"/>
            <arg value="phonebook.war"/>
        </java>
    </target>

The problem is that this seems to be somewhat unpredictable. Sometimes 
it works, and usually it doesn't and I have to undeploy manually. Is 
there a more effective way to pull this off with the latest geronimo 
builds? I've built as of last Saturday or so.

Thanks a ton in advance.

Cheers.

-Neal

Re: Best way to 'auto deploy'?

Posted by Neal Sanche <ne...@nsdev.org>.
Dain Sundstrom wrote:

> On Jun 9, 2005, at 6:10 PM, Neal Sanche wrote:
>
>> Hi Dain, and David,
>>
>> Well, I'm not as experienced with Maven as I am with Ant, so that  
>> may be the reason for my question. I will definitely give the topic  
>> a look, and read through the maven plugin source code when I have  
>> time to see what it's doing. Thanks for the pointers.
>
>
> It is great to have you back!

Definitely good to be back, thanks.

>
>> I am doing some in depth learning of what has occurred in Geronimo  
>> since my attention span slipped sometime last year. I've written  and 
>> deployed my first very small JSP application with JDBC  connector, 
>> and was able to do a database query and print some  results. So, 
>> being encouraged by that I decided to understand more  about the 
>> deployer, and hence my question.
>
>
> Nice.  If you get some time, it would be cool to add your sample code  
> to the wiki so others can try it out.

Well, as it happens, I was hired to write an article on getting a JSP 
application running with Geronimo for IBM. It'll be appearing there soon 
(when drafts and so on are completed). I'll definitely post a link so it 
can be wikified. I'm currently working on my next article, and it's 
turning out to be somewhat ambitious, I think. My previous post hinted 
at the fact that I'm trying to get a recent Struts working inside 
Geronimo, and I'm working through all of the details to build the 
application from XDoclet, I have to show at least one EJB (I'm trying to 
get a CMP and a SLSB running... Here's what I'm doing in brief:

Maven is doing XDoclet processing of a couple of EJBs, and some Struts 
actions, and producing an ejb-jar, a .WAR, and bundling those inside an 
.EAR file. I've got deployment plans embedded for all of the modules, 
but I found that the .WAR one isn't really necessary right now. Anyway, 
I'm able to get Maven to start and stop and undeploy and deploy the 
.EAR. That seems to be working very well, much better than my old ANT 
script, that's for sure.

Well, once the application is deployed, I can hit some of the pages, 
which use many Struts taglib tags, and they work. But, as mentioned in 
my other recent post, I'm having some difficulties with class resolution 
for a couple of the classes inside the WEB-INF/classes directory. Very 
strange, still trying to track that one down. I may end up simplifying 
the application and leaving Struts out for now so I can move forward. 
But, I'd rather not do that if I can figure out why it's not happy.

>
>> I'm pretty sure my server was running the RuntimeDeployer  
>> configuration, but since I am new to your deployment plan based  
>> deployer, I may have done something that caused it not to be there  
>> for a while when I was seeing the problems. I guess it's the price  
>> paid for extreme modularity, so only experience can help me  
>> (definitely not a fault).
>
>
> Please don't lower the bar.  Just because we have a modular structure  
> doesn't mean we need to have a harder to understand server.  For  
> example, I consider the fact that the deployer doesn't complain when  
> the RuntimeDeployer isn't deployed a HUGE bug.  Also when it  
> complains it should say "The org/apache/geronimo/RuntimeDeployer  
> configuration is not running in your server.  To start it, simply  
> execute java -jar start org/apache/geronimo/RuntimeDeployer".  Or  
> even better, it could say "The org/apache/geronimo/RuntimeDeployer  
> configuration is not running in your server.  Would you like to start  
> it now? [N/y]"
>
> Can you file a bug report on this?

I would, Dain, but it's not doing it anymore.

>
>> So far I am quite happy to be back. I'll let you know if I have  
>> questions.
>
>
> Please do.  We are at the stage where feedback on what is hard to  
> understand, frustrating, or just weird is critical to the success of  
> this project.

Okay, I'll do my best.

-Neal

Re: Best way to 'auto deploy'?

Posted by Dain Sundstrom <da...@iq80.com>.
On Jun 9, 2005, at 6:10 PM, Neal Sanche wrote:

> Hi Dain, and David,
>
> Well, I'm not as experienced with Maven as I am with Ant, so that  
> may be the reason for my question. I will definitely give the topic  
> a look, and read through the maven plugin source code when I have  
> time to see what it's doing. Thanks for the pointers.

It is great to have you back!

> I am doing some in depth learning of what has occurred in Geronimo  
> since my attention span slipped sometime last year. I've written  
> and deployed my first very small JSP application with JDBC  
> connector, and was able to do a database query and print some  
> results. So, being encouraged by that I decided to understand more  
> about the deployer, and hence my question.

Nice.  If you get some time, it would be cool to add your sample code  
to the wiki so others can try it out.

> I'm pretty sure my server was running the RuntimeDeployer  
> configuration, but since I am new to your deployment plan based  
> deployer, I may have done something that caused it not to be there  
> for a while when I was seeing the problems. I guess it's the price  
> paid for extreme modularity, so only experience can help me  
> (definitely not a fault).

Please don't lower the bar.  Just because we have a modular structure  
doesn't mean we need to have a harder to understand server.  For  
example, I consider the fact that the deployer doesn't complain when  
the RuntimeDeployer isn't deployed a HUGE bug.  Also when it  
complains it should say "The org/apache/geronimo/RuntimeDeployer  
configuration is not running in your server.  To start it, simply  
execute java -jar start org/apache/geronimo/RuntimeDeployer".  Or  
even better, it could say "The org/apache/geronimo/RuntimeDeployer  
configuration is not running in your server.  Would you like to start  
it now? [N/y]"

Can you file a bug report on this?

> So far I am quite happy to be back. I'll let you know if I have  
> questions.

Please do.  We are at the stage where feedback on what is hard to  
understand, frustrating, or just weird is critical to the success of  
this project.

Thanks,

-dain

Re: Best way to 'auto deploy'?

Posted by Neal Sanche <ne...@nsdev.org>.
Hi Dain, and David,

Well, I'm not as experienced with Maven as I am with Ant, so that may be 
the reason for my question. I will definitely give the topic a look, and 
read through the maven plugin source code when I have time to see what 
it's doing. Thanks for the pointers.

I am doing some in depth learning of what has occurred in Geronimo since 
my attention span slipped sometime last year. I've written and deployed 
my first very small JSP application with JDBC connector, and was able to 
do a database query and print some results. So, being encouraged by that 
I decided to understand more about the deployer, and hence my question.

I'm pretty sure my server was running the RuntimeDeployer configuration, 
but since I am new to your deployment plan based deployer, I may have 
done something that caused it not to be there for a while when I was 
seeing the problems. I guess it's the price paid for extreme modularity, 
so only experience can help me (definitely not a fault).

So far I am quite happy to be back. I'll let you know if I have questions.

Cheers.

-Neal

Dain Sundstrom wrote:

> I think the deployer can silently fail.  It doesn't print anything;  
> the program just exits.
>
> Neal, if you have time we have a set of java beans that we wrap in  
> maven to do deployment, and I'm pretty sure it would be simple to  
> make ant tasks out of these.  The code is in  
> org.apache.geronimo.deployment.mavenplugin but they don't use any  
> maven classes at all.
>
> -dain
>
> On Jun 8, 2005, at 11:30 PM, David Jencks wrote:
>
>> dont like maven, huh? :-)  This might be easier with the geronimo  
>> maven plugin.
>>
>> I wonder if the times it fails there is a geronimo server running  
>> without the org/apache/geronimo/RuntimeDeployer configuration  
>> started.  If so, the deployer.jar will try to connect but not  
>> succeed... the needed pieces are missing.
>>
>> thanks
>> david jencks
>>
>> On Jun 8, 2005, at 10:00 PM, Neal Sanche wrote:
>>
>>
>>> Hi All,
>>>
>>> I've built a little Ant script to deploy my app at the end of a  
>>> build. The task looks like this:
>>>
>>>    <target name="deploy" depends="compile,package" description="-- > 
>>> A simple Geronimo Phonebook JDBC Application">
>>>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>>>            <arg value="--user"/>
>>>            <arg value="${geronimo.user}"/>
>>>            <arg value="--password"/>
>>>            <arg value="${geronimo.password}"/>
>>>            <arg value="undeploy"/>
>>>            <arg value="PhoneBookWeb"/>
>>>        </java>
>>>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>>>            <arg value="--user"/>
>>>            <arg value="${geronimo.user}"/>
>>>            <arg value="--password"/>
>>>            <arg value="${geronimo.password}"/>
>>>            <arg value="deploy"/>
>>>            <arg value="phonebook.war"/>
>>>        </java>
>>>    </target>
>>>
>>> The problem is that this seems to be somewhat unpredictable.  
>>> Sometimes it works, and usually it doesn't and I have to undeploy  
>>> manually. Is there a more effective way to pull this off with the  
>>> latest geronimo builds? I've built as of last Saturday or so.
>>>
>>> Thanks a ton in advance.
>>>
>>> Cheers.
>>>
>>> -Neal
>>>
>>


Re: Best way to 'auto deploy'?

Posted by Dain Sundstrom <da...@iq80.com>.
I think the deployer can silently fail.  It doesn't print anything;  
the program just exits.

Neal, if you have time we have a set of java beans that we wrap in  
maven to do deployment, and I'm pretty sure it would be simple to  
make ant tasks out of these.  The code is in  
org.apache.geronimo.deployment.mavenplugin but they don't use any  
maven classes at all.

-dain

On Jun 8, 2005, at 11:30 PM, David Jencks wrote:

> dont like maven, huh? :-)  This might be easier with the geronimo  
> maven plugin.
>
> I wonder if the times it fails there is a geronimo server running  
> without the org/apache/geronimo/RuntimeDeployer configuration  
> started.  If so, the deployer.jar will try to connect but not  
> succeed... the needed pieces are missing.
>
> thanks
> david jencks
>
> On Jun 8, 2005, at 10:00 PM, Neal Sanche wrote:
>
>
>> Hi All,
>>
>> I've built a little Ant script to deploy my app at the end of a  
>> build. The task looks like this:
>>
>>    <target name="deploy" depends="compile,package" description="-- 
>> > A simple Geronimo Phonebook JDBC Application">
>>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>>            <arg value="--user"/>
>>            <arg value="${geronimo.user}"/>
>>            <arg value="--password"/>
>>            <arg value="${geronimo.password}"/>
>>            <arg value="undeploy"/>
>>            <arg value="PhoneBookWeb"/>
>>        </java>
>>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>>            <arg value="--user"/>
>>            <arg value="${geronimo.user}"/>
>>            <arg value="--password"/>
>>            <arg value="${geronimo.password}"/>
>>            <arg value="deploy"/>
>>            <arg value="phonebook.war"/>
>>        </java>
>>    </target>
>>
>> The problem is that this seems to be somewhat unpredictable.  
>> Sometimes it works, and usually it doesn't and I have to undeploy  
>> manually. Is there a more effective way to pull this off with the  
>> latest geronimo builds? I've built as of last Saturday or so.
>>
>> Thanks a ton in advance.
>>
>> Cheers.
>>
>> -Neal
>>
>


Re: Best way to 'auto deploy'?

Posted by David Jencks <da...@yahoo.com>.
dont like maven, huh? :-)  This might be easier with the geronimo maven 
plugin.

I wonder if the times it fails there is a geronimo server running 
without the org/apache/geronimo/RuntimeDeployer configuration started.  
If so, the deployer.jar will try to connect but not succeed... the 
needed pieces are missing.

thanks
david jencks

On Jun 8, 2005, at 10:00 PM, Neal Sanche wrote:

> Hi All,
>
> I've built a little Ant script to deploy my app at the end of a build. 
> The task looks like this:
>
>    <target name="deploy" depends="compile,package" description="--> A 
> simple Geronimo Phonebook JDBC Application">
>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>            <arg value="--user"/>
>            <arg value="${geronimo.user}"/>
>            <arg value="--password"/>
>            <arg value="${geronimo.password}"/>
>            <arg value="undeploy"/>
>            <arg value="PhoneBookWeb"/>
>        </java>
>        <java jar="${geronimo.root}/bin/deployer.jar" fork="true">
>            <arg value="--user"/>
>            <arg value="${geronimo.user}"/>
>            <arg value="--password"/>
>            <arg value="${geronimo.password}"/>
>            <arg value="deploy"/>
>            <arg value="phonebook.war"/>
>        </java>
>    </target>
>
> The problem is that this seems to be somewhat unpredictable. Sometimes 
> it works, and usually it doesn't and I have to undeploy manually. Is 
> there a more effective way to pull this off with the latest geronimo 
> builds? I've built as of last Saturday or so.
>
> Thanks a ton in advance.
>
> Cheers.
>
> -Neal
>