简体   繁体   中英

maven assembly how to add a zip flie from nexus repository to the build

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.

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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM