maven 一個模塊生成多個jar包

爲了便於將一個模塊中的接口提供給調用方,須要將部分pakage(interface、dto)單獨打包,可是不包括impl類maven

<build>
<sourceDirectory>src</sourceDirectory>
<!--<testSourceDirectory>testSrc</testSourceDirectory>-->

<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>server</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
<configuration>
<classifier>interface</classifier>
<includes>
<include>**/interface/**</include>
</includes>
</configuration>
</execution>
<execution>
<id>client</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
<configuration>
<classifier>all</classifier>
<includes>
<include>**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
相關文章
相關標籤/搜索