Hello, I'm new to Maven. Currently I use Maven 3.1.1 to compile my project (using Jenkins). But occasionally, maven report error messages like the following:
---- Begin of the console output ---- ... [INFO] Compiling 132 source files to C:\Program Files (x86)\Jenkins\jobs\CDMS-web-server\workspace\src\com.xxx.system\com.xxx.system.devicecenter\target\classes [INFO] -------------------------------------------------------------[ERROR] COMPILATION ERROR : [INFO] -------------------------------------------------------------[ERROR] \Program Files (x86)\Jenkins\jobs\CDMS-web-server\workspace\src\com.xxx.system\com.xxx.system.devicecenter\src\main\java\com\xxx\system\devicecenter\network\AgentIdResourceMapIpHandle.java:[36,24] 找不到符号Symbol: Variable TYPE_AGENT_ID Location: Class com.xxx.system.common.ResourceTypeDef[ERROR] \Program Files (x86)\Jenkins\jobs\CDMS-web-server\workspace\src\com.xxx.system\com.xxx.system.devicecenter\src\main\java\com\xxx\system\devicecenter\network\AgentUuidResourceMapIpHandle.java:[38,24] 找不到符号Symbol: Variable TYPE_AGENT_UUID Location: Class com.xxx.system.common.ResourceTypeDef[ERROR] \Program Files (x86)\Jenkins\jobs\CDMS-web-server\workspace\src\com.xxx.system\com.xxx.system.devicecenter\src\main\java\com\xxx\system\devicecenter\network\AgentIdAgentUpdateMapIpHandle.java:[32,24] 找不到符号Symbol: Variable TYPE_COMPUTER_ID_FOR_UPDATE Location: Class com.xxx.system.common.ResourceTypeDef [INFO] 3 errors [INFO] ------------------------------------------------------------- ... ---- End of the console output ---- However, when I build the Jenkins job again without any modification, maven builds the project successfully. My code is correct because I could successfully build the whole project in Eclipse again and again. I use the following Maven parameters: clean install -Dmaven.test.skip=true --update-snapshots --batch-mode --fail-fast --debug I could reproduce the scenario by rebuild the project after deleting all the sub-folders and files in the maven local repository: .repository/com/xxx/ I'm confused about this, and on internet, nobody seems to have the same problem. Any suggestions? Thanks in advanced. -- Levski Weng -- Levski Weng