You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Artie Peshimam <ap...@gmail.com> on 2012/01/05 19:24:34 UTC

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>

RE: Trying to get multiple profiles to execute

Posted by Matt Walsh <mw...@chartwelltechnology.com>.
You may want to read this article:

http://maven.apache.org/guides/mini/guide-default-execution-ids.html


> -----Original Message-----
> From: Matt Walsh [mailto:mwalsh@chartwelltechnology.com]
> Sent: Monday, January 09, 2012 10:58 AM
> To: Maven Users List
> Subject: RE: Trying to get multiple profiles to execute
> 
> Change one of your ids to "default-cli".
> 
> > -----Original Message-----
> > From: Artie Peshimam [mailto:apeshimam@gmail.com]
> > Sent: Monday, January 09, 2012 10:43 AM
> > To: Maven Users List
> > Subject: Re: Trying to get multiple profiles to execute
> >
> > Hmm tried that and the plugin complained that it could not find the
> > configs:
> > [ERROR] Failed to execute goal
> > com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update (default-cli) on
> > project
> > Core2DB: The parameters 'driver' for goal
> > com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update are missing or
> invalid
> > ->
> > [Help 1]
> >
> > <?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>
> >                                 <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>
> >                             </execution>
> >                         </executions>
> >                         <groupId>com.dbdeploy</groupId>
> >                         <artifactId>maven-dbdeploy-
> plugin</artifactId>
> >                         <version>3.0M3</version>
> >
> >                         <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>
> >                                 <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>
> >                             </execution>
> >                         </executions>
> >                         <groupId>com.dbdeploy</groupId>
> >                         <artifactId>maven-dbdeploy-
> plugin</artifactId>
> >                         <version>3.0M3</version>
> >                         <dependencies>
> >                             <dependency>
> >                                 <groupId>mysql</groupId>
> >
> > <artifactId>mysql-connector-java</artifactId>
> >                                 <version>5.1.6</version>
> >                             </dependency>
> >                         </dependencies>
> >                     </plugin>
> >                 </plugins>
> >             </build>
> >         </profile>
> >     </profiles>
> > </project>
> >
> >
> > On Thu, Jan 5, 2012 at 2:57 PM, Matt Walsh
> > <mw...@chartwelltechnology.com>wrote:
> >
> > > You might be getting conflicts in your configuration. Try moving
> your
> > > configurations inside the <execution/> blocks.
> > >
> > > > -----Original Message-----
> > > > From: Artie Peshimam [mailto:apeshimam@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-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> 
> ______________________________________________________________________
> 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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


______________________________________________________________________
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Trying to get multiple profiles to execute

Posted by Matt Walsh <mw...@chartwelltechnology.com>.
Change one of your ids to "default-cli".

> -----Original Message-----
> From: Artie Peshimam [mailto:apeshimam@gmail.com]
> Sent: Monday, January 09, 2012 10:43 AM
> To: Maven Users List
> Subject: Re: Trying to get multiple profiles to execute
> 
> Hmm tried that and the plugin complained that it could not find the
> configs:
> [ERROR] Failed to execute goal
> com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update (default-cli) on
> project
> Core2DB: The parameters 'driver' for goal
> com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update are missing or invalid
> ->
> [Help 1]
> 
> <?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>
>                                 <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>
>                             </execution>
>                         </executions>
>                         <groupId>com.dbdeploy</groupId>
>                         <artifactId>maven-dbdeploy-plugin</artifactId>
>                         <version>3.0M3</version>
> 
>                         <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>
>                                 <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>
>                             </execution>
>                         </executions>
>                         <groupId>com.dbdeploy</groupId>
>                         <artifactId>maven-dbdeploy-plugin</artifactId>
>                         <version>3.0M3</version>
>                         <dependencies>
>                             <dependency>
>                                 <groupId>mysql</groupId>
> 
> <artifactId>mysql-connector-java</artifactId>
>                                 <version>5.1.6</version>
>                             </dependency>
>                         </dependencies>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
> </project>
> 
> 
> On Thu, Jan 5, 2012 at 2:57 PM, Matt Walsh
> <mw...@chartwelltechnology.com>wrote:
> 
> > You might be getting conflicts in your configuration. Try moving
your
> > configurations inside the <execution/> blocks.
> >
> > > -----Original Message-----
> > > From: Artie Peshimam [mailto:apeshimam@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-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >

______________________________________________________________________
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Trying to get multiple profiles to execute

Posted by Artie Peshimam <ap...@gmail.com>.
Hmm tried that and the plugin complained that it could not find the
configs:
[ERROR] Failed to execute goal
com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update (default-cli) on project
Core2DB: The parameters 'driver' for goal
com.dbdeploy:maven-dbdeploy-plugin:3.0M3:update are missing or invalid ->
[Help 1]

<?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>
                                <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>
                            </execution>
                        </executions>
                        <groupId>com.dbdeploy</groupId>
                        <artifactId>maven-dbdeploy-plugin</artifactId>
                        <version>3.0M3</version>

                        <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>
                                <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>
                            </execution>
                        </executions>
                        <groupId>com.dbdeploy</groupId>
                        <artifactId>maven-dbdeploy-plugin</artifactId>
                        <version>3.0M3</version>
                        <dependencies>
                            <dependency>
                                <groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>
                                <version>5.1.6</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


On Thu, Jan 5, 2012 at 2:57 PM, Matt Walsh
<mw...@chartwelltechnology.com>wrote:

> You might be getting conflicts in your configuration. Try moving your
> configurations inside the <execution/> blocks.
>
> > -----Original Message-----
> > From: Artie Peshimam [mailto:apeshimam@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Trying to get multiple profiles to execute

Posted by Matt Walsh <mw...@chartwelltechnology.com>.
You might be getting conflicts in your configuration. Try moving your
configurations inside the <execution/> blocks.

> -----Original Message-----
> From: Artie Peshimam [mailto:apeshimam@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org