[
https://issues.apache.org/jira/browse/THRIFT-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041360#comment-16041360
]
Leon Wang commented on THRIFT-4224:
-----------------------------------
I resolved this "thrift failed error: The command line is too long" issue by
setting a shorter thrift temp file for maven-thrift-plugin. This configuration
changed the folder name from default "thrift-dependencies" to "td". Obviously,
this is a workaround to decrease the project folder path length under windows.
<plugin>
<groupId>org.apache.thrift.tools</groupId>
<artifactId>maven-thrift-plugin</artifactId>
<configuration>
<thriftExecutable>${thrift.compiler}</thriftExecutable>
<generator>${thrift.generator}</generator>
*<temporaryThriftFileDirectory>${project.build.directory}/td</temporaryThriftFileDirectory>*
</configuration>
</plugin>
> Compile Thrift generated Java code fails on Windows: The command line is too
> long.
> ----------------------------------------------------------------------------------
>
> Key: THRIFT-4224
> URL: https://issues.apache.org/jira/browse/THRIFT-4224
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.9.1, 0.9.3, 0.10.0
> Reporter: Leon Wang
>
> Compile thrift file to Java in IntelliJ failed due to "The command line is
> too long" on Windows 7. Tried on 0.9.1/0.9.3/0.10.0, both failed as same
> reason.
> Log:
> [INFO] --- maven-thrift-plugin:0.1.11:compile (thrift-sources) @
> vip-api-serverclient ---
> [ERROR] thrift failed output:
> [ERROR] thrift failed error: The command line is too long.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)