我有一个 Java Web 应用程序,我尝试使用 Eclipse 以及 Azure SDK 和 Eclipse 插件在 Azure 上部署它。现在,当我尝试在 Azure 模拟器中运行应用程序时。我收到以下可怕的错误:
[windowsazurepackage] cspack.exe: Error : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
我正在使用 Glassfish 3 和 Java 1.7 JDK。我已经尝试替换文件夹,所以它尽可能短。但似乎没有任何帮助。看起来 Glassfish 或 Java SDK 导致文件夹太深。我很惊讶在 2013 年 MS 仍然没有解决这个问题!
下面的问题似乎是一样的。但是给定的答案没有帮助,我不知道如何重新关注原始问题。
Azure Eclipse:cspack.exe:错误:指定的路径、文件名或两者都太长
作为对 Martin Sawicki 评论的回应,这是日志。正如你所看到的,我使用的路径非常短。我什至尝试替换,并为项目使用另一个驱动器,但随后插件因空指针异常而爆炸。
Buildfile: C:\A\azr\package.xml
checkResetScript:
resetEmulator:
createwapackage:
[move] Warning: Could not find file C:\A\azr\dy to copy.
[mkdir] Created dir: C:\A\azr\dy
[windowsazurepackage] Verified attributes.
[windowsazurepackage] Role "wrol1": Verifying the approot "C:\A\azr\wrol1\approot"
[windowsazurepackage] Role "wrol1": Importing components...
[windowsazurepackage] Imported as 'jdk1.7.0_17' from "C:\Program Files\Java\jdk1.7.0_17"
[windowsazurepackage] Imported as 'glassfishv3' from "C:\Glassfish3\glassfishv3"
[windowsazurepackage] Imported as 'OW-MobileClient-QNH.war' from "C:\A\azr\..\OW-MobileClient-QNH"
[windowsazurepackage] Role "wrol1": Finished importing components
[windowsazurepackage] Role "wrol1": Generating component deployment script...
[windowsazurepackage] Role "wrol1": Created internal startup script
[windowsazurepackage] Starting package generation...
[windowsazurepackage] Executing '"C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\bin\cspack.exe" "C:\A\azr\ServiceDefinition.csdef" /role:wrol1;"C:\A\azr\wrol1\approot" /out:"C:\A\azr\dy\WindowsAzurePackage.cspkg"'...
[windowsazurepackage] Process started
[windowsazurepackage] Windows(R) Azure(TM) Packaging Tool version 1.8.0.0
[windowsazurepackage] for Microsoft(R) .NET Framework 3.5
[windowsazurepackage] Copyright (c) Microsoft Corporation. All rights reserved.
[windowsazurepackage] C:\A\azr\ServiceDefinition.csdef: Warning CloudServices040 : The 'schemaVersion' attribute is unspecified. Please set the attribute to avoid this warning.
[windowsazurepackage] cspack.exe: Error : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
[windowsazurepackage] Waiting for process to exit..