2011-11-16 7 views
3

jdbcドライバの依存関係を持つwebappがあります。これは依存関係の範囲です。ですから、maven tomcatプラグインを使用して実行すると、ローカルには含まれません。だから、maven tomcatプラグインを使ってデバッグするときに、このプラグインをどのように組み込むことができますか?maven tomcatプラグインを使用してwebappをデバッグするときに提供されたdenpenencyを含めるにはどうすればいいですか?

おかげ

答えて

2

はこれを行う方法の1つは、Tomcatを使用してデバッグするためprofileを使用することです。これで、必要なスコープで必要な依存関係を指定できます。このような何か...

<profile> 
     <id>tomcat</id> 
     <dependencies> 
      <dependency> 
       <groupId>myGroup</groupId> 
       <artifactId>myArtifact</artifactId> 
       <version>a.b.c</version> 
      </dependency> 
     </dependencies> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>tomcat-maven-plugin</artifactId> 
        <version>1.1</version> 
       </plugin> 
      </plugins> 
     </build> 
    </profile> 
0

の代わりに直接プラグインの依存関係を指定して、私が好むプロファイルを使用して:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>tomcat-maven-plugin</artifactId> 
    <dependencies> 
     <!-- add here your JDBC drivers which appear 
      in the global dependencies with state provided --> 
    </dependencies> 
</plugin> 
関連する問題