我有一个多模块的maven项目,我正在尝试获取组件插件的moduleset源部分.
我有模块“module_parent”,“module_a”和“module_assembly”.
module_a和module_assembly是module_parent的子项.
module_assembly对module_a有一个声明的pom依赖关系.
module_assmebly具有程序集插件,assembly.xml如下所示:
bin
zip
false
true
com.mystuff:module_a
/
**/target/**
/
我对module_a的module_assembly有明确的依赖关系. module_assembly的pom中的依赖关系如下所示:
com.mystuff
module_a
1.0
pom
从mvn包中得到的错误,打开debug是:
[DEBUG] All known ContainerDescritporHandler components: [metaInf-services, plexus, metaInf-spring, file-aggregator]
[DEBUG] No dependency sets specified.
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o 'com.mystuff:module_a'
[DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.artifact.resolver.ArtifactResolver
roleHint: project-cache-aware
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:257)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:233)
at
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:3006)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
... 43 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2:single (make-assembly) on project apm-server-distribution: Failed to create assembly: Error creating assembly archive bin: You must set at least one file. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2:single (make-assembly) on project apm-server-distribution: Failed to create assembly: Error creating assembly archive bin: You must set at least one file.
我认为主要的问题是这个警告线:
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o 'com.mystuff:module_a'
我该如何更正?