oracle - All maven flyway plugins are executed with the last user -


i have 2 oracle users , creating different schema them. mean each schema has different tables, types etc. wanted create both schemas flyway maven plugin, first had 2 maven plugins, tried have 2 separate profiles:

<profiles>     <profile>       <id>database</id>       <build>         <plugins>           <plugin>             <groupid>com.googlecode.flyway</groupid>             <artifactid>flyway-maven-plugin</artifactid>             <configuration>               <url>jdbc:oracle:thin:@devdb2:1521:zoomutf</url>               <table>schema_updates</table>               <outoforder>true</outoforder>               <locations>                 <location>db/callrec</location>               </locations>               <user>cr_5199_mensik_mvn</user>               <password>callrec</password>               <serverid>callrec</serverid>             </configuration>             <executions>               <execution>                 <id>compile</id>                 <phase>compile</phase>                 <goals>                   <goal>migrate</goal>                 </goals>               </execution>               <execution>                 <id>clean</id>                 <phase>clean</phase>                 <goals>                   <goal>clean</goal>                 </goals>               </execution>             </executions>           </plugin>         </plugins>       </build>     </profile>      <profile>       <id>database_wbsc</id>       <build>         <plugins>            <plugin>             <groupid>com.googlecode.flyway</groupid>             <artifactid>flyway-maven-plugin</artifactid>             <configuration>               <url>jdbc:oracle:thin:@devdb2:1521:zoomutf</url>               <table>schema_updates</table>               <outoforder>true</outoforder>               <locations>                 <location>db/wbsc</location>               </locations>               <user>sc_5199_mensik_mvn</user>               <password>wbsc</password>               <serverid>wbsc</serverid>             </configuration>             <executions>               <execution>                 <id>wbsc_compile</id>                 <phase>compile</phase>                 <goals>                   <goal>migrate</goal>                 </goals>               </execution>               <execution>                 <id>wbsc_clean</id>                 <phase>clean</phase>                 <goals>                   <goal>clean</goal>                 </goals>               </execution>             </executions>           </plugin>         </plugins>       </build>     </profile> </profiles> 

then execute:

mvn clean -pdatabase,database_wbsc 

but result second profile executed twice:

[info] [clean:clean {execution: default-clean}] [info] [flyway:clean {execution: clean}] [info] cleaned schema "sc_5199_mensik_mvn" (execution time 00:00.023s) [info] [flyway:clean {execution: wbsc_clean}] [info] cleaned schema "sc_5199_mensik_mvn" (execution time 00:00.018s) [info] ------------------------------------------------------------------------ [info] build successful [info] ------------------------------------------------------------------------ 

if switch order of profiles in xml (not in maven execution command) second user used.

how can execute both profiles configuration?

try providing configuration @ execution level rather plugin level.

            <plugin>             <executions>                 <execution>                     <id>execution1</id>                     <configuration>                     </configuration>                 </execution>                 <execution>                     <id>execution2</id>                     <configuration>                     </configuration>                 </execution>             </executions>         </plugin> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -