Questions about using the Kaptcha Authentication Code framework

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.