0

I'm new to Apache Maven and would like to know a way to create a windows cabinet file as part of the maven build life cycle.

I was hoping there would be a plugin for the task, but can't seem to locate one.

Help appreciated.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
garyM
  • 802
  • 2
  • 12
  • 29

1 Answers1

0

Edit: It looks like the Ant Cab task relies on a dependency that no longer exists. Other resources point to using a Cab creator written in Java, the lcab tool if you're on Linux, or makecab.exe on Windows. Another option would be to use a zip file, which is more widely supported.

What you're looking for the AntRun plugin for Maven, which will then give you access to the Ant Cab task.

Here is an untested example of what you would add to your POM in the plugins section:

<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <id>ant-example</id>
        <phase>prepare-package</phase>
        <goals>
          <goal>run</goal>
        </goals>
        <configuration>
          <tasks>
            <cab cabfile="target/example.cab" basedir="deploy/folder"/>
          </tasks>
        </configuration>
      </execution>
    </executions>
  </plugin>
jaydez
  • 153
  • 8
  • jadez, This functionality is broken in ant. It looks like I need to refactor ant's cab.java file. – garyM Apr 03 '16 at 04:40
  • That is unfortunate. There are some other tools out there for creating cab files, but they don't appear to work directly with Maven. – jaydez Apr 04 '16 at 17:13