首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven Mojo是否等同于ant的DirSet?

Maven Mojo是否等同于ant的DirSet?
EN

Stack Overflow用户
提问于 2015-04-01 14:14:42
回答 1查看 83关注 0票数 1

我正在提升一个ant插件到maven插件,我的ant使用了一个DirSet,我看到maven只有一个FileSet

  • 我可以使用FileSet来收集目录吗?
  • 我是否应该通过查看Ant的PatternSet - dirset代码,然后使用maven的PatternSet和或FileSet实现类似的解决方案,来创建自己的DirSet类?
  • 是否有更好的方法收集包含和排除的目录?

谢谢你的帮助

彼得

EN

回答 1

Stack Overflow用户

发布于 2015-04-01 14:31:57

Maven文件管理示例页面上找到的。

代码语言:javascript
复制
FileSetManager fileSetManager = new FileSetManager();
String[] includedFiles = fileSetManager.getIncludedFiles( fileset );
String[] includedDir = fileSetManager.getIncludedDirectories( fileset );
String[] excludedFiles = fileSetManager.getExcludedFiles( fileset );
String[] excludedDir = fileSetManager.getExcludedDirectories( fileset );
fileSetManager.delete( fileset );
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29393143

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档