java - Java + hudson 项目的编码

标签 java encoding utf-8 hudson

我的服务器 Hudson 有问题。

我的项目 java、我的工作区和所有类都有 UTF-8 编码,但是当尝试生成构建时发生编码错误。

我使用 Ubuntu 服务器 11.04,并开发 Ubuntu 11.10。

发生的错误是:

/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/abstracts/Bean.java:[29,18] error: unmappable character for encoding ASCII

这一行有“ã”

有人知道如何解决这个问题吗?

这是控制台的输出:

Started by timer
Updating http://192.168.3.100/svn/SCUV/trunk revision: Apr 23, 2012 8:05:42 AM depth:infinity ignoreExternals: false
At revision 40
no change for http://192.168.3.100/svn/SCUV/trunk since the previous build
[workspace] $ mvn clean compile test
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   SCUV
[INFO]   SCUV Persistence Module
[INFO]   SCUV WebService Module
[INFO]   SCUV WebApp Module
[INFO] ------------------------------------------------------------------------
[INFO] Building SCUV
[INFO]    task-segment: [clean, compile, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] No goals needed for project - skipping
[INFO] No goals needed for project - skipping
[INFO] ------------------------------------------------------------------------
[INFO] Building SCUV Persistence Module
[INFO]    task-segment: [clean, compile, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/target (included: [**], excluded: [])
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 15 source files to /home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/inject/ScuvPersistenceAPI.java:[14,33] error: unmappable character for encoding ASCII

/home/hudson/.hudson/jobs/SCUV/workspace/scuv.persistence/src/main/java/br/com/digitaldoc/scuv/inject/ScuvPersistenceAPI.java:[14,34] error: unmappable character for encoding ASCII

////has more classes with the same error

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Apr 23 08:05:54 BRT 2012
[INFO] Final Memory: 22M/54M
[INFO] ------------------------------------------------------------------------
Recording test results
Performance: Percentage of errors greater or equal than 40% sets the build as unstable
Performance: Percentage of errors greater or equal than 60% sets the build as failure
Performance: Recording JUnit reports '**/TEST*.xml'
Sending e-mails to: asdasd@asdad.com
[DEBUG] Skipping watched dependency update for build: SCUV #7 due to result: FAILURE
Finished: FAILURE

最佳答案

尝试删除~/.hudson文件夹并重新配置。

告诉我它是否有效。

关于java - Java + hudson 项目的编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10279926/

相关文章:

java - 使用 SpringMVC 基于注解的配置进行阐述

java - TopCoder 使用离线可视化工具进行割草挑战

java - 命令行中的 Spring 属性

c - 远程帧缓冲服务器中的颜色编码不正确

php - htmlentities() 不返回任何内容

java - 当我从cmd运行jar时发生InputMismatchException,如果从idea运行则不会发生

encoding - SMPP中 "data_coding"字段的含义

mysql - 数据库数据转换为 '????'

c# - 如何在WP7中将字符串转换为UTF-8字符串格式

c# - 如何将utf8字节数组转换为给定长度的字符串