In the Team City I create an agent build ECS branch, it always failed and throw errors:
/CorsFilter.java:[91,67] diamond operator is not supported in -source 1.6(use -source 7 or higher to enable diamond operator)
The Java version is 1.8.131, not 1.6. I checked information within Team city, 1.6 is not mentioned. I don't know why it is throwing this exception.
CorsFiler.java
private final Collection<String> allowedOrigins = new HashSet<>();
Pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<phase>install</phase>
<configuration>
<tasks>
<move
file="${project.basedir}/target/test.war"
tofile="${project.basedir}/test.war"
/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Hope team city build success.