Skip to content

Arguments in arguments file#518

Open
IvoLimmen wants to merge 1 commit into
mojohaus:masterfrom
IvoLimmen:master
Open

Arguments in arguments file#518
IvoLimmen wants to merge 1 commit into
mojohaus:masterfrom
IvoLimmen:master

Conversation

@IvoLimmen
Copy link
Copy Markdown

My work required me to move to Windows. As it turns out Windows can not handle a command line with more than 8Kb in the cmd. In the terminal they can handle 32Kb. As it turns out my application uses 36Kb so I can not use Maven Exec.

Since Java 11 it is possible to put all arguments in a single file and use that to start the application.

For example:
File called: args

--add-opens
java.base/java.lang=ALL-UNNAMED
example.app.Main

You can then start it with:
java @args

I modified the plugin to accept an argument called argumentsFile, only meant to be using along side the exec goal, that will rewrite the arugments to a file target/commandLineArguments and replace the arguments with @target/commandLineArguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant