如何为ehcache构建一个jar?

时间:2016-11-08 17:35:16

标签: java maven jar ehcache

使用echache 2.7.5,我试过

mvn -Dmaven.test.skip=true package

但它制作了许多罐子:

./terracotta/bootstrap/target/ehcache-terracotta-bootstrap-2.7.5.jar
./management-ehcache/target/management-ehcache-2.7.5.jar
./ehcache-core/target/ehcache-core-2.7.5.jar
./ehcache-core/target/classes/net/sf/ehcache/pool/sizeof/sizeof-agent.jar
./ehcache-scheduled-refresh/target/ehcache-scheduled-refresh-2.7.5.jar
./ehcache/target/ehcache-2.7.5.jar
./management-ehcache-impl/ehcache-rest-agent/target/ehcache-rest-agent-2.7.5.jar
./management-ehcache-impl/ehcache-rest-agent/target/original-ehcache-rest-agent-2.7.5.jar
./management-ehcache-impl/management-ehcache-impl/target/management-ehcache-impl-2.7.5.jar

./ehcache/target/ehcache-2.7.5.jar

不包含任何类文件。

如何定位单个jar?

1 个答案:

答案 0 :(得分:1)

Ehcache构建使用配置文件来构建其阴影jar。该个人资料名为fullmode,需要激活:-Pfullmode

默认值为devmode,它不执行着色,而是生成具有适当传递依赖性的pom文件。这背后的逻辑是希望测试内部组件更改而不必每次都重建完整jar的开发人员的构建时间更快。