我正在打包一个 ejb,我需要将一些依赖项中的 .classes 包含到 jar 中,我正在尝试使用maven-dependency-plugin解压工件并将文件放入我的${project.build.directory }/classes包阶段的目录,但是当我执行mvn package时,我没有看到任何日志或对 maven-dependency-plugin 的引用(没有任何反应),我什至尝试放置无效版本的插件,它甚至没有抛出异常。
在我的 pom.xml 下面
....
<packaging>ejb</packaging>
<name>myapp</name>
...repository and props
<build>
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.myapp</groupId>
<artifactId>model</artifactId>
<version>1.0.0</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<includes>**/shared/*.class</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.myapp</groupId>
<artifactId>model</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
我错过了什么?
PS:工件模型安装在本地仓库中,我也尝试过其他阶段。