tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bin Lan <lan...@gmail.com>
Subject Re: contextFile does not work with profiles?
Date Mon, 07 Nov 2011 14:22:37 GMT
Hi All,

Sorry, please ignore this, the option is working. I put the wrong path.

Regards
Bin



On Mon, Nov 7, 2011 at 9:18 AM, Bin Lan <lanbin@gmail.com> wrote:

> Hi All,
>
> I am trying to use tomcat maven plugin with different profiles to get
> different JNDI parameters so I can connect to different database. But the
> plugin seems to ignore the <contextFile> on the profile section. Here is
> some snapshots of my configuration:
>
>     <profiles>
>         <profile>
>             <id>production</id>
>
> <activation><activeByDefault>true</activeByDefault></activation>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-war-plugin</artifactId>
>                         <configuration>
>
> <containerConfigXML>${basedir}WebContent/META-INF/production/context.xml</containerConfigXML>
>                         </configuration>
>                     </plugin>
>                     <plugin>
>                         <groupId>org.apache.tomcat.maven</groupId>
>                         <artifactId>tomcat6-maven-plugin</artifactId>
>                         <configuration>
>
> <contextFile>WebContent/WEB-INF/production/context.xml</contextFile>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>         <profile>
>             <id>staging</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-war-plugin</artifactId>
>                         <configuration>
>
> <containerConfigXML>WebContent/META-INF/staging/context.xml</containerConfigXML>
>                         </configuration>
>                     </plugin>
>                     <plugin>
>                         <groupId>org.apache.tomcat.maven</groupId>
>                         <artifactId>tomcat6-maven-plugin</artifactId>
>                         <configuration>
>
> <contextFile>WebContent/WEB-INF/staging/context.xml</contextFile>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>         <profile>
>             <id>development</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-war-plugin</artifactId>
>                         <configuration>
>
> <containerConfigXML>WebContent/META-INF/development/context.xml</containerConfigXML>
>                         </configuration>
>                     </plugin>
>                     <plugin>
>                         <groupId>org.apache.tomcat.maven</groupId>
>                         <artifactId>tomcat6-maven-plugin</artifactId>
>                         <configuration>
>
> <contextFile>WebContent/WEB-INF/development/context.xml</contextFile>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
>
>
> Here is for tomcat plugin:
>
>               <plugin>
>                   <groupId>org.apache.tomcat.maven</groupId>
>                   <artifactId>tomcat6-maven-plugin</artifactId>
>                   <version>2.0-SNAPSHOT</version>
>                   <configuration>
>
> <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
>                       <contextReloadable>true</contextReloadable>
>                   </configuration>
>             </plugin>
>
>
> Any suggestions?
>
> Regards
> Bin
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message