You might be getting conflicts in your configuration. Try moving your
configurations inside the <execution/> blocks.

> -----Original Message-----
> From: Artie Peshimam [mailto:apeshi...@gmail.com]
> Sent: Thursday, January 05, 2012 11:25 AM
> To: users@maven.apache.org
> Subject: Trying to get multiple profiles to execute
> 
> Hi All,
> 
> Im trying to get multiple maven profiles to execute, but am having no
> success.
> It's very straight forward. I have two profiles executing the same
> plugin
> with a slight variation in configuration and each has a unique
> execution
> Id. When I try to execute maven, only one of the profiles actually is
> run.
> 
> Ideas?
> 
> Here's my POM:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>com.cx</groupId>
>     <artifactId>Core2DB</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <profiles>
>         <profile>
> 
> <activation><activeByDefault>true</activeByDefault></activation>
>             <id>core2DB</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <executions>
>                             <execution>
>                                 <id>core2DB</id>
>                             </execution>
>                         </executions>
>                         <groupId>com.dbdeploy</groupId>
>                         <artifactId>maven-dbdeploy-plugin</artifactId>
>                         <version>3.0M3</version>
>                         <configuration>
>                             <scriptdirectory>scripts</scriptdirectory>
>                             <driver>com.mysql.jdbc.Driver</driver>
>                             <dbms>mysql</dbms>
>                             <outputfile>up_migrations.sql</outputfile>
> 
> <undoOutputfile>down_migrations.sql</undoOutputfile>
>                             <url>jdbc:mysql://localhost/cxc2</url>
>                         </configuration>
>                         <dependencies>
>                             <dependency>
>                                 <groupId>mysql</groupId>
> 
> <artifactId>mysql-connector-java</artifactId>
>                                 <version>5.1.6</version>
>                             </dependency>
>                         </dependencies>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>         <profile>
>             <id>activityDB</id>
> 
> <activation><activeByDefault>true</activeByDefault></activation>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <executions>
>                             <execution>
>                                 <id>activityDB</id>
>                             </execution>
>                         </executions>
>                         <groupId>com.dbdeploy</groupId>
>                         <artifactId>maven-dbdeploy-plugin</artifactId>
>                         <version>3.0M3</version>
>                         <configuration>
> 
> <scriptdirectory>activityDBScripts</scriptdirectory>
>                             <driver>com.mysql.jdbc.Driver</driver>
>                             <dbms>mysql</dbms>
>                             <outputfile>up_migrations.sql</outputfile>
> 
> <undoOutputfile>down_migrations.sql</undoOutputfile>
>                             <url>jdbc:mysql://localhost/activity</url>
>                         </configuration>
>                         <dependencies>
>                             <dependency>
>                                 <groupId>mysql</groupId>
> 
> <artifactId>mysql-connector-java</artifactId>
>                                 <version>5.1.6</version>
>                             </dependency>
>                         </dependencies>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
> </project>

______________________________________________________________________
This message, including any attachments, is confidential and contains 
information intended only for the person(s) named above. Any other 
distribution, copying or disclosure is strictly prohibited. If you are not the 
intended recipient or have received this message in error, please notify us 
immediately by reply email and permanently delete the original transmission 
from all of your systems and hard drives, including any attachments, without 
making a copy.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to