It looks like you have a pom project, but have declared to use the project's
artifact. A pom project only have the pom artifact, so that might be the
reason of the error message. Try declaring useProjectArtifact as false.

/Anders

On Tue, Jan 11, 2011 at 22:43, jaybytez <[email protected]> wrote:

>
> Thanks...I went through the example and created a bin.xml that represented
> the jar-with-dependencies example.
>
> <assembly
> xmlns="
> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:schemaLocation="
> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
> http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
>  <!-- TODO: a jarjar format would be better -->
>  <id>jar-with-dependencies</id>
>  <formats>
>    <format>jar</format>
>  </formats>
>  <includeBaseDirectory>false</includeBaseDirectory>
>  <dependencySets>
>    <dependencySet>
>      <outputDirectory>/</outputDirectory>
>      <useProjectArtifact>true</useProjectArtifact>
>      <unpack>true</unpack>
>      <scope>runtime</scope>
>    </dependencySet>
>  </dependencySets>
> </assembly>
>
> And it throws an error when I try this with a sample pom.
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Cookbook :: generate-assembly
> [INFO]    task-segment: [package]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [WARNING] DEPRECATED [descriptor]: Please use descriptors instead
> [INFO] [assembly:single {execution: default}]
> [WARNING] Cannot include project artifact:
> org.apache.maven.cookbook:generate-assembly:pom:1.0-SNAPSHOT; it doesn't
> have an associated file or directory.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to create assembly: Error creating assembly archive
> jar-with-dependencies: You must set at least one file.
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Tue Jan 11 13:42:25 PST 2011
> [INFO] Final Memory: 11M/28M
> [INFO]
> ------------------------------------------------------------------------
>
> Any thoughts?....thanks...jay
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3337379.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to