2 回答
TA贡献1772条经验 获得超6个赞
我会像你一样尝试它......但也许资源插件在实际应用之前扩展了它的“包含”方式(这将是耻辱)。但我不知道,我会尝试在日志中追踪它。
如果您无法完成这项工作,您仍然可以通过 maven antrun 插件使用旧的 Ant 复制目标
TA贡献1866条经验 获得超5个赞
起初我尝试使用这个:
<plugin>
<!-- copy jarfiles straight to ../server/plugins so we can test
the plugin without having to move them ourselves -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>${basedir}/../server/plugins</outputDirectory>
</configuration>
</plugin>
但它不适用于 jar-with-dependencies。
所以现在我用这个:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<target>
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" todir="${project.basedir}/../jarfiles" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
添加回答
举报
