0

I'm using ant through maven. I want to create cab files using ant, but ant seems to use the cabarc.exe tool. Microsoft no longer supports the Cabinet SDK and the cabarc tool.

Is there another way to have ant create a cab file ?

garyM
  • 802
  • 2
  • 12
  • 29
  • If you know how to create a cab archive using any other tool, `exec` can be used. – Stefan Bodewig Apr 02 '16 at 16:52
  • Its painful to the create file list to feed into the MakeCab.exe. I'll do that this week, but I'll just refactor cab.java to support the new util :) – garyM Apr 03 '16 at 04:38
  • Writing a task is certainly more work. My suggestion to use `exec` was meant to for a one-off situation where you don't want to invest time in writing a task. Kudos for doing so and wanting to share the results. – Stefan Bodewig Apr 03 '16 at 05:10

1 Answers1

0

Digging into the source ad the build system, the answer is no. The cab.java file is compiled to cab.class, but the creation of the jar file does not occur. I believe the optional library was removed from the build due to EOL of M$'s Cabinet SDK.

garyM
  • 802
  • 2
  • 12
  • 29
  • No, that's wrong. The cab class is part of `ant.jar`. – Stefan Bodewig Apr 02 '16 at 16:51
  • Hi Stefan, I got error: Problem: failed to create task or type cab Cause: the class org.apache.tools.ant.taskdefs.optional.Cab was not found. I'm assuming 'not found' means 'not found' as in removed. – garyM Apr 03 '16 at 04:31
  • I've just taken the official Ant 1.9.5 binary, created a build file with just `` inside and get an error that I need to specify `basedir` or nested `fileset`s. The task has really not been removed, it is part of the Ant distribution. If the Ant community removes a task (which happens rarely, the .NET tasks are an example), the task also gets removed from the manual. – Stefan Bodewig Apr 03 '16 at 05:08
  • Thanks!! That was the reason for my comment on the email list about meaningful error reporting. I'll try to make time this week to start the refactor. – garyM Apr 03 '16 at 06:59