Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的packge-info.java一个包中有一个文件。它包含一些包广泛使用的注释。
packge-info.java
如何将对应package-info.class的文件添加到 ShrinkWrap 存档?
package-info.class
好的,我找到了以下解决方案:
archive.addPackages(false, new Filter<ArchivePath>() { @Override public boolean include(ArchivePath path) { return path.get().endsWith("package-info.class"); } }, SDMEventBroadcaster.class.getPackage());
它符合我的预期,但如果有一个没有过滤器的解决方案会很好。