Я получаю ошибки при попытке создать банку с Maven 3.0.5 с использованием IntelliJ 12.1.4 и Java 7. Я могу без проблем запускать проект через IDE, но когда я пытаюсь его упаковать, я получаю следующие ошибки.
Соответствующий раздел моего POM (взятый из Maven By Example
на Sonatype
):
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>jar-with-dependencies</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
и ошибки:
[ERROR] ...[33,55] error: diamond operator is not supported in -source 1.5
[ERROR] ...[207,7] error: try-with-resources is not supported in -source 1.5
[ERROR] ...[73,52] error: diamond operator is not supported in -source 1.5
[ERROR] ...[129,40] error: multi-catch statement is not supported in -source 1.5
[ERROR] ...[44,6] error: try-with-resources is not supported in -source 1.5
[ERROR] ...[28,39] error: diamond operator is not supported in -source 1.5
[ERROR] ...[31,7] error: try-with-resources is not supported in -source 1.5
[ERROR] ...[38,6] error: try-with-resources is not supported in -source 1.5
[ERROR] ...[34,41] error: diamond operator is not supported in -source 1.5
[ERROR] ...[77,43] error: diamond operator is not supported in -source 1.5
[ERROR] ...[84,6] error: try-with-resources is not supported in -source 1.5
[ERROR] ...[281,38] error: diamond operator is not supported in -source 1.5
[ERROR] ...[13,55] error: diamond operator is not supported in -source 1.5
[ERROR] ...[155,7] error: try-with-resources is not supported in -source 1.5
Как я могу получить maven для использования источника 1.7?