0

I have a very simple project which I want to be packaged as a .rar. Now, I'm using the maven-rar-plugin, and that works perfectly locally. When I package, I get my .rar and it's what I want. However, I have a <distributionManagement> section like this:

<distributionManagement>
   <repository>
      <id>deployment</id>
      <name>Release Repo</name>
      <url>http:// mynexus.com: 8081/nexus/content/repo/release</url>
   </repository>
</distributionManagement>

Then when I run deploy -DperformRelease='true', I get a .jar published to my nexus. Then when I include this project as a dependency in another project:

<dependency>
    <groupId>MyProject</groupId>
    <artifactId>myProject</artifactId>
    <version>v1</version>
    <type>rar</type>
</dependency>

It goes to mynexus and tries to download it but can't find it. When I browse nexus, the project is there in the releases dir, but it's a .jar in there and maven dependency fails saying the .rar isn't there

Susannah Potts
  • 837
  • 1
  • 12
  • 32
DDoomUs
  • 183
  • 9
  • I've rarely seen this out in the wild - why would you do that? – gtonic Oct 04 '16 at 17:29
  • First can you show your full pom file? – khmarbaise Oct 04 '16 at 18:35
  • 1
    @gtonic, I wanted to use someone else's .rar, but their MANIFEST.MF did not include all of the dependencies I needed. So I extracted their .rar, created a project from it, adding the dependencies I needed. But I wanted the end result to be tracked / provided by my nexus, that's why I wanted publish as .rar because my dependent project includes / deploys the .rar it gets from mynexus. – DDoomUs Oct 06 '16 at 14:03
  • @DDoomUs: cool repackaging. – gtonic Oct 06 '16 at 14:45

1 Answers1

1

In the pom.xml, add the

<packaging>rar</packaging>

element as a child of the <project> element.

This published as a .rar as desired.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
DDoomUs
  • 183
  • 9