Jenkins deployment application times wrong:
[ERROR]
/diskc/jenkins/data/workspace/civp_ms/civp_interface/src/main/java/cn/com/geo/cloud/civp/service/query/impl/ Telecomgroup_agel
ABEL_SERVICEIMPL.JAVA:[118,24] Strings in switch are not supported In-source 1.5
(Use-source 7 or higher to enable strings in switch)
[ERROR]
/diskc/jenkins/data/workspace/civp_ms/civp_interface/src/main/java/cn/com/geo/cloud/civp/service/query/impl/ Telecomgroup_bala
NCELABELOFMDN_SERVICEIMPL.JAVA:[126,24] Strings in switch are not supported In-source 1.5
(Use-source 7 or higher to enable strings in switch)
Analysis:
Difficult to Jenkins use the jdk1.5 version of the package compilation.
View the "System Setup" JDK entry for the next Jenkins already using the JDK1.7
Search on the Internet, you need to modify in the Jenkins configuration file
To modify the default JDK version
Cd/root/.jenkins/tools/hudson.tasks.maven_maveninstallation/maven/conf
First back up CP Setting.xml Setting.xml.bak
VI setting.xml File
<!--
Add above the another profile
<profile>
<id>jdk-1.7</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</profile>
Set to 1.7 version of JDK
Clean up "Workspace"
Re-build, success