【发布时间】:2009-10-31 12:34:49
【问题描述】:
作为 pom.xml 的一部分,我将一些额外的资源复制到目标目录,如下所示。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>copy-package-doc</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/package/${project.artifactId}-${project.version}/doc</outputDirectory>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
</nonFilteredFileExtensions>
<resources>
<resource>
<directory>doc</directory>
<filtering>true</filtering>
<includes>
<include>**/*.doc</include>
</includes>
<excludes>
<exclude>**/~*.doc</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-package-config</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/package/${project.artifactId}-${project.version}</outputDirectory>
<resources>
<resource>
<directory>config</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
当我打包工件时出现错误:
The PluginDescriptor for the plugin org.apache.maven.plugins:maven-resources-plugin was not found. Should have been in realm: ClassRealm[/plugins/org.apache.maven.plugins:maven-resources-plugin:2.4.1@48/thread:Worker-17, parent: null]
如何解决这个问题?为什么会出现此错误?
谢谢, 拉法尔
【问题讨论】:
标签: maven-2 maven-plugin