0

我正在使用 ANT 为我的使用小程序的项目构建一个战争文件。我在项目目录中创建了一个密钥库文件,但是在构建系统检查 C:\Users 中的 .keystore 文件时,如何让系统在项目目录中搜索密钥库文件?

在命令提示符下使用 ANT 构建项目时,出现以下错误:

D:\Gopakumar\Score>ant

Buildfile: build.xml

prepare:

cleartomcat:

 clear-remote:
     [delete] Deleting directory D:\Gopakumar\Score Remote API\build\classpath

incremental-remote:
       [echo] BUILDING REMOTE API
       [mkdir] Created dir: D:\Gopakumar\Score Remote API\build\classpath
       [javac] Compiling 52 source files to D:\Gopakumar\PBL ScoreCard Remote API\build\classpath
       [javac] Note: Some input files use unchecked or unsafe operations.
       [javac] Note: Recompile with -Xlint:unchecked for details.

clean-remote:

clear-pc:
     [delete] Deleting directory D:\Gopakumar\Score Performance Chart Applet\build\classpath
     [delete] Deleting directory D:\Gopakumar\Score Performance Chart Applet\dist

incremental-pc:
     [echo] BUILDING PERFORMANCE CHART APPLET
     [mkdir] Created dir: D:\Gopakumar\Score Performance Chart Applet\build\classpath
     [copy] Copying 57 files to D:\Gopakumar\Score Performance Chart Applet\build\classpath

    [javac] Compiling 37 source files to D:\Gopakumar\Score Performance Chart Applet\build\classpath

[javac] Note: Some input files use unchecked or unsafe operations.

[javac] Note: Recompile with -Xlint:unchecked for details.

[copy] Copying 35 files to D:\Gopakumar\Score Performance Chart App
 let\build\classpath

[unzip] Expanding: D:\Gopakumar\Score Performance Chart Applet\lib\hessian-3.0.13.jar into D:\Gopakumar\Score Performance Chart Applet\build\classpath
 [unzip] Expanding: D:\Gopakumar\Score Performance Chart Applet\lib\composite-1.0.jar into D:\Gopakumar\Score Performance Chart Applet\build\classpath

[unzip] Expanding: D:\Gopakumar\Score Performance Chart Applet\lib\morph-1.0.jar into D:\Gopakumar\Score Performance Chart Applet\build\classpath

[unzip] Expanding: D:\Gopakumar\Score Performance Chart Applet\lib\commons-logging-api.jar into D:\Gopakumar\Score Performance Chart Applet\build\classpath

[unzip] Expanding: D:\Gopakumar\Score Performance Chart Applet\lib\jgraph.jar into D:\Gopakumar\Score Performance Chart Applet\build\classpath 
[mkdir] Created dir: D:\Gopakumar\Score Performance Chart Applet\dist

[jar] Building jar: D:\Gopakumar\PBL ScoreCard Performance Chart Applet\dist\performancechartedit.jar

[signjar] Signing JAR: D:\Gopakumar\Score Performance Chart Applet\dist\performancechartedit.jar to D:\Gopakumar\Score Performance Chart Applet\dist\performancechartedit.jar as csi
[signjar] jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\bimal\.keystore (The system cannot find the file specified)

[signjar] Enter Passphrase for keystore:

BUILD FAILED

D:\Gopakumar\Score\build.xml:556: The following error occurred while executing this line:

D:\Gopakumar\Score\build.xml:147: jarsigner returned: 1

系统检查“C:\Users\bimal.keystore”中的 .keystore 文件,但实际上该文件位于“D:\Gopakumar\PBL ScoreCard”中。如何更改路径以便系统在 "D:\Gopakumar\PBL ScoreCard" 中查找 .keystore 文件?

提前致谢..

4

1 回答 1

0

查看 signjar ant 任务文档,似乎有一个“keystore”属性可用于指定密钥库位置。

于 2013-05-07T04:06:08.153 回答