开发者

Maven2 unpack include only internal files

I have the next artifact item for maven unpack

<artifactItem>
    <groupId>blabla</groupId>
    <artifactId>foo-bar</artifactId>
    <outputDirectory>${project.build.directory}/outer-resources/META-INF/wsdl/</outputDirectory>
    <includes>xsd/*</includes>
</artifactItem>

I need to copy ONLY files and subfold开发者_StackOverflow社区ers from xsd, but not xsd folder. How can I use includes/excludes to make this?


It looks like you may not be able to do this by using maven dependency plugin alone.

But you can try using a combination of maven dependency plugin and maven resource plugin to achieve this. You can use maven dependency plugin to unpack the contents of the dependency to a specific directory and then use maven resource plugin to copy the desired contents from there to another location, excluding the parent xsd folder.

You would need to ensure that both the plugins are invoked in the same phase and goal in the correct sequence.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜