Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When executing native-image.cmd xx, the message 'The command line is too long' causes failure #214

Closed
moarychan opened this issue Feb 22, 2022 · 3 comments

Comments

@moarychan
Copy link

In Windows 11, I'm using Spring Native to build the Spring Cloud Azure Samples, when using the maven command mvn clean package -Pnative -DskipTests to build native image, the 'The command line is too long' problems can easily arise. I've streamlined a lot, but it's still over the max limit.

The MS recommended solution is here https://docs.microsoft.com/troubleshoot/windows-client/shell-experience/command-line-string-limitation#how-to-work-around-the-limitation.

Plugin version: org.graalvm.buildtools:native-maven-plugin:0.9.9

[INFO] Executing: D:\g\bin\native-image.cmd -cp D:\r\org\springframework\boot\spring-boot-starter-web\2.6.2\spring-boot-starter-web-2.6.2.jar;D:\r\org\springframework\boot\spring-boot-starter\2.6.2\spring-boot-starter-2.6.2.jar;D:\r\org\springframework\boot\spring-boot\2.6.2\spring-boot-2.6.2.jar;D:\r\org\springframework\boot\spring-boot-autoconfigure\2.6.2\spring-boot-autoconfigure-2.6.2.jar;D:\r\org\springframework\boot\spring-boot-starter-logging\2.6.2\spring-boot-starter-logging-2.6.2.jar;D:\r\ch\qos\logback\logback-classic\1.2.9\logback-classic-1.2.9.jar;D:\r\ch\qos\logback\logback-core\1.2.9\logback-core-1.2.9.jar;D:\r\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\r\org\apache\logging\log4j\log4j-to-slf4j\2.17.0\log4j-to-slf4j-2.17.0.jar;D:\r\org\apache\logging\log4j\log4j-api\2.17.0\log4j-api-2.17.0.jar;D:\r\org\slf4j\jul-to-slf4j\1.7.32\jul-to-slf4j-1.7.32.jar;D:\r\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\r\org\springframework\spring-core\5.3.14\spring-core-5.3.14.jar;D:\r\org\springframework\spring-jcl\5.3.14\spring-jcl-5.3.14.jar;D:\r\org\yaml\snakeyaml\1.29\snakeyaml-1.29.jar;D:\r\org\springframework\boot\spring-boot-starter-json\2.6.2\spring-boot-starter-json-2.6.2.jar;D:\r\com\fasterxml\jackson\core\jackson-databind\2.13.1\jackson-databind-2.13.1.jar;D:\r\com\fasterxml\jackson\core\jackson-annotations\2.13.1\jackson-annotations-2.13.1.jar;D:\r\com\fasterxml\jackson\core\jackson-core\2.13.1\jackson-core-2.13.1.jar;D:\r\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.1\jackson-datatype-jdk8-2.13.1.jar;D:\r\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.1\jackson-datatype-jsr310-2.13.1.jar;D:\r\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.1\jackson-module-parameter-names-2.13.1.jar;D:\r\org\springframework\boot\spring-boot-starter-tomcat\2.6.2\spring-boot-starter-tomcat-2.6.2.jar;D:\r\org\apache\tomcat\embed\tomcat-embed-core\9.0.56\tomcat-embed-core-9.0.56.jar;D:\r\org\apache\tomcat\embed\tomcat-embed-el\9.0.56\tomcat-embed-el-9.0.56.jar;D:\r\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.56\tomcat-embed-websocket-9.0.56.jar;D:\r\org\springframework\spring-web\5.3.14\spring-web-5.3.14.jar;D:\r\org\springframework\spring-beans\5.3.14\spring-beans-5.3.14.jar;D:\r\org\springframework\spring-webmvc\5.3.14\spring-webmvc-5.3.14.jar;D:\r\org\springframework\spring-aop\5.3.14\spring-aop-5.3.14.jar;D:\r\org\springframework\spring-context\5.3.14\spring-context-5.3.14.jar;D:\r\org\springframework\spring-expression\5.3.14\spring-expression-5.3.14.jar;D:\r\com\azure\spring\spring-cloud-azure-starter-integration-storage-queue\4.0.0-beta.4\spring-cloud-azure-starter-integration-storage-queue-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-cloud-azure-starter\4.0.0-beta.4\spring-cloud-azure-starter-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-cloud-azure-autoconfigure\4.0.0-beta.4\spring-cloud-azure-autoconfigure-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-cloud-azure-service\4.0.0-beta.4\spring-cloud-azure-service-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-cloud-azure-core\4.0.0-beta.4\spring-cloud-azure-core-4.0.0-beta.4.jar;D:\r\com\azure\azure-identity\1.4.3\azure-identity-1.4.3.jar;D:\r\com\microsoft\azure\msal4j\1.11.0\msal4j-1.11.0.jar;D:\r\com\nimbusds\oauth2-oidc-sdk\9.7\oauth2-oidc-sdk-9.7.jar;D:\r\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\r\com\nimbusds\content-type\2.1\content-type-2.1.jar;D:\r\com\nimbusds\lang-tag\1.5\lang-tag-1.5.jar;D:\r\com\nimbusds\nimbus-jose-jwt\9.9.3\nimbus-jose-jwt-9.9.3.jar;D:\r\com\microsoft\azure\msal4j-persistence-extension\1.1.0\msal4j-persistence-extension-1.1.0.jar;D:\r\net\java\dev\jna\jna\5.5.0\jna-5.5.0.jar;D:\r\net\java\dev\jna\jna-platform\5.6.0\jna-platform-5.6.0.jar;D:\r\net\minidev\json-smart\2.4.7\json-smart-2.4.7.jar;D:\r\net\minidev\accessors-smart\2.4.7\accessors-smart-2.4.7.jar;D:\r\org\ow2\asm\asm\9.1\asm-9.1.jar;D:\r\com\azure\azure-core-amqp\2.4.0\azure-core-amqp-2.4.0.jar;D:\r\com\microsoft\azure\qpid-proton-j-extensions\1.2.4\qpid-proton-j-extensions-1.2.4.jar;D:\r\org\apache\qpid\proton-j\0.33.8\proton-j-0.33.8.jar;D:\r\com\azure\azure-core-management\1.5.2\azure-core-management-1.5.2.jar;D:\r\com\azure\azure-aot-graalvm-support\1.0.0-beta.1\azure-aot-graalvm-support-1.0.0-beta.1.jar;D:\r\org\graalvm\sdk\graal-sdk\21.3.0\graal-sdk-21.3.0.jar;D:\r\org\graalvm\nativeimage\svm\21.3.0\svm-21.3.0.jar;D:\r\org\graalvm\nativeimage\objectfile\21.3.0\objectfile-21.3.0.jar;D:\r\org\graalvm\nativeimage\pointsto\21.3.0\pointsto-21.3.0.jar;D:\r\org\graalvm\compiler\compiler\21.3.0\compiler-21.3.0.jar;D:\r\org\graalvm\truffle\truffle-api\21.3.0\truffle-api-21.3.0.jar;D:\r\com\azure\azure-aot-graalvm-support-netty\1.0.0-beta.1\azure-aot-graalvm-support-netty-1.0.0-beta.1.jar;D:\r\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;D:\r\org\springframework\boot\spring-boot-starter-integration\2.6.2\spring-boot-starter-integration-2.6.2.jar;D:\r\org\springframework\boot\spring-boot-starter-aop\2.6.2\spring-boot-starter-aop-2.6.2.jar;D:\r\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;D:\r\org\springframework\integration\spring-integration-core\5.5.7\spring-integration-core-5.5.7.jar;D:\r\org\springframework\spring-messaging\5.3.14\spring-messaging-5.3.14.jar;D:\r\org\springframework\spring-tx\5.3.14\spring-tx-5.3.14.jar;D:\r\org\springframework\retry\spring-retry\1.3.1\spring-retry-1.3.1.jar;D:\r\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\r\io\projectreactor\reactor-core\3.4.13\reactor-core-3.4.13.jar;D:\r\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;D:\r\com\azure\spring\spring-integration-azure-storage-queue\4.0.0-beta.4\spring-integration-azure-storage-queue-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-integration-azure-core\4.0.0-beta.4\spring-integration-azure-core-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-messaging-azure\4.0.0-beta.4\spring-messaging-azure-4.0.0-beta.4.jar;D:\r\com\azure\spring\spring-messaging-azure-storage-queue\4.0.0-beta.4\spring-messaging-azure-storage-queue-4.0.0-beta.4.jar;D:\r\com\azure\azure-storage-queue\12.11.3\azure-storage-queue-12.11.3.jar;D:\r\com\azure\azure-core\1.25.0\azure-core-1.25.0.jar;D:\r\com\fasterxml\jackson\dataformat\jackson-dataformat-xml\2.13.1\jackson-dataformat-xml-2.13.1.jar;D:\r\org\codehaus\woodstox\stax2-api\4.2.1\stax2-api-4.2.1.jar;D:\r\com\fasterxml\woodstox\woodstox-core\6.2.7\woodstox-core-6.2.7.jar;D:\r\io\netty\netty-tcnative-boringssl-static\2.0.46.Final\netty-tcnative-boringssl-static-2.0.46.Final.jar;D:\r\io\netty\netty-tcnative-classes\2.0.46.Final\netty-tcnative-classes-2.0.46.Final.jar;D:\r\com\azure\azure-core-http-netty\1.11.6\azure-core-http-netty-1.11.6.jar;D:\r\io\netty\netty-handler\4.1.72.Final\netty-handler-4.1.72.Final.jar;D:\r\io\netty\netty-common\4.1.72.Final\netty-common-4.1.72.Final.jar;D:\r\io\netty\netty-resolver\4.1.72.Final\netty-resolver-4.1.72.Final.jar;D:\r\io\netty\netty-transport\4.1.72.Final\netty-transport-4.1.72.Final.jar;D:\r\io\netty\netty-codec\4.1.72.Final\netty-codec-4.1.72.Final.jar;D:\r\io\netty\netty-handler-proxy\4.1.72.Final\netty-handler-proxy-4.1.72.Final.jar;D:\r\io\netty\netty-codec-socks\4.1.72.Final\netty-codec-socks-4.1.72.Final.jar;D:\r\io\netty\netty-buffer\4.1.72.Final\netty-buffer-4.1.72.Final.jar;D:\r\io\netty\netty-codec-http\4.1.72.Final\netty-codec-http-4.1.72.Final.jar;D:\r\io\netty\netty-codec-http2\4.1.72.Final\netty-codec-http2-4.1.72.Final.jar;D:\r\io\netty\netty-transport-native-unix-common\4.1.72.Final\netty-transport-native-unix-common-4.1.72.Final.jar;D:\r\io\netty\netty-transport-native-epoll\4.1.72.Final\netty-transport-native-epoll-4.1.72.Final-linux-x86_64.jar;D:\r\io\netty\netty-transport-classes-epoll\4.1.72.Final\netty-transport-classes-epoll-4.1.72.Final.jar;D:\r\io\netty\netty-transport-native-kqueue\4.1.72.Final\netty-transport-native-kqueue-4.1.72.Final-osx-x86_64.jar;D:\r\io\netty\netty-transport-classes-kqueue\4.1.72.Final\netty-transport-classes-kqueue-4.1.72.Final.jar;D:\r\io\projectreactor\netty\reactor-netty-http\1.0.14\reactor-netty-http-1.0.14.jar;D:\r\io\netty\netty-resolver-dns\4.1.72.Final\netty-resolver-dns-4.1.72.Final.jar;D:\r\io\netty\netty-codec-dns\4.1.72.Final\netty-codec-dns-4.1.72.Final.jar;D:\r\io\netty\netty-resolver-dns-native-macos\4.1.72.Final\netty-resolver-dns-native-macos-4.1.72.Final-osx-x86_64.jar;D:\r\io\netty\netty-resolver-dns-classes-macos\4.1.72.Final\netty-resolver-dns-classes-macos-4.1.72.Final.jar;D:\r\io\projectreactor\netty\reactor-netty-core\1.0.14\reactor-netty-core-1.0.14.jar;D:\r\com\azure\azure-storage-common\12.14.2\azure-storage-common-12.14.2.jar;D:\r\org\springframework\experimental\spring-native\0.11.1\spring-native-0.11.1.jar;D:\j\spl\storage\queue\storage-queue-operation\target\azure-spring-cloud-sample-storage-queue-operation-1.0.0.jar -H:Name=azure-spring-cloud-sample-storage-queue-operation The command line is too long.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
@lazar-mitrovic
Copy link
Collaborator

#205 should have fixed that.
Bump plugin version to 0.9.10 to try it out.

@lazar-mitrovic
Copy link
Collaborator

Relevant docs: https://graalvm.github.io/native-build-tools/0.9.10/maven-plugin.html#long_classpath_and_shading_support

@moarychan
Copy link
Author

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

No branches or pull requests

2 participants