Mam wielomodułowy projekt maven i próbuję uruchomić modułową część źródłową wtyczki zespołu.Instrukcje źródeł modułów zestawów modułów makr montażu nie zawierają żadnych plików i nie pasują do dołączonych modułów.
Mam modułów "module_parent", "module_a" i "module_assembly".
module_a i module_assembly są dziećmi module_parent.
module_assembly ma deklarowaną zależność pom na module_a.
module_assmebly ma wtyczki montażowej, z assembly.xml patrząc jak:
<?xml version="1.0"?>
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.mystuff:module_a</include>
</includes>
<sources>
<fileSets>
<fileSet>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>**/target/**</exclude>
</excludes>
<directory>/</directory>
</fileSet>
</fileSets>
</sources>
</moduleSet>
</moduleSets>
</assembly> <!-- -->
mam wyraźnego uzależnienia w module_assembly dla module_a. Zależność w pom module_assembly wygląda następująco:
<dependencies>
<dependency>
<groupId>com.mystuff</groupId>
<artifactId>module_a</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
Błąd otrzymuję od pakietu mvn z debugowanie włączone jest:
[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
<snip>
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] ------------------------------------------------------------------------
<snip>
[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.
Myślę, że głównym problemem jest to linia ostrzeżenie:
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o 'com.mystuff:module_a'
Jak mogę to poprawić?
Czy pom.xml dla module_assembly mają wyraźną zależność od module_a (czyli w jego '<>' Zależności strofy – noahlz
tak, ma wyraźną zależność.Załąłem to powyżej w 2. zestawie formatowania "kodu" – marathon