使用maven编译shiro-samples时报错:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:
1.1:toolchain (default) on project shiro-samples: Cannot find matching toolchain
definitions for the following toolchain types:
[ERROR] jdk [ vendor='sun' version='1.6' ]
[ERROR] Please make sure you define the required toolchains in your ~/.m2/toolch
ains.xml file.
这是因为shiro-root-1.2.4.pom中使用了maven-toolchains-plugin,而maven中没有配置toolchain导致无法编译(toolchain可以指定编译时使用的jdk版本),见shiro-root-1.2.4.pom中的maven-toolchains-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<configuration>
<toolchains>
<jdk>
<version>1.6</version>
<vendor>