0
내 jar 파일에서 특정 종속성 (기본적으로 특정 이행 종속성 포함) 클래스를 포함 할 수 있도록 maven 어셈블리 플러그인을 사용하고 있습니다. .maven 어셈블리 플러그인에 특정 종속성 포함
이 링크 http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html 에서 가능하다 같이 그러나 곧 코드 아래 언급 종속성의 두 가지 유형 com.companyA * 및 com.companyB을 포함하도록<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
이 보이는 - 여기 pom.xml
에서 내 관련 코드입니다. * 그 제외하고 나는 다른 모든 종속
<dependencySets>
<dependencySet>
<includes>
<include>com.companyA.*</include>
<include>com.companyB.*</include>
</includes>
</dependencySet>
</dependencySets>
그러나 pom.xml
이 dependencySets에 대한 잘못된 내용을 말한다 제외하고 싶지 않아요. 여기서 어떻게 목표를 달성 할 수 있을지 모르겠다.
bin
폴더에 com.mypkg
모든 것을 복사하는 것이 경우에는 너무 <dependencySet>
<outputDirectory>lib</outputDirectory>
<scope>runtime</scope>
<excludes>
<exclude>com.mypkg.*:*</exclude>
</excludes>
</dependencySet>
<dependencySet>
<outputDirectory>bin</outputDirectory>
<scope>runtime</scope>
<includes>
<include>com.mypkg.*:*</include>
</includes>
</dependencySet>
처럼 상호 배타적 인 패턴이 개 <dependencySet>
항목을 사용하고, 모든 것을하지 com.mypkg
lib
폴더에