Project

General

Profile

Actions

Bug #218

closed

Android client build fails on Windows when proguard is enabled

Added by Dirk Petrautzki about 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
04/11/2013
Due date:
% Done:

0%

Estimated time:
Reviewer:
Build Version:

Description

When proguard is enabled building the Android client fails because the command line used to execute proguard is too long for Windows systems.

Shortened output:
[INFO] C:\Program Files\Java\jdk1.7.0_02\jre\bin\java [-Xmx512M, -jar, C:\Program Files (x86)\Android\android-sdk\tools\proguard\lib\proguard.jar, @proguard.cfg, -injars, 'C:\Users\Dirk\git\ecard-client\clients\android\target\classes', -injars, C:\Users\Dirk\.m2\repository\org\openecard\common\1.1.0-SNAPSHOT\common-1.1.0-SNAPSHOT.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF), .......
[INFO] Die Befehlszeile ist zu lang.

Maximum length for command lines on Windows systems (XP and higher) is 8191 characters but the generated command line is about 500 characters longer.

Actions #1

Updated by Tobias Wich about 11 years ago

Is it possible to raise this ridiculously low limit?
Bash gives me a much higher and more useful limit.

$ getconf ARG_MAX
2097152

I guess it would be pretty hard to shorten the proguard command. When new modules are added it even grows bigger.
It is probably best to add a Quirks section to the INSTALL file and provide a Windows workaround to raise the command size.

Actions #2

Updated by Dirk Petrautzki about 11 years ago

I don't see a way to raise the limit. Microsoft gives Information and suggests solutions under http://support.microsoft.com/kb/830473, but i think none of the solutions are usable here.

Actions #3

Updated by Tobias Wich about 11 years ago

The Plugin uses com.jayway.maven.plugins.android.CommandExecutor (the default implementation which is also in this file). The command is then executed via org.codehaus.plexus.util.cli.CommandLine which in fact uses cmd.exe to run the command.

I see a two options here:

The first one is of course preferable, because it does not involve patching plugins.
Proguard is optional and only enabled in the release profile. So option 3 is ok for me, too.

Actions #4

Updated by Tobias Wich about 10 years ago

  • Target version set to 1.1.0

Option 3 is used.

Actions #5

Updated by Tobias Wich about 10 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF