简体   繁体   English

如何自定义m2e-wtp部署?

[英]How to customize m2e-wtp deployment?

In my project, I have some aar dependencies. 在我的项目中,我有一些依赖。 I don't want deploy these aar files into the WEB-INF/lib folder. 我不想将这些aar文件部署到WEB-INF / lib文件夹中。 I want to deploy them in some other folders. 我想将它们部署在其他一些文件夹中。 But I can't find where to set the m2e-wtp plugin do this. 但是我找不到在哪里设置m2e-wtp插件。

My pom file is like: 我的pom文件就像:

<dependency>
  <groupId>my.group</groupId>
  <artifactId>my-soap</artifactId>
  <type>aar</type>
  <version>1.0.0</version>
</dependency>

This should work: 这应该工作:

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.6</version>
  <configuration>
  <webResources>
    <webResource>
   <directory>${settings.localRepository}/my.group/my-soap/1.0.0/</directory>
    <targetPath>destination/folder</targetPath><!-- optional, will deploy at the root of the webapp by default-->
    <includes>
      <include>*.aar</include>
    </includes>
   </webResource>
  </webResources>
 </configuration>
</plugin>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM