Hi I'm trying to create an assembly descriptor with modules, but the build always fails with an error saying that the artifact "does not have an artifact with a file". I found many references to this error when running as part of the lifecycle, but for me it doesn't work even manually.
my assembly descriptor looks like this:
<assembly>
<id>cli-bin</id>
<formats>
<format>tar.gz</format>
</formats>
<moduleSets>
<moduleSet>
<includes>
<include>org.babysnakes.jibuy:cli</include>
<include>org.babysnakes.jibuy:core</include>
</includes>
<binaries>
<includeDependencies>true</includeDependencies>
<outputDirectory>lib</outputDirectory>
</binaries>
</moduleSet>
</moduleSets>
<files>
<file>
<source>files/jibuy.sh</source>
<outputDirectory>bin</outputDirectory>
<destName>jibuy</destName>
<lineEnding>unix</lineEnding>
<fileMode>0754</fileMode>
</file>
<file>
<source>files/logback.xml</source>
<outputDirectory>etc</outputDirectory>
<lineEnding>unix</lineEnding>
</file>
</files>
</assembly>
The plugin section of the pom.xml looks like this:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/main/assemblies/cli.xml</descriptor>
</configuration>
</plugin>
and here is the output from the build command. notice that the artifact
exists (the output from the first command):
[EMAIL PROTECTED]:~/projects/jibuy$ ls core/target/core-0.2.jar
core/target/core-0.2.jar
[EMAIL PROTECTED]:~/projects/jibuy$ mvn -e assembly:assembly
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] jibuy - Backup System
[INFO] jibuy - CommandLine Interface
[INFO] jibuy - Core Libraries
[INFO] Searching repository for plugin with prefix: 'assembly'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building jibuy - Backup System
[INFO] task-segment: [assembly:assembly] (aggregator-style)
[INFO]
----------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO]
----------------------------------------------------------------------------
[INFO] Building jibuy - Backup System
[INFO]
----------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO]
----------------------------------------------------------------------------
[INFO] Building jibuy - CommandLine Interface
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [jar:jar]
[INFO] Building jar: /home/haim/projects/jibuy/cli/target/cli-0.2.jar
[INFO]
----------------------------------------------------------------------------
[INFO] Building jibuy - Core Libraries
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [jar:jar]
[INFO] Building jar: /home/haim/projects/jibuy/core/target/core-0.2.jar
[WARNING] DEPRECATED [descriptor]: Please use descriptors instead
[INFO] [assembly:assembly]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to create assembly: Artifact:
org.babysnakes.jibuy:core:jar:0.2 (included by module) does not have an
artifact with a file. Please ensure the package phase is run before the
assembly is generated.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to create
assembly: Artifact: org.babysnakes.jibuy:core:jar:0.2 (included by
module) does not have an artifact with a file. Please ensure the package
phase is run before the assembly is generated.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
create assembly: Artifact: org.babysnakes.jibuy:core:jar:0.2 (included
by module) does not have an artifact with a file. Please ensure the
package phase is run before the assembly is generated.
at
org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:302)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
Caused by:
org.apache.maven.plugin.assembly.archive.ArchiveCreationException:
Artifact: org.babysnakes.jibuy:core:jar:0.2 (included by module) does
not have an artifact with a file. Please ensure the package phase is run
before the assembly is generated.
at
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.addArtifact(ModuleSetAssemblyPhase.java:230)
at
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.addModuleBinaries(ModuleSetAssemblyPhase.java:159)
at
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.execute(ModuleSetAssemblyPhase.java:91)
at
org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:98)
at
org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
... 18 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun Jun 24 12:03:37 IDT 2007
[INFO] Final Memory: 12M/78M
[INFO]
------------------------------------------------------------------------
[EMAIL PROTECTED]:~/projects/jibuy$
Any ideas?
--
Haim
signature.asc
Description: This is a digitally signed message part
