2011-11-21 12 views
5

Liquibase Oracle extensionsmaven-liquibase-pluginから使用しようとしていますが、動作させることができません。私はここでMavenでLiquibase拡張機能を使用する

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ora="http://www.liquibase.org/xml/ns/dbchangelog-ext" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> 
    <changeSet author="PE1926" id="ONCHANGE" runOnChange="true"> 
    <ora:dropTrigger schemaName="" triggerName="TRIGGER_01"/> 
    <rollback> 
     <sqlFile path="latest/trg/TRIGGER_01.sql" endDelimiter="$"/> 
    </rollback> 
</changeSet> 

を使用しているのchangelogファイルがある

SEVERE 21/11/11 14:49:liquibase: Error thrown as a SAXException: Unknown Liquibase extension: dropTrigger. Are you missing a jar from your classpath? 

を私はコマンドラインから同じのChangeLogファイルとは、問題を持っていませんが、Mavenの中で私は、次のエラーメッセージが表示されますpom.xmlエキス

[...] 
<dependencies> 
    <dependency> 
     <groupId>com.oracle</groupId> 
     <artifactId>ojdbc14</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.liquibase.ext</groupId> 
     <artifactId>liquibase-oracle</artifactId> 
     <version>1.2.0</version> 
    </dependency> 
</dependencies> 

<build> 
    <plugins>  
     <plugin> 
      <groupId>org.liquibase</groupId> 
      <artifactId>liquibase-maven-plugin</artifactId> 
      <version>2.0.3</version> 
      <executions> 
       <execution> 
        <phase>process-resources</phase> 
        <goals><goal>status</goal></goals> 
       </execution> 
      </executions> 
      <configuration> 
       <changeLogFile>src/main/resources/update.xml</changeLogFile>  
       <propertyFile>${db-resources.dir}/liquibase.properties</propertyFile> 
       <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase> 
       <verbose>true</verbose> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

私はまた、プラグインの依存関係としてLiquiBaseを-神託を追加しようとしましたが、私は同じエラーメッセージが表示されます。

これはMavenのからLiquiBaseを拡張を使用する正しい方法は何ですか?何か不足していますか?

+0

私はしかし、あなたが 'dependencies'セクションを追加していたプラグインの依存関係を表現するためにLiquiBaseをユーザないです**内** 'plugin'要素です。 –

+0

私がliquibase-oracleをプラグインの依存関係として追加してみました。しかし、私は、プラグインの依存関係として、それらのすべてを追加しようとしました、動作しているようです。私が受け入れる答えを書いてもらえますか? – fglez

+0

はビットで行うのでしょう。 –

答えて

7

プラグインの依存関係として、すべてのLiquiBaseを依存関係を追加します。

+0

愚かなシンプルな...私はそれを考え出すべきだったが、それは遅く、私はあまりコーヒーを持っていた。ありがとう! –

0

私は、他の依存関係を追加する必要はありませんでした - これが私のためにそれをやった:

<pluginManagement> 
    <plugin> 
    <groupId>org.liquibase</groupId> 
    <artifactId>liquibase-maven-plugin</artifactId> 
    <version>${version.liquibase}</version> 
    <configuration> 
     <propertyFileWillOverride>true</propertyFileWillOverride> 
     <driver>oracle.jdbc.OracleDriver</driver> 
     <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase> 
     <changeLogFile>liquibase-master-changelog.xml</changeLogFile> 
     <!-- ensure a liquibase.properties is available in each module that runs liquibase --> 
     <propertyFile>liquibase.properties</propertyFile> 
    </configuration> 
    <dependencies> 
     <dependency> 
     <groupId>org.liquibase.ext</groupId> 
     <artifactId>liquibase-oracle</artifactId> 
     <version>${version.liquibase.ora-ext}</version> 
     </dependency> 
    </dependencies> 
    <executions> 
     <execution> 
     <phase>test-compile</phase> 
     <goals> 
      <goal>update</goal> 
     </goals> 
     </execution> 
    </executions> 
    </plugin> 
</pluginManagement> 
+0

あなたは、プラグインの依存関係など、すべてのLiquiBaseを依存関係を追加しました。 http://stackoverflow.com/a/8215645/33622を参照してください。 – fglez

関連する問題