Domanda

I am trying to include a zip file from nexus repository to my project during packaging using the maven assembly plugin. This zip file has YAJSW and other custom scripts. The maven assembly can build a tar.gz package now, but how do I include a zip file from nexus repository. There is a pom for that zip file. Should I just include that as dependency? Is this the correct plugin or should I use another plugin.

Thanks.

È stato utile?

Soluzione

Add the dependency of the zip file like the following:

The following is an example for archive which has been created by maven-assembly-plugin:

<dependency>
  <groupId>the.group.id</groupId>
  <artifactId>the-artifactid</artifactId>
  <version>1.0</version>
  <type>tar.gz</type>
  <cassifier>bin-unix</classifier>
</dependency>

<dependency>
  <groupId>the.group.id</groupId>
  <artifactId>the-artifactid</artifactId>
  <version>1.0</version>
  <type>zip</type>
  <cassifier>bin</classifier>
</dependency>

The classifier in those cases is comming from the assembly-decscriptor-id in the project which creates the archive. Apart from that it is important to define the type.

Altri suggerimenti

Add a dependency to the zip with the respective GAV (group/artifactId/version).

(Without seeing your pom.xml it's a bit hard to say more).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top