Quantcast

tomcat maven plugin deploy to multiple tomcat instances...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

tomcat maven plugin deploy to multiple tomcat instances...

Jeff-351
(Didn't see a specific mailing list for the tomcat-maven-plugin...)

I finally got the 2.0-SNAPSHOT version of the tomcat6-maven-plugin working
against a single server, but wondered how I could configure it to push to
multiple tomcat instances based on the environment.  For example, our
staging environment for this application has 2 load balance servers.

I tried using the <executions/> structure like I do when running ws-import
but it doesn't seem to support that.

Is there another way to easily handle deployments to multiple servers with
this plugin?  If not, what would it take to support executions?  Here is
what I tried.


 <profile>
      <id>deploy-stage</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat6-maven-plugin</artifactId>
            <version>2.0-SNAPSHOT</version>
            <executions>
              <execution>
                <id>stage01</id>
                <configuration>
                  <mode>war</mode>
                  <url>http://10.12.4.1/manager</url>
                  <failOnError>true</failOnError>
                  <charset>UTF-8</charset>
                  <uriEncoding>UTF-8</uriEncoding>
                  <protocol>HTTP/1.1</protocol>
                  <update>true</update>
                  <server>stage01</server>
                </configuration>
              </execution>
              <execution>
                <id>stage06</id>
                <configuration>
                  <mode>war</mode>
                  <url>http://10.12.4.6/manager</url>
                  <failOnError>true</failOnError>
                  <charset>UTF-8</charset>
                  <uriEncoding>UTF-8</uriEncoding>
                  <protocol>HTTP/1.1</protocol>
                  <update>true</update>
                  <server>stage06</server>
                </configuration>
              </execution>
            </executions>
          </plugin>
--
Jeff Vincent
[hidden email]
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: tomcat maven plugin deploy to multiple tomcat instances...

olamy
Do that work adding in the <execution> section:

<goals>
  <goal>deploy</goal>
</goals>

?

2012/4/19 Jeff <[hidden email]>:

> (Didn't see a specific mailing list for the tomcat-maven-plugin...)
>
> I finally got the 2.0-SNAPSHOT version of the tomcat6-maven-plugin working
> against a single server, but wondered how I could configure it to push to
> multiple tomcat instances based on the environment.  For example, our
> staging environment for this application has 2 load balance servers.
>
> I tried using the <executions/> structure like I do when running ws-import
> but it doesn't seem to support that.
>
> Is there another way to easily handle deployments to multiple servers with
> this plugin?  If not, what would it take to support executions?  Here is
> what I tried.
>
>
>  <profile>
>      <id>deploy-stage</id>
>      <activation>
>        <activeByDefault>false</activeByDefault>
>      </activation>
>      <build>
>        <plugins>
>          <plugin>
>            <groupId>org.apache.tomcat.maven</groupId>
>            <artifactId>tomcat6-maven-plugin</artifactId>
>            <version>2.0-SNAPSHOT</version>
>            <executions>
>              <execution>
>                <id>stage01</id>
>                <configuration>
>                  <mode>war</mode>
>                  <url>http://10.12.4.1/manager</url>
>                  <failOnError>true</failOnError>
>                  <charset>UTF-8</charset>
>                  <uriEncoding>UTF-8</uriEncoding>
>                  <protocol>HTTP/1.1</protocol>
>                  <update>true</update>
>                  <server>stage01</server>
>                </configuration>
>              </execution>
>              <execution>
>                <id>stage06</id>
>                <configuration>
>                  <mode>war</mode>
>                  <url>http://10.12.4.6/manager</url>
>                  <failOnError>true</failOnError>
>                  <charset>UTF-8</charset>
>                  <uriEncoding>UTF-8</uriEncoding>
>                  <protocol>HTTP/1.1</protocol>
>                  <update>true</update>
>                  <server>stage06</server>
>                </configuration>
>              </execution>
>            </executions>
>          </plugin>
> --
> Jeff Vincent
> [hidden email]
> See my LinkedIn profile at:
> http://www.linkedin.com/in/rjeffreyvincent
> I ♥ DropBox <http://db.tt/9O6LfBX> !!



--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: tomcat maven plugin deploy to multiple tomcat instances...

Jeff-351
Finally .... getting back to this.

This does not work.  If I include the executions section, then the url
reverts back to the default http://localhost:8080 suggesting that it is not
even using the configurations embedded in the executions section.

It only seems to work if I create separate profiles and run them one at a
time.

Any other thoughts?  What are others doing to deploy to multiple servers?
On Thu, Apr 19, 2012 at 4:38 PM, Olivier Lamy <[hidden email]> wrote:

> Do that work adding in the <execution> section:
>
> <goals>
>  <goal>deploy</goal>
> </goals>
>
> ?
>
> 2012/4/19 Jeff <[hidden email]>:
> > (Didn't see a specific mailing list for the tomcat-maven-plugin...)
> >
> > I finally got the 2.0-SNAPSHOT version of the tomcat6-maven-plugin
> working
> > against a single server, but wondered how I could configure it to push to
> > multiple tomcat instances based on the environment.  For example, our
> > staging environment for this application has 2 load balance servers.
> >
> > I tried using the <executions/> structure like I do when running
> ws-import
> > but it doesn't seem to support that.
> >
> > Is there another way to easily handle deployments to multiple servers
> with
> > this plugin?  If not, what would it take to support executions?  Here is
> > what I tried.
> >
> >
> >  <profile>
> >      <id>deploy-stage</id>
> >      <activation>
> >        <activeByDefault>false</activeByDefault>
> >      </activation>
> >      <build>
> >        <plugins>
> >          <plugin>
> >            <groupId>org.apache.tomcat.maven</groupId>
> >            <artifactId>tomcat6-maven-plugin</artifactId>
> >            <version>2.0-SNAPSHOT</version>
> >            <executions>
> >              <execution>
> >                <id>stage01</id>
> >                <configuration>
> >                  <mode>war</mode>
> >                  <url>http://10.12.4.1/manager</url>
> >                  <failOnError>true</failOnError>
> >                  <charset>UTF-8</charset>
> >                  <uriEncoding>UTF-8</uriEncoding>
> >                  <protocol>HTTP/1.1</protocol>
> >                  <update>true</update>
> >                  <server>stage01</server>
> >                </configuration>
> >              </execution>
> >              <execution>
> >                <id>stage06</id>
> >                <configuration>
> >                  <mode>war</mode>
> >                  <url>http://10.12.4.6/manager</url>
> >                  <failOnError>true</failOnError>
> >                  <charset>UTF-8</charset>
> >                  <uriEncoding>UTF-8</uriEncoding>
> >                  <protocol>HTTP/1.1</protocol>
> >                  <update>true</update>
> >                  <server>stage06</server>
> >                </configuration>
> >              </execution>
> >            </executions>
> >          </plugin>
> > --
> > Jeff Vincent
> > [hidden email]
> > See my LinkedIn profile at:
> > http://www.linkedin.com/in/rjeffreyvincent
> > I ♥ DropBox <http://db.tt/9O6LfBX> !!
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>



--
Jeff Vincent
[hidden email]
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!
Loading...