You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jorge Medina <ce...@gmail.com> on 2012/05/02 01:05:55 UTC

Dependency in an assembly (zip file)

Hi,

  I have a project A with multiple modules, one of the modules called
"alfa" has  "jar" <packaging> that produces a JAR file but it also
produces a ZIP file through the maven-asembly-plugin.
  In my Nexus repository I get the JAR and ZIP file as

                 alfa-X.Y.Z.jar
                 alfa-X.Y.Z-alfa.zip

   I have a second project B where I need to specify the ZIP file as a
dependency, but I can't figure how to specify this dependency. I
tried:

        <dependency>
            <groupId>com.example.projectA</groupId>
            <artifactId>alfa</artifactId>
            <type>zip</type>
            <version>X.Y.Z</version>
        </dependency>

but as I expected that looks for alfa-X.Y.Z.zip , not alfa.X.Y.Z-alfa.zip

How do I modify project A or project B to be able to specify the
dependency in the ZIP file ?
Does project A should be of "pom" packaging rather than "jar" ?


-Jorge

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Dependency in an assembly (zip file)

Posted by Jorge Medina <ce...@gmail.com>.
Never mind, adding the <classifier> with the id of the assembly from
project A does the trick:



        <dependency>
            <groupId>com.example.projectA</groupId>
            <artifactId>alfa</artifactId>
            <type>zip</type>
             <classifier>alfa</classifier>
            <version>X.Y.Z</version>
        </dependency>

On Tue, May 1, 2012 at 4:05 PM, Jorge Medina
<ce...@gmail.com> wrote:
> Hi,
>
>  I have a project A with multiple modules, one of the modules called
> "alfa" has  "jar" <packaging> that produces a JAR file but it also
> produces a ZIP file through the maven-asembly-plugin.
>  In my Nexus repository I get the JAR and ZIP file as
>
>                 alfa-X.Y.Z.jar
>                 alfa-X.Y.Z-alfa.zip
>
>   I have a second project B where I need to specify the ZIP file as a
> dependency, but I can't figure how to specify this dependency. I
> tried:
>
>        <dependency>
>            <groupId>com.example.projectA</groupId>
>            <artifactId>alfa</artifactId>
>            <type>zip</type>
>            <version>X.Y.Z</version>
>        </dependency>
>
> but as I expected that looks for alfa-X.Y.Z.zip , not alfa.X.Y.Z-alfa.zip
>
> How do I modify project A or project B to be able to specify the
> dependency in the ZIP file ?
> Does project A should be of "pom" packaging rather than "jar" ?
>
>
> -Jorge

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org