Today, the new project selects the Kaptcha framework when selecting the Verification code framework. When referencing Kaptcha in a pom.xml file, a direct error missing artifact com.google.code.kaptcha:kaptcha:jar:2.3.
When I first ruled out the error, I thought it was maven. There is no automatic download, and after viewing MAVEN's related configuration, it is configured for automatic download. The error was later discovered by Google, because the MAVEN local repository did not kaptcha the jar pack and needed to install it itself.
The solution is:
1. First download the Kaptcha jar package, the link is: http://code.google.com/p/kaptcha/downloads/list
2. Extract the downloaded jar package to the appropriate path
3. Open the command line and switch to the location where the jar package is located, execute mvn install:install-file-dgroupid=com.google.code-dartifactid=kaptcha-dversion=2.3.2- Dfile=kaptcha-2.3.2.jar-dpackaging=jar-dgeneratepom=true
The command line appears with this information to indicate success
Introduced in the Pom.xml
<dependency>
<groupId>com.google.code</groupId>
<artifactId>kaptcha</artifactId>
<version>2.3.2</version>
</dependency>
For an explanation of the order in the above order:
This command jar has not been added successfully before, mainly due to the mistake of-dfile=kaptcha2.3.2.jar this parameter, which specifies the name of your jar package.
-dgroupid=com.google.code corresponding Pom.xml <groupId>com.google.code</groupId>
-dartifactid=kaptcha corresponding Pom.xml <artifactId>kaptcha</artifactId>
-dversion=2.3.2 corresponding Pom.xml <version>2.3.2</version>