开发者

maven2 use libs in a specific folder during compilation

In my project structure there is a folder called /libs which contains all necessary libraries, that my project need during compilation. Is it possible that I told maven2 during the process of compilation to use these libraries instead of depend开发者_运维百科encies or smth. else?

So I call mvn compile war:war and after that my .war contains the libraries out of the /libs folder.

BR, mybecks


I suppose you are looking for System Dependencies like

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>foo</groupId>
      <artifactId>bar</artifactId>
      <version>2.0.0</version>
      <scope>system</scope>
      <systemPath>${project.basedir}/libs/foo-bar-2.0.0.jar</systemPath>
    </dependency>
  </dependencies>
  ...
</project>

System dependencies will not be copied into the war file - maybe you can achiev this by putting them into src/main/webapp/WEB-INF/lib directory instead of ${project.basedir}/libs.

DISCLAIMER: I just tried to answer the question and do not recommend the solution for all dependencies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜